KVM/libvirt
Appearance
< KVM
libvirt[1] is a virtualization API with supports for KVM, QEMU, Xen, Virtuozzo, VMWare ESX, LXC, BHyve and more
Ubuntu packages
[edit | edit source]At least the following packages compose libvirt in Ubuntu:
- libvirt-bin
- libvirt-clients: virsh, virt-admin virt-host-validate virt-login-shell virt-pki-validate virt-xml-validate
- libvirt-daemon:
- libvirtd:
/etc/libvirt/virtlogd.conf
- virt-sanlock-cleanup
- virtlockd
- virtlogd
- libvirtd:
Config files and directories
[edit | edit source]- Config directories:
- Config files:
/etc/libvirt/virtlogd.conf
- Includes information about Unix Socket permissions: unix_sock_group, unix_sock_ro_perms, unix_sock_rw_perms, auth_unix_ro, auth_unix_rw
- Images directory:
/var/lib/libvirt/images
(See: virsh pool-define-as) - Logs:
/var/log/libvirt/qemu
journalctl -u libvirtd
Journalctl errors
[edit | edit source]libvirtd[14189]: 2019-11-21 15:08:13.035+0000: 14192: error : qemuDomainBlockCommit:17568 : invalid argument: top '/path/to/file/VM_NAME.qcow2' in chain for 'hda' has no backing file
Activities
[edit | edit source]Basic
- Read Libvirt Changelog: https://libvirt.org/git/?p=libvirt.git;a=log
- Read Libvirt Release notes: https://libvirt.org/news.html
- Read Libvirt FAQ: https://wiki.libvirt.org/page/FAQ
Medium
- Restart libvirtd daemon:
systemctl restart libvirtd
Expert:
- Read Libvirt code: https://github.com/libvirt/libvirt
- Implement uptime functionality in libvirt code: https://www.spinics.net/linux/fedora/libvir/msg98027.html
- Review libvirt error messages in journald
- Understand different CPU model an topologies: https://libvirt.org/formatdomain.html#elementsCPU