vCenter 6.x: Unable to deploy template

I had a VM on vSphere 5.5 that I was trying to move to a new ESXi 6.7 host via vCenter.

First I exported the OVF template from vSphere 5.5.

Then in vCenter, on the vSphere 6.7 host, I deployed the OVF template.

Error!

The "Deploy OVF template" operation failed for the entity with the following error message.

Unable to deploy template.

The error was vague. Why was it unable to deploy the template? Is there a compatibility issue between 5.5 and 6.7?

I looked at the files from the 5.5 export:

  • CentOS7.mf
  • CentOS7.ovf
  • CentOS7-disk1.vmdk

The .mf file is apparently a manifest and appears to contain SHA1 hashes of the .ovf and .vmdk files.

I created a new VM in vCenter 6.7 and exported it. The files:

  • CentOS7.mf
  • CentOS7-2.iso
  • CentOS7-1.vmdk
  • CentOS7-3.nvram
  • CentOS7.ovf

The .mf file appears to contain SHA256 hashes of the other 4 files.

I tried importing the OVF package exported from 5.5 again, but this time instead of deploying it directly I first uploaded it as a Content Library template and then tried deploying it from there.

It failed again! But it returned a different message this time:

Failed to deploy OVF package.

Cause:
The object or item referred to could not be found.
The specified object /CentOS7/VirtualIDEController1:0 could not be found.

I modified the VM in vSphere 5.5 and removed (disconnected) the CD-ROM drive. I exported the OVF again.

I tried importing the OVF file, and voila — it worked!

Exporting an OVF is time-consuming through, especially if the VM has a large disk. I ran into this again recently with a 250 GB VM, and I didn’t want to wait 4+ hours on another OVF export. Is there a way to do this without re-exporting the OVF?

I opened up the .ovf file in a text editor and found 2 IDE controllers:

<Item>
  <rasd:Address>1</rasd:Address>
  <rasd:Description>IDE Controller</rasd:Description>
  <rasd:ElementName>VirtualIDEController 1</rasd:ElementName>
  <rasd:InstanceID>4</rasd:InstanceID>
  <rasd:ResourceType>5</rasd:ResourceType>
</Item>
<Item>
  <rasd:Address>0</rasd:Address>
  <rasd:Description>IDE Controller</rasd:Description>
  <rasd:ElementName>VirtualIDEController 0</rasd:ElementName>
  <rasd:InstanceID>5</rasd:InstanceID>
  <rasd:ResourceType>5</rasd:ResourceType>
</Item>

There was also a floppy drive, but I noticed it included an ovf:required="false" attribute:

<Item ovf:required="false">
  <rasd:AddressOnParent>0</rasd:AddressOnParent>
  <rasd:AutomaticAllocation>false</rasd:AutomaticAllocation>
  <rasd:Description>Floppy Drive</rasd:Description>
  <rasd:ElementName>Floppy 1</rasd:ElementName>
  <rasd:InstanceID>10</rasd:InstanceID>
  <rasd:ResourceSubType>vmware.floppy.remotedevice</rasd:ResourceSubType>
  <rasd:ResourceType>14</rasd:ResourceType>
</Item>

First I tried added the ovf:required="false" attribute to the existing IDE Controller items.

In the Deploy OVF Template dialog, between step 3 “Select a compute resource” and step 4 “Review details” there is a “Validating” step that failed with the following error message:

The checksum(s) from the provided manifest file do not match the content of file(s): CentOS7.ovf.

The manifest (CentOS7.mf in this case) is optional. I tried again, this time including just CentOS7.ovf and CentOS7.vmdk.

It passes the validation step, but still fails! The error message is the same:
The specified object /CentOS7/VirtualIDEController1:0 could not be found.

I tried deleting the XML Item elements for the IDE controllers entirely and deploying the OVF again. This time there was a different error during the validation step:

Issues detected with selected template. Details: - 77:7:VALUE_ILLEGAL: Value ''4'' of Parent element does not refer to a ref of type DiskControllerReference.

I looked in the .ovf file again and found one additional item that referenced the CD-ROM drive:

<Item ovf:required="false">
  <rasd:AddressOnParent>0</rasd:AddressOnParent>
  <rasd:AutomaticAllocation>false</rasd:AutomaticAllocation>
  <rasd:ElementName>CD-ROM 1</rasd:ElementName>
  <rasd:InstanceID>8</rasd:InstanceID>
  <rasd:Parent>4</rasd:Parent>
  <rasd:ResourceSubType>vmware.cdrom.iso</rasd:ResourceSubType>
  <rasd:ResourceType>15</rasd:ResourceType>
</Item>

After I deleted that, the import worked!

One thought on “vCenter 6.x: Unable to deploy template”

  1. Very helpful tip to remove the CD drive, but I found another time saver. When re-exporting the OVF, I just cancelled the downloads for the VMDKs. The newly exported OVF (sans CD drive) worked just fine with the previously exported VMDK files.

Leave a Reply

Your email address will not be published. Required fields are marked *