Here, "KVM" refers to virtualization based on QEMU-KVM; "virsh" refers to a tool for managing KVM, which belongs to the libvirt software package.
Without the libvirt software package, the KVM virtual machine can still be managed using the program provided by QEMU-KVM.
Use virsh to view virtual machines
Linux list a KVM vm guest using virsh command
Use virsh to start and stop virtual machines
KVM: Starting / Stopping Guest Operating Systems With virsh Command
Add a hard disk to the virtual machine
Add hard disks to the virtual machine to expand the virtual machine's capacity. " Add a hard disk to the KVM virtual machine "
#1 The host creates a hard disk file
#2 modify the virtual machine XML configuration
#3 Restart the virtual machine or hot reload
After that, you can view the newly added hard disk in the virtual machine.
Use virsh to create and restore snapshots
After creating a snapshot, you can quickly restore and reset the virtual machine to a specified point in time.
How to Create VM snapshot on KVM
virsh Create and restore snapshot KVM-
snapshot management
Access the virtual machine through VNC
Access the virtual machine "display" through VNC.
KVM: Connect to a virtual machine(SSH, VNC, Console, virt-viewer etc)
kvm virtual machine vnc and spice configuration
KVM Virtualization: Start VNC Remote Access For Guest Operating Systems
enabling vnc after using virt-install
Exit the virsh console connection
How to exit a “virsh console” connection?
Packages that may be used
libvirtd、virt-manager、virt-install
If you use KVM, you can install all these three software packages directly, which will usually be used.
Sleeping the virtual machine (dompmsuspend)
Features/Virt Guest Suspend Hibernate
8.12. Guest Virtual Machine Power Management
Modify the default storage pool
" How to change the default Storage Pool from libvirt? " You
must turn off pool-destroy first , otherwise it will prompt a pool conflict when importing.
To do
# TODO Enter the BIOS interface when the virtual machine starts
related articles
"KVM"
-virtual machine migration "libvirt"-modify the default storage pool
"KVM" -management tool
"KVM"-CPU model and topology (unfinished)
"KVM"-common errors and precautions