Trouble running Qubes on KVM/QEMU

I tried running Qubes on KVM/QEMU, but it didn’t work. Is it even possible to do that? I just want to test the OS without reformatting the whole computer.

Hi @anonDoveee ,
welcome to the Qubes-OS world.

No, you should use the hardware directly.

Please read the provided documentation:

See the note in the above documentation :

Note: Qubes OS is not meant to be installed inside a virtual machine as a guest hypervisor. In other words, nested virtualization is not supported. In order for a strict compartmentalization to be enforced, Qubes OS needs to be able to manage the hardware directly.

2 Likes

Imagine the shenanigans you could get up to if nested virtualisation was supported…

@ludovic is right.

Your options are:

  • Install on another (external) drive
    • Bear in mind that if your external drive is a USB drive, you won’t be able to take advantage of USB passthrough. Qubes OS will implode if you do that. (No, this is not a Qubes OS vulnerability, as Qubes OS is not designed to run this way. It’s the equivalent of removing the internal boot drive once the machine has already booted.)
  • Get a cheap computer to try it on
    • Make sure that it’s a 64-bit X86 CPU that has VT-x and VT-d in its instruction set, otherwise it won’t boot.

What specifically are you curious about Qubes OS?

Maybe we could answer some questions you might have :slight_smile:

2 Likes

You are going to need a real hypervisor that supports nested virtualization with IOMMU.

I know it works in VMWare ESXi, I’m guessing it also works in Proxmox, but I don’t think it works anywhere else. VirtualBox will allow you to install the OS, but it wouldn’t start any qubes, and I think many other hypervisors will have similar issues.

If you just want to try qubes then install it on a USB device, if running it virtually is your only option then try the desktop version of vmware, and enable the nested virtualization including nested iommu.

It can work inside KVM, but configuration is non-trivial and the whole thing is rather unstable (including crashes in various situations). If you want to try anyway, ensure you enable both nested virtualization and emulated IOMMU (works on Intel KVM only, KVM on AMD doesn’t support it yet). Some documentation about emulated IOMMU (aka VT-d) is here: Features/VT-d - QEMU

3 Likes

Just a thought.

There seems to be a significant number of people who want to “try” Qubes OS in a VM.

I don’t fully understand what exactly they’re wanting to “try” (I’m assuming the UI/UX? @anonDoveee please correct me on this if I got this wrong :smile:), but there might actually be a case to have a VM server and something like Apache Guacamole, where people could:

  • Spin up a blank VM (most likely running completely in RAM, so that hard drive wear and tear would be minimised)
  • Boot into the latest Qubes OS ISO from the repo
  • Have a time limit on it (something like 6-12 hours), where once the limit was reached, the VM wold be destroyed
  • Deliberately throttle system resources (CPU speed, internet speed, etc.) to prevent abuse (cryptomining, password cracking, spambots, malware, etc.)
  • Maybe other stuff that I haven’t thought of yet….

I’d happily host a public server for this if it would be beneficial. It would also be quite fun to set up :stuck_out_tongue:

You never know. It might increase public exposure to Qubes OS, and might even assist in “Qubes Air” (maybe, maybe not……)

Not to mention, it would fantastic for anyone to test their code on Qubes OS if they haven’t got actual hardware to test it on :slight_smile:

1 Like

Yes, since this is not a conventional OS, it would be great to easily test it somehow to see if it’s something one would be interested in daily driving.

If you want to try Qubes OS, install it on a USB stick without touching your hard drive.

1 Like