Quantcast
Channel: VMware Communities : Discussion List - VMware {code}
Viewing all articles
Browse latest Browse all 2738

A way to get vDS ports for VMs of a certain Host

$
0
0

Hi,

I am trying to get a list of vDS ports that have VMs connected from a certain Host.

I tried using the vDS.FetchDVPortKeys(criteria) with the scope criteria but besides the fact that this criteria is deprecated in 6.0 it is not returning the desired results as only my uplink ports have the Host set as scope, the VM ports have the scope Unset

Is there a fast way to get the list of vDS ports for this VMs in a setup of 150 Host, 9000 VMs, all connected in 5 vDSs?

Thank you,

Alina

            criteria = vim.dvs.PortCriteria()
            criteria.connected = True
            criteria.uplinkPort = False
            criteria.active = True
            criteria.scope = host
            vm_ports = dvs.FetchDVPortKeys(criteria)

Viewing all articles
Browse latest Browse all 2738

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>