Error installing KVM on Debian 11

I installed a fresh Debian 11.3.0/64 and started installing KVM using this instruction

However, these commands generate fatal errors :disappointed_relieved: :

sudo virsh -c qemu:///system define Whonix-Gateway*.xml
error: Failed to define domain from Whonix-Gateway-XFCE-
error: invalid argument: could not get preferred machine for /usr/bin/qemu-system-x86_64 type=kvm


sudo virsh -c qemu:///system define Whonix-Workstation*.xml
error: Failed to define domain from Whonix-Workstation-XFCE-
error: invalid argument: could not get preferred machine for /usr/bin/qemu-system-x86_64 type=kvm

Correct the erroneous instructions, please!

  1. Make sure virtualization is enabled in the bios
  2. You cant start virtualbox at the same time since it uses kvm as its back end
  3. Install qemu-kvm package, sudo apt install qemu-kvm
  4. restart service sudo systemctl restart libvirtd

Alternativly you can change the backend from
<domain type="kvm"> to <domain type="qemu">
witch is not recommended since its inferior to kvm.

Virtualization was already enabled initially.

There is no VirtualBox in the system! This is a clean new Debian 11 without graphics.

This was done as indicated in the mentioned instruction:

I’ve completely done a Debian reboot, isn’t that enough?

All these recommendations do not help. So, there is an error in the installation instructions.

Correct the erroneous instructions, please!

KVM need virtualization which vt-x so as vt-d, If both not present in the BIOS and activated then you cant run KVM.

Try running a non-Whonix KVM VM first. In other words:
Try running Debian stable inside a KVM VM first.

As per:

Note: I am not maintaining Whonix KVM.

Without graphics? You mean a host operating system without installed desktop environment?
Is this supported? @HulaHoop

Peele wrote “virtualization already enabled” to which you reply “KVM needs virtualization”. Mistake?

Virtualization option in the BIOS only refer to vt-x, so i meant kvm need this virtualization/vt-x option but not only this also need vt-d as well.

Well yes. This is the KVM host operating system. Does she need a graphics system?
It’s not a graphical VirtualBox, is it?

But the Whonix-Gateway and Whonix-Desktop virtual machines have their own graphical environment.

Yes virsh-console should be able to connect to the VM’s tty directly and allow running commands headlessly from the host’s console.

1 Like

Should meaning? Is this tested should work or tested and known to be functional that a user needs no running X / desktop environment and can use Whonix KVM?
If known functional, I’d like to add this to documentation.

Meaning theoretically as I don’t run headless. Though it makes intuitive sense since any interface accessible from a GUI console should be available in a headless env like Tor’s nyx interface.