Importing a large (> dom0 disk size) standalone VM

Hi,

The QubesOS documentation provides instruction on importing OVA files, but it includes a full copy of the VM disk to dom0 storage, which in my case is not possible, as I have ~10GB of free space in dom0 (but plenty of space in the Xen disk pool), and the VM disk is ~50GB.

Is there a way to transfer the disk file, from the AppVM where I have it downloaded, to the Xen disk pool, without this intermediate copy to dom0 ?

Thanks in advance

PS: You may wonder, why do you need to import 50GB VMs ?
At university, we are usually provided with labs, in the form of VirtualBox VMs (.ova files), and these can be relatively large.

1 Like

It’s possible with a named pipe (FIFO). You have to do the volume import separately after VM creation, because qvm-create cannot automatically detect the correct volume size in this case so it has to be passed manually - which is only implemented for qvm-volume import.

Continuing after the qemu-img convert step:

[user@dom0 ~]$ mkfifo /tmp/fifo
[user@dom0 ~]$ qvm-run --pass-io untrusted 'cat "/media/user/externalhd/win10.raw"' > /tmp/fifo

While this^ is still running, open another terminal and:

[user@dom0 ~]$ qvm-create --property=virt_mode=hvm --property=memory=4096 --property=kernel='' --label=red --standalone win10
[user@dom0 ~]$ qvm-run --pass-io untrusted 'stat -c %s "/media/user/externalhd/win10.raw"'
53687091200
[user@dom0 ~]$ qvm-volume import --size=53687091200 win10:root /tmp/fifo
[user@dom0 ~]$ rm /tmp/fifo
4 Likes