[SOLVED] import virtual box VM?

killmasta93

Renowned Member
Aug 13, 2017
979
59
68
31
Hi
i currently trying to import a vm from virtual to proxmox, but im getting this issue

Code:
root@prometheus2:~# qm importovf 167 GSM-TRIAL-21.04.4-VirtualBox.ova local-zfs
GSM-TRIAL-21.04.4-VirtualBox.ova:1: parser error : Start tag expected, '<' not found
GSM-TRIAL-21.04.4-VirtualBox.ovf

so then tried to untar the ova file

Code:
root@prometheus2:~#  tar -xvf GSM-TRIAL-21.04.4-VirtualBox.ova
GSM-TRIAL-21.04.4-VirtualBox.ovf
GSM-TRIAL-21.04.4-VirtualBox-disk001.vmdk
GSM-TRIAL-21.04.4-VirtualBox.mf

then re ran but i got this

Code:
root@prometheus2:~# qm importovf 169 GSM-TRIAL-21.04.4-VirtualBox.ovf local-zfs
warning: unable to parse the VM name in this OVF manifest, generating a default value
invalid host ressource /disk/vmdisk1, skipping

was reading the v2v guides but could not find any documentation

Thank you
 
I would recommend create vm with settings from virtualbox and convert vmdk to raw image:
Code:
qemu-img convert -f vmdk -O raw GSM-TRIAL-21.04.4-VirtualBox-disk001.vmdk /dev/path/to/vm-disk-nnn
 
Last edited:
Hi
i currently trying to import a vm from virtual to proxmox, but im getting this issue

Code:
root@prometheus2:~# qm importovf 167 GSM-TRIAL-21.04.4-VirtualBox.ova local-zfs
GSM-TRIAL-21.04.4-VirtualBox.ova:1: parser error : Start tag expected, '<' not found
GSM-TRIAL-21.04.4-VirtualBox.ovf

so then tried to untar the ova file

Code:
root@prometheus2:~#  tar -xvf GSM-TRIAL-21.04.4-VirtualBox.ova
GSM-TRIAL-21.04.4-VirtualBox.ovf
GSM-TRIAL-21.04.4-VirtualBox-disk001.vmdk
GSM-TRIAL-21.04.4-VirtualBox.mf

then re ran but i got this

Code:
root@prometheus2:~# qm importovf 169 GSM-TRIAL-21.04.4-VirtualBox.ovf local-zfs
warning: unable to parse the VM name in this OVF manifest, generating a default value
invalid host ressource /disk/vmdisk1, skipping

was reading the v2v guides but could not find any documentation

Thank you
I ran into the same problem. Rather than creating the VM manually I fixed the error in the OVF definition, so importovf actually takes it. Seems like importovf is more strict about the format of the file than some other implementations (aka VirtualBox).

The offending section is most likely the harddisk definition (below a sample):
XML:
<Item>
    <rasd:Caption>Harddisk 0</rasd:Caption>
    <rasd:InstanceId>6</rasd:InstanceId>
    <rasdarent>5</rasdarent>
    <rasd:ResourceType>17</rasd:ResourceType>
    <rasd:HostResource>ovf:/disk/disk1</rasd:HostResource>
    <rasd:AllocationUnits>GB</rasd:AllocationUnits>
    <rasd:Reservation>10</rasd:Reservation>
</Item>

In my case, the HostResource definition was missing the reference to the earlier section in the XML, i.e. the "ovf:" bit. After I added that to the OVF, ovfimport worked. (Still needed manual tweaks - but I found it was easier to have the machine create the initial configuration to allow me to get started).

I referred to https://opennodecloud.com/howto/2013/12/25/howto-ON-ovf-reference.html to figure out what was missing in the OVF that made it malformed.