- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello everyone,
I have PowerCLI script that creates a vm from a content library. The issue that I am running into is that the script
times out with a "The task was canceled by a user."
I think the issue has to do with the Deploy OVF template task not being synchronized with the transfer files task. It takes about 7 minutes for the file transfers to complete so the powercli script times out even though all OVF associated tasks in vCenter are still continuing in the vSphere client. This causes all other steps in my script to fail because the VM is not fully deployed yet.
How can I ensure that the script does not go to the next steps until the OVF has been deployed successfully? Below is the code that
applies to the new vm creation.
$contentLibraryItem = Get-ContentLibraryItem -Name 'WINTMP'
New-VM -Name $vm -ContentLibraryItem $contentLibraryItem -resourcePool $cluster -location $folder -Datastore $datastore -DiskStorageFormat "Thick" -DrsAutomationLevel "Manual" -confirm:$false
I have tried the suggestion from this link but it didn't work.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It might be a long shot, and yes, KB88928 is about exporting, but that resolution in there might help.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Luc! That makes sense.
So is there no way to pause the process until all those tasks are done at the script level?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Not that I know off I'm afraid.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Understood. Thanks for your feedback.