Hi all,
We are currently implementing VMware Site Recovery Manger 4.1 (SRM).
With the creation of SRM Protection Groups, placeholder VMs are created at the recovery site vCenter.
These VMs cannot be powered on, but show up as normal, Powered Off, VMs in the inventory.
Is there any way to get all placeholder VMs through PowerCLI?
As normal reports on Virtual Machines would report these VMs double (one at each site vCenter server), we would like to exclude the placeholder vms.
Anyone?
Thanks and kind regards,
Harold
Hi hharold
I have the same problem in my SRM Activ-Activ concept. I solved this with a Workarround....
Each Site have a Datastore which is used for the Placeholder-VM's. Site A: Placeholder_Disk_RZ / Site B: Placeholder_Disk_Delta.
Now when i execute a get-vm statement i excluede all VMguests where resides on the Placeholder Disk...
Like this:
Get-VM | sort | where { $_.Harddisks -ne "Placeholder"}
If you like to get all VMguets from both vCenter:
$VC = "vCenterA"
Connect-VIServer $VC
Get-VM | sort | where { $_.Harddisks -ne "Placeholder"}
Disconnect-VIServer -confirm:$false
$VC = "vCenterB"
Connect-VIServer $VC
Get-VM | sort | where { $_.Harddisks -ne "Placeholder"}
Disconnect-VIServer -confirm:$false
I know it's not realy fast... but it works for me.
Let me know if you find a better way.
Greetings
Hoschi
Hello Hoschi,
That would be a good workaround indeed!
Hopefully someone can point us to the attribute that declares a vm to be a placeholder.
This to speed things up.
Thanks for your help.
Did you ever get your answer?
Does anyone know the attribute that would show that the VM is a placeholder?
Unless something has changed recently there is no attribute.
It would be great to have one. It does cause issues with PowerCLI, Orchestrator and other management software.
You could log a call with VMware to confirm there is no attribute and if so get a feature request in.
This link goes over how to do it. I used it and it works well. thanks RvdNieuwendijk
Get-VM | Where-Object {$_.ExtensionData.Config.ManagedBy.ExtensionKey -ne 'com.vmware.vcDr'}