An Expriment: Exporting from Virtualbox on OSX and Importing into VMWare ESX

The OVF standard specifies file formats for converting from one virtual environment to another. As part of my work, I run a small VMWare cluster. I use OSX as my workstation, and Remote Desktop as a client when I need to manage the vShpere machine. I find that the remote vSphere console of command line Linux servers to be a little flaky – I get random keystroke repeats, and I can’t copy-paste. This makes the intitial configuration of a remote server difficult.

I thought that I would try something a little different: I’ll set up a new server on my Mac, under VirtualBox and then exprt it into OVF and re-import it. Simple.

Unfortunately, it’s not that easy. the different virtualisers (? what’s the collective noun for a group of different hypervisors?) have different requirements, specifically in the type of virtual devices that they support.

Overview

The process is as follows:

  1. Create and configure the new server locally on your Mac, under VirtualBox.
  2. Export it to an OVF format with the .ovf file extenstion.
  3. Edit the created .ovf file in a text editor. I use Textwrangler for basic, pure text based work.
  4. Save the .ovf file and the .vmdk files on the vShpere server
  5. Import them into VMWare
  6. Edit the networking hardware – add a NIC
  7. Save it and start.

Overall, the process is (maybe) a little faster than just building the new server on VMWare  cluster directly. So, for my purposes, not worth it.

Thanks to http://www.itsecurenet.com/virtualbox-ova-to-vsphere-ovf/ for the basic ideas. His process is a little old and seems more complex than mine. Maybe I’m missing something!

Here we go. Export the Appliance from Virtualbox

here we go. export the appliance from virtualbox

Choose the machine and select [Expert Mode]

Because, afterall, we’re professionals.

choose the machine and select expert mode]

Expert Mode

Several things to change here. Feel free to modify the Appliance settings however you like, I don’t think that it matters too much. The critical thing is that you change the file name extension from .ova to .ovf. (1) This tells VirtualBox that you want to export into several files. Note that I have NOT selected the ‘Write Manifest file’ checkbox (2). Selecting this writes a checksum to a file so that the importing machine can ensure the integrity of the imported file. The problem is that we are going to modify a file after the export, so we’ll need to re-caclulate the checksum. We can avoid this entire step by leaving this unchecked.

NOTE that if you are likely to want to share the exported file and / or put it into ‘real’ production, it’s probably worth the effort to caclulate the checksum.

expert mode

Chug-a-Lug

chug-a-Lug

The two exported files.

the two exported files

Edit the .ovf file

Find the line with ‘virtualbox-2.2’

edit the .ovf file

Edit the .ovf file

Replace that with ‘vmx-08’ (I’m running VMWare 5.5)

edit_the_ovf_file_1

Edit the .ovf file – Find the sataController Item

In my .ovf file the Item starts on line 67

edit the ovf file find the satacontroller item

Edit the .ovf file – Replace the sataController Item

With SCSI references. Thanks IT Secure.

edit the ovf file replace the satacontroller item

Code

<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>

Edit the .ovf file – Delete the Sound Item

Delete this section

edit the ovf file delete the sound item

Edit the .ovf file – Delete the Network Item

Delete

edit the ovf file delete the network item

Edit the .ovf file – Delete the <Network> Element

Delete the entire element. In my file, it is from line 144 to 213.

edit the ovf file delete the it network gt element

Copy your files onto the vSphere server and in the vSphere Client

Deploy OVF Template.

copy your files onto the vsphere server and in the vsphere client

Follow the bouncing ball…

Open your ovf file and follow the prompts.

follow the bouncing ball

When it comes to the Network Mapping Step

Just accept the defaults. Then keep Nexting.

when it comes to the network mapping step

Once it’s finished importing, locate it

And edit it

once it s finished importing locate it

Add a device

add a device

Select ‘Ethernet Adapter’

select ethernet adapter

Select the type

Make it Type E1000 (1) and select the network that it will be attached to (2)

select the type

Finish

Save it and start it.

NOTE It took quite a long time to start. Just be patient.

finish

Questions / Comments?

Feel free to contact Damian.