Qemu/KVM/Libvirt

  • Qemu is the lowest level that emulates processor and peripherals.
  • KVM is to accelerate it if the CPU has VT enabled.
  • Libvirt provides a daemon and client to manipulate VMs for convenience.

https://serverfault.com/questions/208693/difference-between-kvm-and-qemu

Tools

qm – Qemu/KVM Virtual Machine Manager

qm list
qm shutdown 106
qm unlock 100

qemu-img – QEMU disk image utility

qemu-img convert -f raw /dev/pve/vm-107-disk-0 -O vmdk myvm-converted.vmdk

Virsh

virsh – management user interface

Virtual Network Commands

net-list: Returns the list of active networks

virsh net-list --all

net-dhcp-leases: Get a list of dhcp leases for all network interfaces connected to the given virtual network

virsh net-dhcp-leases default

Storage Pool Commands

pool-edit: Edit the XML configuration file for a storage pool

virsh pool-edit default

Random

virt-viewer myvm

virsh list --all

virsh start myvm

virsh shutdown myvm
Domain myvm is being shutdown

config files in: /etc/libvirt/qemu

sudo virsh edit myvm

Misc

Cheatsheet

https://blog.programster.org/kvm-cheatsheet

About ZFS/zvols

https://jrs-s.net/2018/03/13/zvol-vs-qcow2-with-kvm/