// Module included in the following assemblies: // // * virt/virtual_machines/virt-controlling-vm-states.adoc [id="virt-cli-reference-controlling-vms_{context}"] = CLI reference for controlling virtual machines 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. [NOTE] ==== When you run `virtctl` commands, you modify the virtual machines themselves, not the virtual machine instances that represent them in the web console. ==== == start Start a virtual machine. .Example: Start a virtual machine in the current project ---- $ virtctl start ---- .Example: Start a virtual machine in a specific project ---- $ virtctl start -n ---- == restart Restart a running virtual machine. .Example: Restart a virtual machine in the current project ---- $ virtctl restart ---- .Example: Restart a virtual machine in a specific project ---- $ virtctl restart -n ---- == stop Stop a running virtual machine. .Example: Stop a virtual machine in the current project ---- $ virtctl stop ---- .Example: Stop a virtual machine in a specific project ---- $ virtctl stop -n ---- == list List the virtual machines or virtual machine instances in a project. The virtual machine instances are abstractions that represent the virtual machines themselves. .Example: List the virtual machines in the current project ---- $ oc get vm ---- .Example: List the virtual machines in a specific project ---- $ oc get vm -n ---- .Example: List the running virtual machine instances in the current project ---- $ oc get vmi ---- .Example: List the running virtual machine instances in a specific project ---- $ oc get vmi -n ----