$ virtctl start <example-vm>
With container-native virtualization, you can stop, start, and restart virtual machines from both the web console and the command-line interface (CLI).
You can also stop, start, and restart virtual machines from the web console.
You can start a virtual machine from the web console.
In the container-native virtualization console, click Workloads → Virtual Machines.
Start the virtual machine from this screen, which makes it easier to perform actions on multiple virtual machines in the one screen, or from the Virtual Machine Details screen where you can view comprehensive details of the selected virtual machine:
Click the Options menu at the end of virtual machine and select Start Virtual Machine.
Click the virtual machine name to open the Virtual Machine Details screen and click Actions and select Start Virtual Machine.
In the confirmation window, click Start to start the virtual machine.
When you start virtual machine that is provisioned from a |
You can restart a running virtual machine from the web console.
Do not restart a virtual machine while it has a status of Importing. Restarting the virtual machine causes an error for it. |
In the container-native virtualization console, click Workloads → Virtual Machines.
Restart the virtual machine from this screen, which makes it easier to perform actions on multiple virtual machines in the one screen, or from the Virtual Machine Details screen where you can view comprehensive details of the selected virtual machine:
Click the Options menu at the end of virtual machine and select Restart Virtual Machine.
Click the virtual machine name to open the Virtual Machine Details screen and click Actions and select Restart Virtual Machine.
In the confirmation window, click Restart to restart the virtual machine.
You can stop a virtual machine from the web console.
In the container-native virtualization console, click Workloads → Virtual Machines.
Stop the virtual machine from this screen, which makes it easier to perform actions on multiple virtual machines in the one screen, or from the Virtual Machine Details screen where you can view comprehensive details of the selected virtual machine:
Click the Options menu at the end of virtual machine and select Stop Virtual Machine.
Click the virtual machine name to open the Virtual Machine Details screen and click Actions and select Stop Virtual Machine.
In the confirmation window, click Stop to stop the virtual machine.
Use the following virtctl
client utility and oc
commands to change the state of the virtual
machines and display lists of the virtual machines and the virtual machine instances
that represent them.
When you run |
Start a virtual machine.
$ virtctl start <example-vm>
$ virtctl start <example-vm> -n <project_name>
Restart a running virtual machine.
$ virtctl restart <example-vm>
$ virtctl restart <example-vm> -n <project_name>
Stop a running virtual machine.
$ virtctl stop <example-vm>
$ virtctl stop <example-vm> -n <project_name>
List the virtual machines or virtual machine instances in a project. The virtual machine instances are abstractions that represent the virtual machines themselves.
$ oc get vm
$ oc get vm -n <project_name>
$ oc get vmi
$ oc get vmi -n <project_name>