Oracle(former Sun) VirtualBox provides virtualization solution without much hassle and requires almost no initial knowledge about virtualization technologies, but it isn’t designed for an enterprise usage. It just lacks the same flexibility and the features of VMWare. Sadly, migration from one application to the other isn’t straightforward. I stumbled upon two good resources on this subject. First guide is somewhat outdated, but it outlines the parts which need to be changed. Second link gave me an insight into the problem and I was able to solve everything else.
First, virtual machine needs to be exported into OVF format. You can easily do this with Export Appliance wizard(“File”->”Export Appliance” in the VirtualBox Manager). Be sure to select the “Write legacy OVF” checkbox. You don’t need a manifest file. Anyway, exportation will take a while. In the end, you will have two files: your_appliance.ovf and your_appliance.vmdk. You need to open OVF file in your text editor of choice and change OVF format:
Now you need to change the Virtual System Type parameter to
Now you will need to rearrange the elements, because VirtualBox writes them in somewhat random order and VMWare is very strict on this subject. In all the cases, elements should be arranged in the following order:
- ResourceSubType (if applicable)
CPU and memory both have
VirtualQuantity parameter. It should be the last. Memory has also
AllocationUnits element; it goes before
Address goes before
BusNumber for the ide/scsi/usb controllers.
Connection go in this order for Ethernet adapter(s).
HostResource goes before
Parent for a disk.
AddressOnParent second for the disks and cdroms. I know, it looks complicated, but you can always do this by trial and error.
Next step is to change sound card’s ovf settings:
<Item ovf:required="false"> <rasd:Caption>sound</rasd:Caption> <rasd:Description>Sound Card</rasd:Description> <rasd:InstanceId>9</rasd:InstanceId> <rasd:ResourceType>35</rasd:ResourceType> <rasd:ResourceSubType>ensoniq1371</rasd:ResourceSubType> <rasd:AutomaticAllocation>false</rasd:AutomaticAllocation> <rasd:AddressOnParent>3</rasd:AddressOnParent> </Item>
VMWare dislikes SATA controllers. Convert SATA to SCSI(Instance Id needs to be unique for all the elements):
<Item> <rasd:Caption>scsiController0</rasd:Caption> <rasd:Description>SCSI Controller</rasd:Description> <rasd:InstanceId>12</rasd:InstanceId> <rasd:ResourceType>6</rasd:ResourceType> <rasd:ResourceSubType>lsilogic</rasd:ResourceSubType> <rasd:Address>1</rasd:Address> <rasd:BusNumber>1</rasd:BusNumber> </Item>
Now change your disk’s parent element to ID of SCSI controller:
<Item> <rasd:Caption>disk1</rasd:Caption> <rasd:Description>Disk Image</rasd:Description> <rasd:InstanceId>11</rasd:InstanceId> <rasd:ResourceType>17</rasd:ResourceType> <rasd:HostResource>/disk/vmdisk1</rasd:HostResource> <rasd:Parent>12</rasd:Parent> <rasd:AddressOnParent>0</rasd:AddressOnParent> </Item>
Now you are ready for the final step. Download and install OVF Tool . Registration is required for this, but you should have it already anyway. Now simply run in the command line:
ovftool Your_appliance.ovf vi://username@host:443/
Where username is your vSphere login and host is the hostname. You will be asked for password and after that the final conversion will start shortly.
That’s it. You should be able to manage your new virtual machine via vSphere Client as usual. I hope that this step by step guide was useful.
P.S. I tested everything with VirtualBox version 4.1.8 and VMWare ESXi 5.0.0.