Skip to content

vmware_ovf Box Format

frapposelli edited this page Sep 26, 2014 · 5 revisions

We recently introduced a new Vagrant Box format called vmware_ovf to our provider suite for VMware that is now comprised of vagrant-vcloud, vagrant-vcenter and the new vagrant-vcloudair.

This Box format is now the preferred and default format for all our providers, legacy vcloud and vcenter boxes format are still accepted but please consider moving to the new format as soon as possible.

Why it matters?

Having a single Box for ALL our VMware providers enables much better portability with less builds and images.

Which version of the Providers supports vmware_ovf?

Boxes built for vmware_ovf are supported starting from:

What's inside the box

The current format for our box is the following:

  • OVF export of a VM (including manifest).
  • Metadata file with {"provider": "vmware_ovf"}.
  • Default Vagrantfile for the box.

A typical export of a vmware_ovf box looks like this:

Vagrantfile
metadata.json
precise32-disk-0.vmdk
precise32.mf
precise32.ovf

What is needed inside the VM?

All the VMs built for vmware_ovf must have VMware Tools installed, that is paramount for the correct behavior of the Vagrant provider.

How can I create one?

The best option is to use Packer, Packer is a tool that enables you to build multiple operating system images from a single source.

We created a post-processor to automatically build vmware_ovf Vagrant Boxes using Packer, the post processor is available on GitHub at gosddc/packer-post-processor-vagrant-vmware-ovf.

If you want to create the VM manually, it can be easily converted to OVF using ovftool that is downloadable from the VMware website.

The recommended command usage is:

ovftool --sourceType=VMX --targetType=OVF source.vmx target.ovf

Please do not use compression while creating the OVF as it is not supported at the moment.