{"id":2656,"date":"2018-08-04T16:12:17","date_gmt":"2018-08-04T21:12:17","guid":{"rendered":"http:\/\/osric.com\/chris\/accidental-developer\/?p=2656"},"modified":"2018-08-04T16:12:17","modified_gmt":"2018-08-04T21:12:17","slug":"vcenter-6-x-unable-to-deploy-template","status":"publish","type":"post","link":"https:\/\/osric.com\/chris\/accidental-developer\/2018\/08\/vcenter-6-x-unable-to-deploy-template\/","title":{"rendered":"vCenter 6.x: Unable to deploy template"},"content":{"rendered":"<p>I had a VM on vSphere 5.5 that I was trying to move to a new ESXi 6.7 host via vCenter.<\/p>\n<p>First I exported the OVF template from vSphere 5.5.<\/p>\n<p>Then in vCenter, on the vSphere 6.7 host, I deployed the OVF template.<\/p>\n<p>Error!<\/p>\n<pre><code>The \"Deploy OVF template\" operation failed for the entity with the following error message.\r\n\r\nUnable to deploy template.<\/code><\/pre>\n<p>The error was vague. Why was it unable to deploy the template? Is there a compatibility issue between 5.5 and 6.7?<br \/>\n<!--more--><\/p>\n<p>I looked at the files from the 5.5 export:<\/p>\n<ul>\n<li>CentOS7.mf<\/li>\n<li>CentOS7.ovf<\/li>\n<li>CentOS7-disk1.vmdk<\/li>\n<\/ul>\n<p>The .mf file is apparently a <em>manifest<\/em> and appears to contain SHA1 hashes of the .ovf and .vmdk files.<\/p>\n<p>I created a new VM in vCenter 6.7 and exported it. The files:<\/p>\n<ul>\n<li>CentOS7.mf<\/li>\n<li>CentOS7-2.iso<\/li>\n<li>CentOS7-1.vmdk<\/li>\n<li>CentOS7-3.nvram<\/li>\n<li>CentOS7.ovf<\/li>\n<\/ul>\n<p>The .mf file appears to contain SHA256 hashes of the other 4 files.<\/p>\n<p>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.<\/p>\n<p>It failed again! But it returned a different message this time:<\/p>\n<pre><code>Failed to deploy OVF package.\r\n\r\nCause:\r\nThe object or item referred to could not be found.\r\nThe specified object \/CentOS7\/VirtualIDEController1:0 could not be found.<\/code><\/pre>\n<p>I modified the VM in vSphere 5.5 and removed (disconnected) the CD-ROM drive. I exported the OVF again.<\/p>\n<p>I tried importing the OVF file, and <em>voila<\/em> &#8212; it worked!<\/p>\n<p>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&#8217;t want to wait 4+ hours on another OVF export. Is there a way to do this without re-exporting the OVF?<\/p>\n<p>I opened up the .ovf file in a text editor and found 2 IDE controllers:<\/p>\n<pre><code>&lt;Item&gt;\r\n  &lt;rasd:Address&gt;1&lt;\/rasd:Address&gt;\r\n  &lt;rasd:Description&gt;IDE Controller&lt;\/rasd:Description&gt;\r\n  &lt;rasd:ElementName&gt;VirtualIDEController 1&lt;\/rasd:ElementName&gt;\r\n  &lt;rasd:InstanceID&gt;4&lt;\/rasd:InstanceID&gt;\r\n  &lt;rasd:ResourceType&gt;5&lt;\/rasd:ResourceType&gt;\r\n&lt;\/Item&gt;\r\n&lt;Item&gt;\r\n  &lt;rasd:Address&gt;0&lt;\/rasd:Address&gt;\r\n  &lt;rasd:Description&gt;IDE Controller&lt;\/rasd:Description&gt;\r\n  &lt;rasd:ElementName&gt;VirtualIDEController 0&lt;\/rasd:ElementName&gt;\r\n  &lt;rasd:InstanceID&gt;5&lt;\/rasd:InstanceID&gt;\r\n  &lt;rasd:ResourceType&gt;5&lt;\/rasd:ResourceType&gt;\r\n&lt;\/Item&gt;<\/code><\/pre>\n<p>There was also a floppy drive, but I noticed it included an <code>ovf:required=\"false\"<\/code> attribute:<\/p>\n<pre><code>&lt;Item ovf:required=\"false\"&gt;\r\n  &lt;rasd:AddressOnParent&gt;0&lt;\/rasd:AddressOnParent&gt;\r\n  &lt;rasd:AutomaticAllocation&gt;false&lt;\/rasd:AutomaticAllocation&gt;\r\n  &lt;rasd:Description&gt;Floppy Drive&lt;\/rasd:Description&gt;\r\n  &lt;rasd:ElementName&gt;Floppy 1&lt;\/rasd:ElementName&gt;\r\n  &lt;rasd:InstanceID&gt;10&lt;\/rasd:InstanceID&gt;\r\n  &lt;rasd:ResourceSubType&gt;vmware.floppy.remotedevice&lt;\/rasd:ResourceSubType&gt;\r\n  &lt;rasd:ResourceType&gt;14&lt;\/rasd:ResourceType&gt;\r\n&lt;\/Item&gt;<\/code><\/pre>\n<p>First I tried added the <code>ovf:required=\"false\"<\/code> attribute to the existing IDE Controller items.<\/p>\n<p>In the <em>Deploy OVF Template<\/em> dialog, between step 3 &#8220;Select a compute resource&#8221; and step 4 &#8220;Review details&#8221; there is a &#8220;Validating&#8221; step that failed with the following error message:<\/p>\n<pre><code>The checksum(s) from the provided manifest file do not match the content of file(s): CentOS7.ovf.<\/code><\/pre>\n<p>The manifest (<code>CentOS7.mf<\/code> in this case) is optional. I tried again, this time including just <code>CentOS7.ovf<\/code> and <code>CentOS7.vmdk<\/code>.<\/p>\n<p>It passes the validation step, but still fails! The error message is the same:<br \/>\n<code>The specified object \/CentOS7\/VirtualIDEController1:0 could not be found.<\/code><\/p>\n<p>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:<\/p>\n<pre><code>Issues detected with selected template. Details: - 77:7:VALUE_ILLEGAL: Value ''4'' of Parent element does not refer to a ref of type DiskControllerReference.<\/code><\/pre>\n<p>I looked in the .ovf file again and found one additional item that referenced the CD-ROM drive:<\/p>\n<pre><code>&lt;Item ovf:required=\"false\"&gt;\r\n  &lt;rasd:AddressOnParent&gt;0&lt;\/rasd:AddressOnParent&gt;\r\n  &lt;rasd:AutomaticAllocation&gt;false&lt;\/rasd:AutomaticAllocation&gt;\r\n  &lt;rasd:ElementName&gt;CD-ROM 1&lt;\/rasd:ElementName&gt;\r\n  &lt;rasd:InstanceID&gt;8&lt;\/rasd:InstanceID&gt;\r\n  &lt;rasd:Parent&gt;4&lt;\/rasd:Parent&gt;\r\n  &lt;rasd:ResourceSubType&gt;vmware.cdrom.iso&lt;\/rasd:ResourceSubType&gt;\r\n  &lt;rasd:ResourceType&gt;15&lt;\/rasd:ResourceType&gt;\r\n&lt;\/Item&gt;<\/code><\/pre>\n<p>After I deleted that, the import worked!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I ran into an error when importing an OVF template from one ESXi host to another. It turned out in my case that an attached IDE device, the CD-ROM drive, caused the problem. You can detach the CD-ROM drive and re-export the OVF template to resolve this, or you can edit the XML .ovf file and remove references to the problematic IDE device manually.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[422],"tags":[427,514,512,513,428],"class_list":["post-2656","post","type-post","status-publish","format-standard","hentry","category-sysadmin","tag-esxi","tag-ovf","tag-vcenter","tag-vmdk","tag-vsphere"],"_links":{"self":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/posts\/2656","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/comments?post=2656"}],"version-history":[{"count":7,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/posts\/2656\/revisions"}],"predecessor-version":[{"id":2723,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/posts\/2656\/revisions\/2723"}],"wp:attachment":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/media?parent=2656"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/categories?post=2656"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/tags?post=2656"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}