Whonix Gateway VM no bootable device error


I’m using Ubuntu 22.04LTS as my host operating system.
I downloaded KVM via the terminal and Virt Manager came with it.
I have the Whonix Gateway and Workstation VMs, and I just setup Debian 11 as a guest operating system to create my own VMs with, as it gave me the “no bootable device” error beforehand.

But now, upon trying to run the Whonix Gateway VM, that’s giving me the “no bootable device” error now, despite it shouldn’t.

How do I fix this error?

Thank you!

Hi everyone, I’m on Fedora 38 and I have the same issue.
I used Whonix in the past on the same system and worked fine.

List all your QEMU/KVM virtual machines with:
sudo virsh list --all

It should show the VM that doesn’t boot. If it’s named Whonix-Workstation, check its configuration using:
sudo virsh dumpxml Whonix-Workstation

Check the disk XML element. It should be similar to this (maybe with a different PCI slot):

    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/var/lib/libvirt/images/Whonix-Workstation.qcow2'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>

If everything is fine so far, check the content of the VM disk image, assuming it’s stored in /var/lib/libvirt/images/Whonix-Workstation.qcow2:

sudo modprobe nbd
sudo qemu-nbd --connect=/dev/nbd0 /var/lib/libvirt/images/Whonix-Workstation.qcow2

Check that the main partition is there with:
sudo fdisk --list /dev/nbd0

You can also mount this partition and inspect its content:

sudo mkdir -p /mnt/nbd0p1
sudo mount /dev/nbd0p1 /mnt/nbd0p1
ls -l /mnt/nbd0p1

For more info, check the KVM installation guide for Debian or Fedora.

1 Like

Hi, thank you for your response.
I get this error:

sudo mount /dev/nbd0 /mnt/nbd0p1 
mount: /mnt/nbd0p1: wrong fs type, bad option, bad superblock on /dev/nbd0, missing codepage or helper program, or other error.
       dmesg(1) may have more information after failed mount system call.

update: I fixed the issue

Is important to extract the files using tar -xvf Whonix*.libvirt.xz as described in the docs page and not with right click → extract in the file manager.


Thanks for reporting back the issue and the fix.

1 Like