So you have made an awesome system in VMware ESXi and exported it an OVF Template. Later to find that something has gone very wrong and the template will not import and gives you the following error

If you have encountered this it means that your Template was originally created with a ISO image still attached to the device .

By this point you may be thinking that the template is broken. Don’t  worry yet, you still have a chance to fix this and move forward.

One method is to use the OFV Tools from VMware to extract and repackage your OVA Template, or you can use the method I have used (more than once) and turn to our two open source friends; 7-Zip and Notepad++

Here are the steps I normal take to tackle this problem 

Step 1 –  is to extract your ova template (after all its only a zip)

You will notice 3 files once extracted

*.vmdk – is your disk containing all your data

*.ovf  – is the configuration (also the file that we will edit)

*.mf  – is a manifest containing a reference to the vmdk and ovf, also holding a SHA1 hash which ESXi will check for validation.  This file needs to be deleted as we are making a change to the ovf and this will surely break that hash.

Example of what the contents of the .mf file looks like:

SHA1(template.ovf)= 908e804f140ffa58083b8bd154dace330b440c78
SHA1(template-disk1.vmdk)= 29c2d44d908d0207005360dabb58967f01a13c2e

Step 2 – open the *.ovf file with Notepad++ and search for vmware.cdrom.iso

You will notice that this is contained in a blog which looks like this:

Example – just in-case you can see the screenshot above

<Item ovf:required=”false”>
<rasd:ElementName>CD/DVD drive 1</rasd:ElementName>

Remove those lines and save the *.ovf file

Step 3 – Delete the file with the *.mf extension. If this exists ESXi will attempt to validate and throw an error about the templates integrity being invalid

So once this has been deleted you can deploy your OVF Template

I hope these steps help someone  and I am giving a twitter to twitter shout-out to Jonathan Frappier @jfrappier who followed me and one of his posts titled “ProTip – don’t forget to unmount local ISO from your VM before turning it into a template” inspired me to do this little write up.