Export machine for virtualbox

Fabio

Renowned Member
Jan 30, 2016
65
1
73
52
density to export a virtual machine made with proxmox to VirtualBox. The virtual machine contains an UBUNTU 22 installation. Is it possible to do this operation? The proxmox is version 5.2
 
I found the disk references in /var/dm-xx where xx is the number connected to my machine (110) do I copy the file /dev/dm-24 to my PC and convert it with qemu?
Is the command qemu-img convert -f raw -O vdi /home/tmp/file_LVM /home/tmp/file_VDI OK?
 
I found the disk references in /var/dm-xx where xx is the number connected to my machine (110) do I copy the file /dev/dm-24 to my PC and convert it with qemu?
No, it's a blockfile that you cannot just copy. You need to run the qemu-img command on your PVE host in order to read the file.
Is the command qemu-img convert -f raw -O vdi /home/tmp/file_LVM /home/tmp/file_VDI OK?
Should work like this:

Code:
qemu-img convert /dev/dm-24 -p -O vdi /tmp/test.vdi
 
Posting solution. It might help someone.

qm list

Note the VMID of the machine you want to export.

dd if=/dev/pve/vm-<VMID>-disk-0 of=/root/vm-<VMID>-disk.raw bs=4M status=progress

mv vm-<VMID>-disk.raw /dev/shm/

/dev/shm is a RAM disk and allows faster disk conversion. Ensure there’s enough space.

cd /dev/shm/

qemu-img convert -O vdi vm-<VMID>-disk.raw vm-105-disk.vdi

scp root@<SERVER ip>:/dev/shm/vm-<VMID>-disk.vdi ~/Downloads/
 
  • Like
Reactions: somebodyoverthere