KVM: Starting / Stopping Guest Operating Systems With virsh Command

www.lau‮.irutt‬com
KVM: Starting / Stopping Guest Operating Systems With virsh Command

The virsh command is a command-line tool for managing virtual machines managed by the libvirt virtualization library. You can use virsh to start, stop, and manage the lifecycle of guest operating systems running on KVM.

To start a guest operating system, use the start command followed by the name or ID of the guest:

virsh start <guest>

To stop a guest operating system, use the destroy command followed by the name or ID of the guest:

virsh destroy <guest>

To suspend a guest operating system, use the suspend command followed by the name or ID of the guest:

virsh suspend <guest>

To resume a suspended guest operating system, use the resume command followed by the name or ID of the guest:

virsh resume <guest>

You can also use the list command to list the guests managed by libvirt, and the dominfo command to get information about a specific guest.

virsh list --all
virsh dominfo <guest>

Note: The virsh command must be run as the root user or with superuser privileges.

Created Time:2017-10-29 22:08:50  Author:lautturi