第 5 章 Starting virtual machines
To start a virtual machine (VM) in RHEL 10, you can use the command line interface or the web console GUI.
Prerequisites
- Before a VM can be started, it must be created and, ideally, also installed with an OS. See Creating virtual machines.
You can use the command line interface (CLI) to start a shut-down virtual machine (VM) or restore a saved VM. By using the CLI, you can start both local and remote VMs.
Prerequisites
- An inactive VM that is already defined.
- The name of the VM.
For remote VMs:
- The IP address of the host where the VM is located.
- Root access privileges to the host.
-
If you want to start a VM that uses the
systemconnection of libvirt, you must have root privileges or be in thelibvirtuser group on the host. For more information, see User-space connection types for virtualization.
Procedure
For a local VM, use the
virsh startutility.For example, the following command starts the demo-guest1 VM.
# virsh start demo-guest1 Domain 'demo-guest1' startedFor a VM located on a remote host, use the
virsh startutility along with the QEMU+SSH connection to the host.For example, the following command starts the demo-guest1 VM on the 192.0.2.1 host.
# virsh -c qemu+ssh://root@192.0.2.1/system start demo-guest1 root@192.0.2.1's password: Domain 'demo-guest1' started