Creating a Virtual Machine for vCloud Director
Problem: I’m on a Mac development machine and I needed to create a virtual machine to be uploaded into a VMWare product, specifically vCloud Director. Virtual Box exports are not directly importable into VMWare, and I do not have VMWare Fusion or another VMWare product to develop the VM locally.
Export the VM from Virtual Box into a
.vmdk file. Be sure to set the format to
OVF 1.0. Also, note that you cannot just change the file extension, you need to set the file type when choosing the location of the export.
.ovf to something that is VMWare compatible. Luckily, a coworker had VMWare Workstation and exported a basic VMWare-compatible virtual machine for me to figure things out with.
After some trial and error, this stripped down
.ovf got me what I needed to define a basic server for VMWare vCloud Director:
I needed to copy over these lines:
<File ovf:href="virtual_machine-disk1.vmdk" ovf:id="file1" ovf:size="742708224"/>
<Disk ovf:capacity="30" ovf:capacityAllocationUnits="byte * 2^30" ovf:diskId="vmdisk1" ovf:fileRef="file1" ovf:format="http://www.vmware.com/interfaces/specifications/vmdk.html#streamOptimized" ovf:populatedSize="1864564736"/>
from the Virtual Box’s
.ovf file into the stripped down (or VMWare’s)
I also had to remove this attribute:
If there is a
.mf file be sure to remove the SHA checksum related to the
.ovf since we’ve modified the contents.
While trying to figure out how to upload a Virtual Box export to VMWare vCloud Director, I was side-tracked with these other possibilities that didn’t pan out:
- I tried to unpack, edit the
.ovafile and the repack using
ustarformat thinking that maintaining the
ovafile extension would help. But keeping the
.ovaextension is not necessary.
- I tried to modify the
.ovfto get the virtual machine to work on vCloud, but the amount of differences between Virtual Box’s
.ovffile made it easier to just start with VMWare’s
.ovfand just add in the Virtual Box specifics, such as hard drive attributes.