Intro
This is the first post in a new series I opened: Virt-Manager A-Z. I’ll explain every bit I know about QEMU/KVM, libvirt, virt-manager and much more in separate chapters.
Usually I won’t go through every detail when writing stuff like this, and posts are marked as 101 instead of A-Z. Recently I was again reading the good old introductory articles on VirtualBox written by program-think and finally switched back to GNU/Linux again as my primary desktop system, during which time I had a lot of issues when utilizing virt-manager. I hope this series would help others clear the possible confusion and also serve for my personal references (as searching through the enormous notes I took nowadays become a pain, even with the help of Dataview).
As it’s mostly extracted from my journal as is, you can use translate.js in case texts are in multiple languages. I just happened to write down with the exact thinking and tbh would not think about it. The thought (in whatever language) just haunts me.
By the way, I’m still learning many other things as mentioned in Time to Press the Stop Button and this is just the beginning. Stay tuned for any future update.
101
Before Chapter 1, an 101 is desired but I won’t go through the trouble, just RTFM. You’ll need them anyway if you skip the documentation and just move on.
Also, in the series I would use Void Linux as an example that comes with a few unique features (and you have to adapt it to your distro, which is the point) you should keep in mind:
- It supports both the musl and GNU libc implementations. To make life easier, I would simply stick to glibc. Alpine is a good musl-libc neighbor. If anything goes wrong, chances are Alpine folks have met it (and usually come up with a solution) already.
- It uses runit instead of the typical and de facto SystemD as the init system and service supervisor.
- xbps-src (aka. void-packages) has a wide range of packages. If there is a package available (or missing) in Void, it does not mean your distro would have it automatically. In such scenario, try a package tracker like Repology.
Doc
- QEMU
- QEMU Documentation
- Removed features:
-soundhw
->-device
(7.1+)
- Removed features:
- QEMU Wiki
- Network
- Network backend types
- How to get SSH access to a guest
- How to disable network completely
- Network
- QEMU Documentation
- libvirt
- Wiki (quite outdated)
- FAQ: What is the difference between
qemu:///system
andqemu:///session
? Which one should I use? - libvirt - Void Linux Handbook: only service stuff
- Virt-manager - Arch Wiki: not informative, skip it
- Virtualization - Kali Linux: many virtualization technologies, a must-read
- RHEL
- 虚拟化部署和管理指南 - RHEL7:大而全的红帽指南
- 21.2.2. 启用 Hyper-V enlightenments - RHEL9:通过 KVM 模拟 Hyper-V hypervisor 提高 Windows 虚拟机性能
- 虚拟化调整和优化指南 - RHEL7:没什么有用的,都是套话
- 为什么不用 RHEL9?在 7 -> 8 的注意事项 19.1. 提到,
virt-manager
已被(RHEL)弃用,可能在以后的 RHEL 主发行版本中不被支持。而 8 -> 9 的注意事项 25.4. 更是说直接删除了 SPICE 协议,但官方自己也说了 VNC 比起来功能差太多。
- Virtualization in Void Linux using KVM + QEMU + libvirt: fairly easy one, nothing fancy here
- Replace VirtualBox with QEMU for personal use - HN: extensive debate regarding QEMU/libvirt/virt-manager usage, worth reading every once in a while
- 性能更好的虚拟机,virt-manager 的安装与使用:文中关于 user session 无法通过 virtiofs 来共享文件的说法是错误的,宿主机安装
virtiofsd
即可,其他可以稍微看看
List
A composed list of chapters I intended to write (in raw format, they may end up with different topics):
- 101: qemu, libvirt, virt-manager & bullet list
- Chap.1: setup, user session and default bridge
virbr0
- Chap.2: exercise (kali, tails and MS-DOS 6.22), only give a few hints
- Chap.3: vbox -> qemu (vboxmanage, qemu-img
virsh) - Chap.4: features, extension
todo (cf. vbox) - Chap.5: vm optimization
- Chap.6: lxc
direct kernel boot - Chap.7: emulate rpi (emulator)
- Chap.8: rpi4 emulate win95 or windows server 2025 preview on arm
- Chap.9: todo (looking glass, xen, vagrant, k8s)