VMware’s OVFtool is a command line tool that allows you to convert VMware Virtual Machines to Open Virtualization Format, or OVF. In the latest version, it can also upload VMs to vCloud Director for you as well!

To do this, OVFtool simply requires a source (VMX or OVF), and a destination (a vCloud Locator).

The vCloud locator looks something like this:

As you can see, the vCloud Locator is a URL with all of the information needed to upload your OVF.

Because OVFtool is run from the command line, the simple choice when using Windows is to use the command prompt. Using the Windows command prompt, however, results in errors when uploading to vCloud Director:

ovftool error

(ovftool error)

This is most likely because of the special characters ovftool uses in the URL (&, :, ?, @). If I had to guess, I’d say it’s the ampersand.

I tried quoting out the vCloud Locator several different ways to get it to understand, but resorted to Powershell to save the day once again.

3 $sourceFile "C:jakeMyVM.vmx"
5 $ovftool "C:Program FilesVMwareVMware OVF Toolovftool.exe"
7 $ovftool $sourceFile $vCloudLocator

Powershell treats the characters are part of the string, so we just simply pass the string as a parameter to OVFtool.

Hope this saves someone a headache!

For more OVFtool fun, check out my post on using OVF tool with PowerCLI with your vSphere session!


This blog post was originally posted here.

Blog Post

4 Tips to Prove Your Business Continuity Plan

The value of continuous availability doesn’t only extend to servicing customers. It enables employees to perform their job tasks.

View Blog Post
Blog Post

Best Practices for Leveraging DRaaS: Bluelock Webinar with Guest, Forrester Research

Bluelock's webinar with our guest, Forrester Research, addressed expectations, common concerns and recommendations to navigate the DRaaS selection process.

View Blog Post
Blog Post

Bluelock named a Visionary in 2017 Gartner’s Magic Quadrant for Disaster Recovery as a Service

We’re proud to announce Bluelock has been positioned in the “Visionary” Quadrant for our unique hands-on approach to provide organizations proof of effective recovery.

View Blog Post