using the below script to power off my vApp, save it, and power it back on. problem is it is not saving to the correct Storage Profile that the Catalog is set to use Is this a bug?
connect-CIServer -Server vcd01 -User 'admin' -Password 'pass'
$myVApp = Get-CIVApp -Name 'test save'
$myVApp = Stop-CIVApp -VApp $myVApp -confirm:$false
$myCatalog = Get-Catalog -Name 'Catalog-LUN5'
$myOrgVdc = Get-OrgVdc -Name 'Sales vDC'
New-CIVAppTemplate -Name '20150421_test-save' -VApp $myVApp -OrgVdc $myOrgVDC -Catalog $myCatalog
$myVApp = Start-CIVApp -VApp $myVApp
Thread moved to the vCloud Director PowerCLI community.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
still having issues. if i disable the profile that it is using incorrectly, i am not getting the error below. anyone know where this info may be kept? no where to specify storage policy. the storage policy is set correctly on the catalog and set correctly on all the vms.
-------------------------------------------------------
PowerCLI C:\scripts> .\SaveToCatalog.ps1
Name User Org
---- ---- ---
vcd01 admin System
New-CIVAppTemplate : 5/13/2015 9:54:09 AM New-CIVAppTemplate Storage policy "[com.vmware.vcloud.entity.vdcstorageProfile:85d69bb7-3ea2-4034-8385-193228e02a9a]" is
disabled and cannot be used for provisioning operations.
At C:\scripts\SaveToCatalog.ps1:6 char:1
+ New-CIVAppTemplate -Name '20150421_test-' -VApp $myVApp -OrgVdc $myOrgVDC -C ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [New-CIVAppTemplate], VimException
+ FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.Cloud.Commands.Cmdlets.NewCIVAppTemplate