Wednesday 25 July 2018

VMware OVF tool-How to convert OVA to OVF

ovftool.exe "C:\Users\stanley.chong\Desktop\HoneyDrive_3_Royal_Jelly.ova" "C:\sample_data\HoneyDrive_3_Royal_Jelly.ovf"








Preparing to Import the VM

Once the export is complete you can try deploy the OVA to ESXi but you will receive the following error, "The OVF package requires unsupported hardware. Details: Line 25: Unsupported hardware family 'virtualbox-2.2'.".

 

 

 

 

 

 

Make a backup copy of the OVF file and then open the OVF file with a text editor such as notepad++.
Change the following line:
 
<vssd:VirtualSystemType>virtualbox-2.2</vssd:VirtualSystemType>

to
 
<vssd:VirtualSystemType>vmx-07</vssd:VirtualSystemType>

After you have made this change, the checksum in the mf file will no longer match. To fix this error, you can just remove the line that references the OVF file. For reference, my file looked like this:
SHA1 (MyVM.ovf)= 15d2f22b24990179e414df556fe4a2e4697caee7

Import the VM

At this point you can try to attach the VM to your VMware box. Open the VMware vSphere client and connect to your host machine. Now choose file "Deploy OVF Template". Select the OVF file you just edited and click next. Make sure to select the OVF file, not the original OVA file.
At this point, you may receive a hardware error: "The OVF package requires unsupported hardware. Details: Line 74: OVF hardware element 'ResourceType' with instance ID '6'. No support for the virtual hardware device type '35'."


To fix this error, open the OVF file and remove the <item> element at the line # in question. In this case it was the sound card:
    <Item>
        <rasd:AddressOnParent>3</rasd:AddressOnParent>
        <rasd:AutomaticAllocation>false</rasd:AutomaticAllocation>
        <rasd:Caption>sound</rasd:Caption>
        <rasd:Description>Sound Card</rasd:Description>
        <rasd:ElementName>sound</rasd:ElementName>
        <rasd:InstanceID>6</rasd:InstanceID>
        <rasd:ResourceSubType>ensoniq1371</rasd:ResourceSubType>
        <rasd:ResourceType>35</rasd:ResourceType>
    </Item>
After you have made these adjustments to the OVF, try to load the file again. If you happened to leave the select OVF window open, you may not be able to select the OVF file from the browse or the drop down list selector. Just cancel and try again.