vmware / PowerCLI-Example-Scripts

http://blogs.vmware.com/powercli
Other
754 stars 603 forks source link

Start-HVPool - ParentVM Null value #411

Open johnak1983 opened 3 years ago

johnak1983 commented 3 years ago

Was using this to automatically refresh pools nightly. It stopped working when we update to 7.11 on our horizon platform. When running the PowerCLI/PowerShell script manually, it errors out about parentvm being null. When I grab the json output and convert it, I can see the attribute is indeed null.

Any idea what is causing this?

Thank you in advance.

I can read the parentvm attribute from ADLDS info and it brings back a value, Horizon admin gui also states a parentvm value. $test = Get-ADObject -SearchBase "CN=$poolname,OU=Server Groups,DC=vdi,DC=vmware,DC=int" -Server localhost:389 -Filter -Properties $parentvm = $test.'pae-SVIVmParentVM'

$parentvm then has a value... albeit, incorrect i think as it's a /vm/datacentre/host/vmname value. instead of just "vmname"

johnak1983 commented 3 years ago

Cannot find an overload for "BaseImageVm_List" and the argument count: "1". At C:\Program Files\WindowsPowerShell\Modules\VMware.HV.Helper\VMware.HV.Helper.psm1:8027 char:10

Exception calling "BaseImageSnapshot_List" with "1" argument(s): "ExceptionType : VMware.Hv.UnexpectedFault ErrorMessage : Unexpected exception while fetching VM snapshots from the virtual center. CauseString : com.vmware.vdi.adamwrapper.exceptions.VCServerException: The object 'vim.VirtualMachine:vm-1277' has already been deleted or has not been completely created CauseStackTrace : System.String[] ErrorCode : ErrorAttributes : " At C:\Program Files\WindowsPowerShell\Modules\VMware.HV.Helper\VMware.HV.Helper.psm1:8031 char:10

johnak1983 commented 3 years ago

$parentvariables.AutomatedDesktopSpec.virtualCenterProvisioningSettings.VirtualCenterProvisioningData

datacenter : /Test parentVm : hostOrCluster : /Test/host/Test Cluster resourcePool : /Test/host/Test Cluster/Resources/TestStudent-A snapshot : vmFolder : /Test/vm template :