Wednesday 31 January 2018

Convert a Virtual Box OVA to VMware OVF and deploy



Back in college and trying to deploy the demo lab machines. Images I got were Virtual Box OVA files that would not deploy direct to ESXi. Trying to import an Virtual Box OVA file into ESXi and I got errors. Disk was incorrect, wrong hardware, didn't know disk size and a few other errors.

Found a few sites describing the methods, but never had a full set of instructions.

Tried for a few hours and came up with the below.


Download the VMware OVFTools, login is needed to access the download (correct link on 31/1/2018)

https://my.vmware.com/group/vmware/details?downloadGroup=OVFTOOL350&productId=352


Run OVFtool in Administrator mode and point it at your old
C:\Program Files\VMware\VMware OVF Tool>ovftool.exe E:\Downloads\Malware\Sniffer\Sniffer.ova E:\Downloads\Malware\SnifferOVF\sniffer.ovf


Open up the folder you converted to
Delete the mf file (Sniffer.mf) and edit the ovf file as follows

Then use a text editor to change the following sections in the .ovf file

Change the hardware to ESX suitable hardware



<vssd:VirtualSystemType>virtualbox-2.2</vssd:VirtualSystemType>

to

<vssd:VirtualSystemType>vmx-08</vssd:VirtualSystemType&gt;




Edit the Drive Type from SATA to a SCSI to suit VMware



<rasd:Address>0</rasd:Address>
<rasd:Caption>sataController0</rasd:Caption>
<rasd:Description>SATA Controller</rasd:Description>
<rasd:ElementName>sataController0</rasd:ElementName>
<rasd:InstanceID>5</rasd:InstanceID>
<rasd:ResourceSubType>AHCI</rasd:ResourceSubType>
<rasd:ResourceType>20</rasd:ResourceType>

to

<rasd:Address>0</rasd:Address>
<rasd:Caption>SCSIController</rasd:Caption>
<rasd:Description>SCSI Controller</rasd:Description>
<rasd:ElementName>SCSIController</rasd:ElementName>
<rasd:InstanceID>5</rasd:InstanceID>
<rasd:ResourceSubType>lsilogic</rasd:ResourceSubType>
<rasd:ResourceType>6</rasd:ResourceType>




Delete the following section for the Sound Card (approx. line 100)

<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>7</rasd:InstanceID>
<rasd:ResourceSubType>ensoniq1371</rasd:ResourceSubType>
<rasd:ResourceType>35</rasd:ResourceType>
</Item>



Then deploy your VM using vCenter/ vSphere Client. This will also deploy the vmdk for you as well.

KCCO

No comments: