Converting VirtualBox VMs to Qubes HVMs

Hello Everyone.
Happy New 2024, and I hope all is well with you !
I am following the materials published in :
Converting VirtualBox VMs to Qubes HVMs, and
How to convert raw to iso without copying to dom0?
I have ubuntu.vdi from VirtualBox.
I have converted it following - Converting between image formats :

" in MS Win 10 :
cd C:\Program Files\Oracle\VirtualBox
VBoxManage clonehd “C:\Users\abc\VirtualBox VMs\ubuntu.vdi” ubuntu.img --format raw

It is 40 G big.
I have attached it to a Qubes’ PHV called “storage” that is 100 G big : /home/def/Downloads/ubuntu.img.
I have created, using GUI, the HVM called “Ubuntu” with RAM = 4 G, 1 x CPU, Net = sys-firewall, Template = NONE, Kernel = ’ ', HDD = 75 G.
Then, from Dom0, I have tried :

cd /dev/qubes_dom0/
ls -l # … and found the /dev/dm-61 for vm-ubuntu
qvm-run -p storage ‘cat /home/def/Downloads/ubuntu.img’ > /dev/dm-61
bash: /dev/dm-61: Permission denied

Do I miss something so to get this message ?
Please, advise back.
Thanks, and Best,

Use the following command instead after bringing the .img file to dom0:

qvm-create --property=virt_mode=hvm --property=memory=4096 --property=kernel='' --label red --standalone --root-move-from /home/def/Downloads/ubuntu.img ubuntu-hvm
1 Like

Thank you for your prompt reply @DVM.
The free space I have in Dom0 is not enough to bring the ubuntu.img file there, so I need a way to use it from some of the other qubes …

Check this:

Thank you very much, @DVM !
The proposed solution is working.

# in Dom0 :
mkfifo /tmp/fifo
qvm-run --pass-io storage ‘cat “/home/def/Downloads/ubuntu.img”’ > /tmp/fifo
# opened another terminal in Dom0 :
qvm-create --property=virt_mode=hvm --property=memory=4096 --property=kernel=‘’ --label=red --standalone ubuntu_lts
qvm-run --pass-io storage ‘stat -c %s “/home/def/Downloads/ubuntu.img”’
# appears on the screen :
qvm-volume import --size=26687091200 ubuntu_lts:root /tmp/fifo
rm /tmp/fifo


@DMV, I am not sure how to mark your last Reply as “solved by”.
Could you guide me, please ?
Thanks, and Best

You should see a little “check” icon under the post you want to set as the solution, close to the “like” button.

This is what I see :


@deeplow is this supposed to happen?

You can now mark it as the solution. You coukdn’t befire because onoy posts in User Support can be marked as solved. Before it was in General Discussion.

Thank you @deeplow.
I checked it, and it should be shown as “Solution” now @DVM.

1 Like