Wednesday, February 7, 2018

Proxmox Backup to VirtualBox

When you backup a virtual host on a Proxmox VE, it is quite likely that you get a file named
something.vma.lzo . This happens to be an image packed twice. To unpack it one should call
  lzop -d a.c.lzo
Then
  vma extract  
But how can I get the vma command? It happens to be a Proxmox internal format. Fortunately a well built docker image is here to help:
  git clone https://github.com/ganehag/pve-vma-docker.git
  [sudo ]docker build -t vmaconverter .
  [sudo ]docker run -it -v [mydir]:/backup vmaconverter:latest /bin/bash
  vma extract ./file.vma -v ./vmaextract
As the last step the raw image will be converted to VirtualBox image:
  qemu-img convert vmaextract/disk-drive-scsi0.raw -O vdi disk.vdi
Cool.