8
8
9
9
The `virtctl` client is a command-line utility for managing {VirtProductName} resources.
10
10
11
- .`virtctl` general commands
11
+ Although the examples refer to virtual machines (VMs), you can use these commands with virtual machine instances (VMIs).
12
+
13
+ // apinnick: I recommend not breaking these sections into separate modules because of maintenance issues.
14
+ // These sections will never be used independently.
15
+
16
+ [id='virtctl-information-commands_{context}']
17
+ == Virtctl information commands
18
+
19
+ You use `virtctl` information commands to view information about the `virtctl` client.
20
+
21
+ .Information commands
12
22
[width="100%",cols="1a,2a",options="header"]
13
23
|===
14
24
|Command |Description
@@ -25,15 +35,31 @@ The `virtctl` client is a command-line utility for managing {VirtProductName} re
25
35
|View a list of global command options for any `virtctl` command.
26
36
|===
27
37
28
- // apinnick: I recommend not breaking these sections into separate modules because of maintenance issues.
29
- // These sections will never be used independently.
38
+ [id='vm-information-commands_{context}']
39
+ == VM information commands
40
+
41
+ You can use `virtctl` to view information about VMs.
42
+
43
+ .VM information commands
44
+ [width="100%",cols="1a,2a",options="header"]
45
+ |===
46
+ |Command |Description
47
+ |`virtctl fslist <vm_name>`
48
+ |View the file systems available on a guest machine.
49
+
50
+ |`virtctl guestosinfo <vm_name>`
51
+ |View information about the operating systems on a guest machine.
52
+
53
+ |`virtctl userlist <vm_name>`
54
+ |View the logged-in users on a guest machine.
55
+ |===
30
56
31
57
[id='vm-management-commands_{context}']
32
- == VM and VMI management commands
58
+ == VM management commands
33
59
34
- You can use `virtctl` to manage virtual machine (VM) or virtual machine instance (VMI) states and to migrate a VM .
60
+ You use `virtctl` virtual machine (VM) management commands to manage VMs .
35
61
36
- .`virtctl` VM management commands
62
+ .VM management commands
37
63
[width="100%",cols="1a,2a",options="header"]
38
64
|===
39
65
|Command |Description
@@ -49,12 +75,11 @@ You can use `virtctl` to manage virtual machine (VM) or virtual machine instance
49
75
|`virtctl stop <vm_name> --grace-period 0 --force`
50
76
|Force stop a VM. This option might cause data inconsistency or data loss.
51
77
52
- |`virtctl pause vm\|vmi <vm_name>`
53
- |Pause a VM or VMI. The machine state is kept
54
- in memory.
78
+ |`virtctl pause vm <vm_name>`
79
+ |Pause a VM. The machine state is kept in memory.
55
80
56
81
|`virtctl unpause vm\|vmi <vm_name>`
57
- |Unpause a VM or VMI .
82
+ |Unpause a VM.
58
83
59
84
|`virtctl migrate <vm_name>`
60
85
|Migrate a VM.
@@ -64,40 +89,49 @@ in memory.
64
89
|===
65
90
66
91
[id='vm-and-vmi-connection-commands_{context}']
67
- == VM and VMI connection commands
92
+ == VM connection commands
68
93
69
- You can use `virtctl` to connect to the serial console, expose a port, set a proxy connection, specify a port, and open a VNC connection to a VM .
94
+ You use `virtctl` connection commands to expose ports and connect to virtual machines (VMs) .
70
95
71
- .`virtctl console`, `expose`, and `vnc` commands
96
+ .VM connection commands
72
97
[width="100%",cols="1a,2a",options="header"]
73
98
|===
74
99
|Command |Description
75
- |`virtctl console <vmi_name >`
76
- |Connect to the serial console of a VMI .
100
+ |`virtctl console <vm_name >`
101
+ |Connect to the serial console of a VM .
77
102
78
103
|`virtctl expose <vm_name>`
79
- |Create a service that forwards a designated port of a VM or VMI and expose the service on the specified port of the node.
104
+ |Create a service that forwards a designated port of a VM and expose the service on the specified port of the node.
105
+
106
+ |`virtctl scp -i <ssh_key> <filename> <vm_username>@<vm_name>`
107
+ |Copy a file from your machine to a VM. The command uses the private key of an SSH key pair. The VM must be configured with its public key.
108
+
109
+ |`virtctl scp -i <ssh_key> <vm_username@<vm_name>:<filename> .`
110
+ |Copy a file from a VM to your machine. The command uses the private key of an SSH key pair. The VM must be configured with its public key.
80
111
81
- |`virtctl vnc --kubeconfig=$KUBECONFIG <vmi_name >`
82
- |Open a Virtual Network Client (VNC) connection to a VMI .
112
+ |`virtctl ssh -i <ssh_key> <user_name>@<vm_name >`
113
+ |Open an SSH connection with a VM. The command uses the private key of an SSH key pair. The VM must be configured with its public key .
83
114
84
- Accessing the graphical console of a VMI through VNC requires a remote viewer on your local machine.
115
+ |`virtctl vnc --kubeconfig=$KUBECONFIG <vm_name>`
116
+ |Connect to the VNC console of a VM.
85
117
86
- |`virtctl vnc --kubeconfig=$KUBECONFIG --proxy-only=true <vmi_name>`
118
+ Accessing the graphical console of a VM through VNC requires a remote viewer on your local machine.
119
+
120
+ |`virtctl vnc --kubeconfig=$KUBECONFIG --proxy-only=true <vm_name>`
87
121
|Display the port number and connect manually to a VMI by using any viewer through the VNC connection.
88
122
89
- |`virtctl vnc --kubeconfig=$KUBECONFIG --port=<port-number> <vmi_name >`
123
+ |`virtctl vnc --kubeconfig=$KUBECONFIG --port=<port-number> <vm_name >`
90
124
|Specify a port number to run the proxy on the specified port, if that port is available.
91
125
92
126
If a port number is not specified, the proxy runs on a random port.
93
127
|===
94
128
95
129
[id='vm-volume-export-commands_{context}']
96
- == VM volume export commands
130
+ == VM export commands
97
131
98
132
You can use `virtctl vmexport` commands to create, download, or delete a volume exported from a VM, VM snapshot, or persistent volume claim (PVC).
99
133
100
- .`virtctl vmexport` commands
134
+ .VM export commands
101
135
[width="100%",cols="1a,2a",options="header"]
102
136
|===
103
137
|Command |Description
@@ -158,7 +192,7 @@ $ virtctl vmexport download <vmexport_name> --vm\|pvc=<object_name> \
158
192
--volume=<volume_name> --output=<output_file>
159
193
----
160
194
161
- .`virtctl memory- dump` commands
195
+ .VM memory dump commands
162
196
[width="100%",cols="1a,2a",options="header"]
163
197
|===
164
198
|Command |Description
@@ -190,7 +224,7 @@ This command removes the association between the VM and the PVC, so that the mem
190
224
191
225
You can use the `virtctl image-upload` commands to upload a VM image to a data volume.
192
226
193
- .`virtctl image- upload` commands
227
+ .Image upload commands
194
228
[width="100%",cols="1a,2a",options="header"]
195
229
|===
196
230
|Command |Description
@@ -201,21 +235,3 @@ You can use the `virtctl image-upload` commands to upload a VM image to a data v
201
235
|Upload a VM image to a new data volume of a specified requested size.
202
236
|===
203
237
204
- [id='environment-information-commands_{context}']
205
- == Environment information commands
206
-
207
- You can use `virtctl` to view information about versions, file systems, guest operating systems, and logged-in users.
208
-
209
- .`virtctl` environment information commands
210
- [width="100%",cols="1a,2a",options="header"]
211
- |===
212
- |Command |Description
213
- |`virtctl fslist <vmi_name>`
214
- |View the file systems available on a guest machine.
215
-
216
- |`virtctl guestosinfo <vmi_name>`
217
- |View information about the operating systems on a guest machine.
218
-
219
- |`virtctl userlist <vmi_name>`
220
- |View the logged-in users on a guest machine.
221
- |===
0 commit comments