Skip to content

Commit 168dcac

Browse files
committed
Updating virtctl table
1 parent 2f0deba commit 168dcac

File tree

2 files changed

+65
-50
lines changed

2 files changed

+65
-50
lines changed

modules/virt-virtctl-commands.adoc

Lines changed: 59 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,17 @@
88

99
The `virtctl` client is a command-line utility for managing {VirtProductName} resources.
1010

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
1222
[width="100%",cols="1a,2a",options="header"]
1323
|===
1424
|Command |Description
@@ -25,15 +35,31 @@ The `virtctl` client is a command-line utility for managing {VirtProductName} re
2535
|View a list of global command options for any `virtctl` command.
2636
|===
2737

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+
|===
3056

3157
[id='vm-management-commands_{context}']
32-
== VM and VMI management commands
58+
== VM management commands
3359

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.
3561

36-
.`virtctl` VM management commands
62+
.VM management commands
3763
[width="100%",cols="1a,2a",options="header"]
3864
|===
3965
|Command |Description
@@ -49,12 +75,11 @@ You can use `virtctl` to manage virtual machine (VM) or virtual machine instance
4975
|`virtctl stop <vm_name> --grace-period 0 --force`
5076
|Force stop a VM. This option might cause data inconsistency or data loss.
5177

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.
5580

5681
|`virtctl unpause vm\|vmi <vm_name>`
57-
|Unpause a VM or VMI.
82+
|Unpause a VM.
5883

5984
|`virtctl migrate <vm_name>`
6085
|Migrate a VM.
@@ -64,40 +89,49 @@ in memory.
6489
|===
6590

6691
[id='vm-and-vmi-connection-commands_{context}']
67-
== VM and VMI connection commands
92+
== VM connection commands
6893

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).
7095

71-
.`virtctl console`, `expose`, and `vnc` commands
96+
.VM connection commands
7297
[width="100%",cols="1a,2a",options="header"]
7398
|===
7499
|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.
77102

78103
|`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.
80111

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.
83114

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.
85117

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>`
87121
|Display the port number and connect manually to a VMI by using any viewer through the VNC connection.
88122

89-
|`virtctl vnc --kubeconfig=$KUBECONFIG --port=<port-number> <vmi_name>`
123+
|`virtctl vnc --kubeconfig=$KUBECONFIG --port=<port-number> <vm_name>`
90124
|Specify a port number to run the proxy on the specified port, if that port is available.
91125

92126
If a port number is not specified, the proxy runs on a random port.
93127
|===
94128

95129
[id='vm-volume-export-commands_{context}']
96-
== VM volume export commands
130+
== VM export commands
97131

98132
You can use `virtctl vmexport` commands to create, download, or delete a volume exported from a VM, VM snapshot, or persistent volume claim (PVC).
99133

100-
.`virtctl vmexport` commands
134+
.VM export commands
101135
[width="100%",cols="1a,2a",options="header"]
102136
|===
103137
|Command |Description
@@ -158,7 +192,7 @@ $ virtctl vmexport download <vmexport_name> --vm\|pvc=<object_name> \
158192
--volume=<volume_name> --output=<output_file>
159193
----
160194

161-
.`virtctl memory-dump` commands
195+
.VM memory dump commands
162196
[width="100%",cols="1a,2a",options="header"]
163197
|===
164198
|Command |Description
@@ -190,7 +224,7 @@ This command removes the association between the VM and the PVC, so that the mem
190224

191225
You can use the `virtctl image-upload` commands to upload a VM image to a data volume.
192226

193-
.`virtctl image-upload` commands
227+
.Image upload commands
194228
[width="100%",cols="1a,2a",options="header"]
195229
|===
196230
|Command |Description
@@ -201,21 +235,3 @@ You can use the `virtctl image-upload` commands to upload a VM image to a data v
201235
|Upload a VM image to a new data volume of a specified requested size.
202236
|===
203237

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-
|===

virt/virt-using-the-cli-tools.adoc

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
:_content-type: ASSEMBLY
22
[id="virt-using-the-cli-tools"]
3-
= Using the CLI tools
3+
= Using the virtctl and oc tools
44
include::_attributes/common-attributes.adoc[]
55
:context: virt-using-the-cli-tools
66
:toclevels: 3
77

88
toc::[]
99

10-
The two primary CLI tools used for managing resources in the cluster are:
10+
You use two primary CLI tools used for managing cluster resources:
1111

12-
* The {VirtProductName} `virtctl` client
13-
* The {product-title} `oc` client
12+
* {VirtProductName} `virtctl` client
13+
+
14+
See xref:../virt/install/virt-installing-virtctl.adoc#virt-installing-virtctl[Installing the `virtctl` client].
1415
15-
== Prerequisites
16-
17-
* You must xref:../virt/install/virt-installing-virtctl.adoc#virt-installing-virtctl[install the `virtctl` client].
16+
* {product-title} `oc` client
1817
1918
include::modules/virt-openshift-client-commands.adoc[leveloffset=+1]
2019

0 commit comments

Comments
 (0)