Este contenido no está disponible en el idioma seleccionado.
Chapter 7. Using the CLI tools
The two primary CLI tools used for managing resources in the cluster are:
-
The OpenShift Virtualization client
virtctl -
The OpenShift Container Platform client
oc
7.1. Prerequisites Copiar enlaceEnlace copiado en el portapapeles!
-
You must install the
virtctlclient.
7.2. Virtctl client commands Copiar enlaceEnlace copiado en el portapapeles!
The
virtctl
To view a list of
virtctl
$ virtctl help
To view a list of options that you can use with a specific command, run it with the
-h
--help
$ virtctl image-upload -h
To view a list of global command options that you can use with any
virtctl
$ virtctl options
The following table contains the
virtctl
| Command | Description |
|---|---|
|
| Start a virtual machine. |
|
| Stop a virtual machine. |
|
| Pause a virtual machine or virtual machine instance. The machine state is kept in memory. |
|
| Unpause a virtual machine or virtual machine instance. |
|
| Migrate a virtual machine. |
|
| Restart a virtual machine. |
|
| Create a service that forwards a designated port of a virtual machine or virtual machine instance and expose the service on the specified port of the node. |
|
| Connect to a serial console of a virtual machine instance. |
|
| Open a VNC (Virtual Network Client) connection to a virtual machine instance. Access the graphical console of a virtual machine instance through a VNC which requires a remote viewer on your local machine. |
|
| Display the port number and connect manually to the virtual machine instance by using any viewer through the VNC connection. |
|
| Specify a port number to run the proxy on the specified port, if that port is available. If a port number is not specified, the proxy runs on a random port. |
|
| Upload a virtual machine image to a data volume that already exists. |
|
| Upload a virtual machine image to a new data volume. |
|
| Display the client and server version information. |
|
| Display a descriptive list of
|
|
| Return a full list of file systems available on the guest machine. |
|
| Return guest agent information about the operating system. |
|
| Return a full list of logged-in users on the guest machine. |
7.3. OpenShift Container Platform client commands Copiar enlaceEnlace copiado en el portapapeles!
The OpenShift Container Platform
oc
VirtualMachine
vm
VirtualMachineInstance
vmi
You can use the
-n <namespace>
| Command | Description |
|---|---|
|
| Log in to the OpenShift Container Platform cluster as
|
|
| Display a list of objects for the specified object type in the current project. |
|
| Display details of the specific resource in the current project. |
|
| Create a resource in the current project from a file name or from stdin. |
|
| Edit a resource in the current project. |
|
| Delete a resource in the current project. |
For more comprehensive information on
oc