I'm following this excellent article to run Windows system under my Debian Linux with the native Linux virtualization, aka KVM.
However, it might be dated as having done
sudo apt update
sudo apt install qemu-kvm bridge-utils virt-manager libosinfo-bin -y
and rebooted, I'm still having many problems.
First, I'm blocked on the first step:
The libvirtd service does not appear to be installed.
If in the virtual machine manager window I click on create a new virtual machine, I'll get:
I was thinking,
It is unlikely that the Debian package dependency is messed up, or the needed service not started by mistake. So what I'm missing here?
Then found the answer from https://unix.stackexchange.com/a/609256/374303
sudo apt install libvirt-daemon-system
resolved the libvirtd.service issue
However, this is what I'm getting despite I've rebooted my machine:
As per the article,
You may now go ahead and reboot the host, if you don't reboot the machine then you will end getting a below error.
I.e., I've done everything I should.
UPDATE:
Thanks to A.B's following answer -- add to the "libvirt" group is sufficient.
If you want to manage VMs as non-root you need to add a user to that group.
Then I moved on, to configure the virtual hard disk. By default Ubuntu KVM would pick up 40GB, but since I'm creating a Win10 Dev machine. I need to make it 120G. And I got into this:
Which I found the solution here
However, I want to choose where to store the virtual hard disk, which gave me the trouble:
Which I found the solution here
Then I moved on, all the way to clicking on Begin installation, which gave me this:
whose solution is supposed to be sudo virsh net-start default
, but I'm getting:
$ sudo virsh net-start default
error: Failed to start network default
error: Cannot check dnsmasq binary /usr/sbin/dnsmasq: No such file or directory
And none of the hits I found were able to solve the problem yet, including,
- https://wiki.libvirt.org/page/Virtual_network_%22default%22_has_not_been_started
- https://forum.manjaro.org/t/unable-to-complete-install-requested-operation-is-not-valid-network-default-is-not-active/84331/2
- https://www.xmodulo.com/network-default-is-not-active.html
but finally found the solution at https://blog.programster.org/kvm-missing-default-network:
sudo apt install dnsmasq -y
Yet, now clicking on Begin installation, gave me this:
Error connecting to graphical console: Error opening Spice console SpiceClientGtk missing
And the solution here says to "changed Display settings from Spice Server to VNC server" and "it worked"
How to make the whole thing work?
This question being asked in a narrative way is deliberate, in hoping that the next person following that article will solve the encountered questions one by one.
Can we have a step by step instruction to get it working without missing steps or hiccups please?