Nowadays virtualization is a must but sometimes we found virtual machines runing in several plataforms. Having all your virtual machines in one platform helps you to centralize all the administration and reduces maintenance time cost.
In this case we have a Centos 7 pet virtual machine and we need to migrate from VirtualBox 6 to Proxmox 6, the process is simple but time needed is dependant of hard drive size and speed.
Step 1. Remove virtual Box guest aditions if they were installed
Just insert Virtual Box guest additions in the virtual machine,
mount guest aditions
mount /dev/sr0 /mnt
go to guest additions dit
and run uninstaller
Step 2. Export virtual machine to ova
Poweroff your virtual machine and export it
Mark your virtual machine
File-> Export Appliance
and follow the wizard steps
Step 3. Upload ova to proxmox
with sftp or winscp you can upload your image into a place with enough free space, my prefered choice usually is /var/lib/vz direcory
Step 4.- Uncompress OVA
Basically an ova image is a tar file that includes a dump of hard disks in vmdk format and a xml file ovf that describer the virtual machine.
cd /var/lib/vz tar xvf yourvmfile.ova
Step 5- Create new Virtual Machine
if you run cat /var/lib/vz/yourvm.ovf you will get all parameters that you need to set, network mac address, ram, number of cpus …. just proxmox interface to complete all data, create a single hard disk of 1gb.
Once the virtual machine is created, delete the 1gb hard disk
Step 6 – Import ova hard drive
just run this command for each disk
qm importdisk <proxmox_vm_id> disk_number.vmdk storatename -format <qcow2, raw>
for example i want to import file test-disk002.vmdk into virtual machine 905, using storage new_disk that support qcow2
qm importdisk 905 test-disk002.vmdk new_disk -format qcow2
step 7- Configure boot disk in proxmox
On proxmox in virtual machine hardware setting click in unusued hard drives and configure storage, Virtio SCSI, ide, sata, Virtio Block , in my case i will use Virtio SCSI.
step 8- Install Guest agent
yum install epel-release yum install qemu-guest-agent
step 9- Remove ova and hard disk
in your proxmox host just run
cd /var/lib/vz rm *.ovf *.ova *.mf *.vmdk
if you need help we can provide it in a competitive price