ESXi 5.1 : Fixing ‘Failed to deploy OVF package: The task was canceled by a user.’

Where I work, we love using OVA templates to speed up our deployment of virtual machines. I recently upgraded one of my servers to ESXi 5.1 (which also required an update to vSphere). ESXi 5.1 provides support for Windows 8 and Server 2012, which is incredibly useful. However, whilst building OVA templates for these operating systems, I stumbled across an issue.

I ran through the ‘New Virtual Machine’ wizard, selecting Windows 8 (or Server 2012), leaving all settings default. Installed my operating system, and made the required customisations, shutdown the machine and exported an OVA template through vSphere – excellent, how easy!

However, whilst trying to re-deploy the OVA to the ESXi 5.1 host, through the ‘Deploy OVA template’ wizard, it failed immediately after completing the wizard (right before it shows the deployment progress bar). Now, I have a particular hate for misleading error messages, and this one seems to fall right in-to that category -

Failed to deploy OVF package: The task was canceled by a user.

How misleading. I, or any other user, certainly didn’t cancel the task. So what happened? I took a look through the (horrendous) hostd.log on the ESXi box and found absolutely nothing of any value.

Frustrated by the inability to redeploy a template I spent so long preparing, I broke open the OVA template and took a look inside. There were three files with different extensions,

  • .ova – OVF descriptor, written in XML, which describes the hardware requirements
  • .mf – contains SHA1 checksums of the .OVA and .VMDK
  • .vmdk – the virtual hard disk for the virtual machine.

I immediately discarded the .mf. If you modify the .ova and don’t update the .mf, it’ll complain that the checksum is invalid. Removing this file seems to prevent vSphere from checking the checksums, which is useful, seeing as we want to poke around the .ova. After fiddling around inside the .ova, I stumbled across the following line…

<rasd:ResourceSubType>vmware.cdrom.iso</rasd:ResourceSubType>

Changing the above line, to read…

<rasd:ResourceSubType>vmware.cdrom.atapi</rasd:ResourceSubType>

…appears to have fixed my deployment issues. Perhaps changing the ‘CD Drive Device type’ in the virtual machine’s settings would’ve fixed it. But by that point, I had already exported the OVA and deleted the source virtual machine.

Hopefully someone will stumble across this one day, and it’ll save them a few hours!

About these ads

187 thoughts on “ESXi 5.1 : Fixing ‘Failed to deploy OVF package: The task was canceled by a user.’

  1. Abhishek May 13, 2014 at 11:17 am Reply

    Thanks man ……… this solution works
    It saved almost a day for me ……

  2. Tan May 16, 2014 at 1:09 am Reply

    Thanks heaps!!! It did save me lot of times. Great finging.

  3. Barry Demchak May 17, 2014 at 9:41 pm Reply

    Big time thanks!

  4. Mark Bailey May 20, 2014 at 11:38 pm Reply

    So just how did you have to “stumble” on this solution!? :) Either way, I’m not worthy… I’m not worthy… I’m not worthy! Now I can go eat dinner and have a glass of wine! :) Thanks!

  5. SuB May 26, 2014 at 10:17 am Reply

    Great! Works Fine.

    I think this problem occurs when export VM which using ISO file in CD-ROM Drive. But the error message in awful. Be careful VMWare please.

  6. Rob Morin June 2, 2014 at 2:26 pm Reply

    This worked great for me, thanks buddy!

  7. Sean D June 13, 2014 at 3:40 am Reply

    Awesome. I knew there was something wrong. In my case when I was untarballing I discovered a data integrity error in the vmdk itself. Redownloaded the 4GB file off our ftp and was good to go after that!

  8. Patrick June 18, 2014 at 9:32 pm Reply

    Saved my behind! Thank you!

  9. GeeK June 25, 2014 at 9:29 am Reply

    Awesome..great info to a noob

  10. Len July 1, 2014 at 2:40 pm Reply

    the .ovf mod to give:

    vmware.cdrom.atapi

    … does not work on ESXi 5.5:

    “Line 48: Unsupported virtual hardware device ‘vmware.cdrom.atapi’.”

    .ovf exported from an VCenter host to Windows7 .ovf, then vmware client app used to attempt deployment to ESXI host

  11. lee July 2, 2014 at 6:13 am Reply

    Thank you! saved my time! it’s works!

  12. Caktus July 4, 2014 at 7:14 pm Reply

    This truly helped me a lot. Thx a lot for posting this hint :)

  13. Jamie GruenerJamie Gruener July 7, 2014 at 7:49 pm Reply

    In my case this was because I forgot to remove the VMware tools .iso before shutting down and creating the template.

  14. Michael July 14, 2014 at 7:09 pm Reply

    This fixed my issue as well. After deleting the .mf and editing the .ova in notepad it worked. You rock!!

  15. Dmytro Shyshchenko July 18, 2014 at 9:54 am Reply

    Thank you, man! You saved my day!

  16. Riaan July 31, 2014 at 11:46 am Reply

    Excellent!!!!!! Thank you.

  17. aubreykloppers July 31, 2014 at 3:28 pm Reply

    Thanx Mate, Excellent solution!

  18. aubreykloppers July 31, 2014 at 3:28 pm Reply

    Reblogged this on cyber7 and commented:
    Excellent Solution!

  19. […] ESXi 5.1 : Fixing ‘Failed to deploy OVF package: The task was canceled by a user.’. […]

  20. Matthew X. Economou August 4, 2014 at 6:14 am Reply

    Thanks a bunch. I still had the original VM so I was able to re-create the OVA after changing the virtual CD/DVD setting.

  21. Potatoegg August 11, 2014 at 11:26 pm Reply

    Thanks for saving me hours on trying to figure it out. Life saver!!!!

  22. Matt August 12, 2014 at 3:00 pm Reply

    A life saver!!

  23. James August 15, 2014 at 11:41 pm Reply

    Saved me quite some time!

  24. Blackwire1217 August 22, 2014 at 8:59 pm Reply

    Excellent, this saved me a bunch of time as my .OVF took 4 hours to export!

  25. dcampbell84 August 26, 2014 at 3:25 am Reply

    THANK YOU SO MUCH!

    I think the other resolution to this would be to click “include mounted ISO files” when you are exporting it.

  26. Ashish Kulshrestha September 5, 2014 at 6:09 am Reply

    Thanks Mate!!! You saved my day

  27. Aamer Hamdani September 8, 2014 at 7:55 am Reply

    Brilliant! it was excellent. Thank you.

  28. Brian September 10, 2014 at 8:04 pm Reply

    Thnx a lot. Helped me a lot. Save me countless of hours.

  29. Chris September 18, 2014 at 3:51 pm Reply

    FYI,

    I know this is old, but this specific issue appears to occur when the OVF was exported while the CD drive was mapped to an existing ISO;

    It doesn’t seem to occur if you disconnect any CD devices from the VM before exporting to OVF.

  30. Claudio September 24, 2014 at 6:12 am Reply

    Well Done! Worked just fine! Thank you for sharing your knowledge!

  31. Chris September 30, 2014 at 8:08 am Reply

    I just had the same issue on 5.5U2 deploying any OVA, including both vShield, and vDP.

    Solution for me was to add all VMware hosts (ESXi, vCenter, vShield Manager vDP) to the Management clients hosts-file.

  32. Matt October 10, 2014 at 2:16 pm Reply

    Thanks for finding this and documenting it. Saved me much messing about whilst investigating VM building with Packer.

    You can just delete the one line in the .mf for the file that you’ve changed – hopefully the vmdk will still be checksummed.

    Regards,
    Matt

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: