VMware Cloud Community
jarushepic
Enthusiast
Enthusiast

Determine if VcVirtualMachine is SRM copy?

I'm trying to output an inventory of VMs and I'd like to ignore VMs that are the SRM copy.  In other words, I don't want to count VMs in the secondary datacenter.

Reply
0 Kudos
1 Reply
jarushepic
Enthusiast
Enthusiast

I found a rather hacky way to do it for now, but am still interested if there is a flag out there.

Right now, i'm doing:

if (vm.config.files.vmPathName.indexOf('-tmp.vmx') != 1)

{

     // must be SRM copy

}

Reply
0 Kudos