How to Export a VM to VirtualBox / VMWare?

I have a need to export a VM from qubes to a virtual machine, like VMware or VirtualBox.

I’ve found instructions to go from VMware to Qubes, but I need to go the other direction.

I’ve found qubes-backup, but it encrypts the file (you cannot do a backup without a password) and I don’t understand the file format. Ideally, I’d like a plain ‘dd’ hard drive image of the VM, with no encryption. (.img, .hd, .cow, whatever)

Ideally, I’d like to export my custom Template. My second choice is to export a pvm. Worst case, I’d be okay with exporting a HVM (if I can build the HVM from my template).

Any ideas?

Here is how to attach (and mount, but that isn’t needed for you) a VM’s disk in a dispvm: How to mount LVM images | Qubes OS
From there, you can dd it to somewhere else. In fact you can also do dd in dom0.
qvm-volume tool will list you which LVM volume is for which VM.

Perfect.
I didn’t know they were just LVM volumes under /dev/mapper/. Very easy to dd and copy.

1 Like