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.
The process is as follows:
- Create and configure the new server locally on your Mac, under VirtualBox.
- Export it to an OVF format with the .ovf file extenstion.
- Edit the created .ovf file in a text editor. I use Textwrangler for basic, pure text based work.
- Save the .ovf file and the .vmdk files on the vShpere server
- Import them into VMWare
- Edit the networking hardware – add a NIC
- 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
Choose the machine and select [Expert Mode]
Because, afterall, we’re professionals.
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.
The two exported files.
Edit the .ovf file
Find the line with ‘virtualbox-2.2’
Edit the .ovf file
Replace that with ‘vmx-08’ (I’m running VMWare 5.5)
Edit the .ovf file – Find the sataController Item
In my .ovf file the Item starts on line 67
Edit the .ovf file – Replace the sataController Item
With SCSI references. Thanks IT Secure.
<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 Network Item
Edit the .ovf file – Delete the <Network> Element
Delete the entire element. In my file, it is from line 144 to 213.
Copy your files onto the vSphere server and in the vSphere Client
Deploy OVF Template.
Follow the bouncing ball…
Open your ovf file and follow the prompts.
When it comes to the Network Mapping Step
Just accept the defaults. Then keep Nexting.
Once it’s finished importing, locate it
And edit it
Add a device
Select ‘Ethernet Adapter’
Select the type
Make it Type E1000 (1) and select the network that it will be attached to (2)
Save it and start it.
NOTE It took quite a long time to start. Just be patient.
Questions / Comments?
Feel free to contact Damian.