Deploy a Virtual Machine from Oracle VirtualBox to VMware ESXi 5.5+
If you've recently attempted to deploy an .ova
straight from VirtualBox to VMware ESXi, you're probably familiar with the "this OVF package requires unsupported hardware" error.
This article provides a step-by-step procedure for exporting virtual machines from Oracle VirtualBox, and deploying them to VMware ESXi 5.5 (and above) without any hardware compatibility issues.
#1. Export the VM to OVA with VirtualBox
Begin by exporting the virtual machine using VirtualBox (File > Export Appliance and select the machine you want to export.) This'll create an .ova
file in your chosen directory.
Ensure Open Virtualization Appliance 1.0 is selected (selected by default) to prevent unsupported
StorageItem
errors when deploying to VMware ESXi.
#2. Convert to OVF with VMware's ovftool
Next, convert the .ova
file to an .ovf
package using VMware's Open Virtualisation Format Tool (ovftool.)
You can download this tool directly from VMware by following this link (requires an account.) Register or sign in, select the respective version for your OS, and follow the installation guide. Verify the installation with:
sh> ovftool.exe --versionVMware ovftool 4.6.0 (build-21452615)
We can then convert the file to an .ovf
package like so:
sh> ovftool.exe --lax path/to/source.ova path/to/destination.ovfOpening OVA source: source.ovaOpening OVA target: destination.ovfWriting OVF package: destination.ovfDisk progress: 1%
Once the conversion is complete, you'll get three new files in your chosen path. An .ovf
descriptor file, a .vmdk
virtual disk file, and a .mf
manifest file.
#3. Edit the OVF's Descriptor File
Let's crack open the .ovf
file in a text-editor so we can make a few changes. Using a default editor like Notepad will suffice here.
First, replace the VirtualSystemType
from virtualbox-2.2
to vmx-10
:
xml<vssd:VirtualSystemType>vmx-10</vssd:VirtualSystemType>
If you're using an earlier or later version of ESXi, see this post for the respective virtual hardware version. ESXi 5.5 supports up to
vmx-10
.
Next, replace the SATA Controller with SCSI. Look out for the following container...
xml<Item> <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></Item>
... and replace it with the following:
xml<Item> <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></Item>
Lastly, make the sound card optional by adding ovf:required="false"
in the <Item>
tag:
xml<Item ovf:required="false"> <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>
Save and exit to apply the changes.
#4. Update the SHA-256 Key
Since we've made changes to the .ovf
file, we'll need to update the SHA-256 value in the manifest file.
*nix users can use sha256sum
to generate the new hash value, for example:
sh$ sha256sum path/to/source.ovf120d430aaa2118951c5fccf3a817a6d1e150b3afda1ee054d10965fcadd52610 source.ovf
For Windows users, the quickest way to do this is by using PowerShell's Get-FileHash
to generate the hash. Open PowerShell and run:
sh> Get-FileHash -Algorithm SHA256 path/to/source.ovf
Algorithm Hash Path--------- ---- ----SHA256 120D430AAA2118951C5FCCF3A817A6D1E150B3AFDA1EE054D10965FCADD52610 ...
You can also use Microsoft's File Checksum Integrity Verifier (fciv), a command-line utility for generating and validating checksums.
Once you have the key, open the .mf
file in a text-editor and replace the existing .ovf
value with the new one. Again, save and exit to apply the change.
#5. Convert OVF to OVA with VMware's ovftool
The last step is to convert our .ovf
package back to an .ova
file. Once again, we can use ovftool to do this.
sh> ovftool.exe --lax path/to/source.ovf path/to/destination.ovaOpening OVF source: source.ovfThe manifest validatesOpening OVA target: destination.ovaWriting OVA package: destination.ovaDisk progress: 1%
You can now deploy your machine to VMware ESXi without any hardware issues.