Cerca nel sito

Convert Virtualbox VM to QEmo (proxMox)

23. 08. 04
Visite: 94

The process is descripted from Virtualbox under Linux but with Virtualbox under Windows is similar.
Attenction for disk space during operations because often VM are very big.

If you have a VM ToBeTransfert on Virtualbox
Verify under VM Setting / Storage / Storage devices to understood where is the position of file containing VM data.vdi
For example
/media/xxxx/data/ToBeTransfert.vdi

Enter using ssh into Linux Virtualbox Machine
Now you have to move converted VM on other device.
Is better use an external device because operation via lan is very slow.
VBoxManage clonehd --format RAW '/media/xxxx/data/ToBeTransfert.vdi' ToBeTransfert.raw
This transform .vdi to .raw

Mount external device, for example
mount /dev/sdc1 /media
mv ToBeTransfert.raw /media/diskToMove
umount /media
 
Connect your external device to Proxmox VM.
Enter via Web into Proxmox interface.
If you select Proxmox Disks you can see the correct external partition, in my example sde2
Enter into ProxMox via ssh
Mount the external disk for example
mount /dev/sde2 /media

Now you need to create Proxmox VM
Don't create media, but select all you need
Verify the VM Number for example 104

Now go again into ssh
cd /media
qm importdisk 104 ToBeTransfert.raw local-lvm --format qcow2
Wait ... a lot

At end go to ProxMox frontend again.
Select VM
Hardware
Now you see 'unused disk'
Select it (if Windows normally is IDE il Linux is SCSI)
Double click 'activate'.

Option select the correct boot order (start from disk).
Attenction! If you have more than a disk try to boot with one and than with the other.
Now under console you can try to start.

If is started attenction to correct IP address (are changed).
Under Windows.
Sometimes changing IP and exiting give an error, but changing again and come back correct ip configuration.
Often you need to enter again to change gateway that is blanked.

More problems are using Linux VM because the name of internet device is changed
ifconfig -a show new name of device for example enp0s3 or ens18
Now you have to change it (as root)
If you use network/interfaces you have to change interface name whith this name in two points
nano /etc/network/interfaces
if you use netplan (Ubuntu)
nano /etc/netplan/01-netcfg.yaml

Now conversion is completed