Saturday 14 May 2016

Importing OVA container into Proxmox (Step-by-Step)

10:32 Posted by Jurgens Krause , , , 9 comments
OVAs are an industry standard, and many appliances are distributed as such. Unfortunately Proxmox does not yet support OVA importing in an easy, user friendly way.

After downloading the OVA you will need to get it on to your server. My preferred way is by using WinSCP, if you are using Linux or OSX, you can use command line scp to do the transfer.



  1. Start up WinSCP and select "SCP" as the file protocol.
  2. Enter the Host name, User name and Password for your Proxmox server.
  3. Click yes
  4. At the security key warning, click "Yes"
  1. In the right hand pane, navigate to /tmp 
  2. Drag and drop the file you want to upload into the tmp folder
Depending on your network and the file size, this step may take a while.

Once the file has been uploaded, connect to the Proxmox server using Putty or your favourite ssh client.

Change into the /tmp directory:
cd /tmp

Extract the OVA file:
tar -xvf *.ova

This should output a couple of files from the OVA container, it should include an OVF file, which is the VM Defenition file, and a VMDK file, which is the actual hard disk image. Again, this may take a while.

Convert the vmdk to a Proxmox compatible qcow2 file:
qemu-img convert -f vmdk RADIUSdesk-2016-4-0-disk1.vmdk  -O qcow2 qcowdisk.qcow2

Run the following command, substituting the correct ovf filename, to get the vm settings:
cat RADIUSdesk-2016-4-0.ovf | grep -e "Memory RAMSize" -e "CPU count" -e "Netw" -e "Disk"

Using the settings from the above command, set up a new VM using the Proxmox web interface, you can make a tiny hard drive, since we will overwrite it.

Run the following command to overwrite the newly created disk image with the one we converted earlier. Remember to substitute the correct filenames:
mv qcowdisk.qcow2 /var/lib/vz/images/115/vm-115-disk-1.qcow2

You can now start the new VM with the imported disk image.

Lastly, remove all the files we created in temp by using "rm filename" for each file.

Job done!!

9 comments:

  1. Do you mind if i use this content for a proxmox / openflixr manual?

    ReplyDelete
    Replies
    1. Feel free, I would appreciate a reference, but not required.

      Delete
  2. Hello, I have a question about multiple disk OVAs. I have an appliance that I am trying to import but when I launch it and it's doing it's initial config it's unable to see the second disk. I can't seem to find much information on how to resolve this.

    ReplyDelete
    Replies
    1. probarly make 2 disks in proxmox VM setup so the config has 2 disks, then rinse and repeat disk image wise. (copy overwriting)

      Delete
  3. Ive followed steps, but there is no virtual drive created under the vz/images directory. Ive even created another VM to test and I cant find where the virtual disk is saved. The images directory is empty

    ReplyDelete
    Replies
    1. I've been reading through the Admin guide and even there they indicate the same directory for virtual machines, but in my case the directory remains empty. We are still testing this service. Could it be because of lvm being enabled?

      Delete
  4. Thank you for this!
    I tried this with RADIUSdesk-64-2017-0-4.ova.

    The VM looked OK at the beginning, but it took long time to initialize the network interfaces...

    More info would be extracted from ovf.

    num of network interfaces, type mac address to keep the original IP address.
    cpu type
    hdd bus type

    More could be considered.

    ReplyDelete
  5. How do we get the virtual machine to create the qcow2 file? I created one, but no such type of file exists for that virtual machine on the drive, so I have nothing to replace with the qcoq2 file I have.

    PS: Delete spam above.

    ReplyDelete
  6. It seems your info is a bit dated.

    I have found: /dev/pve/vm-100-disk-0 which is not a qcow2 file.

    ReplyDelete