In the web client, under a host, we can see under PCI Devices if one or multiple VMs are attached to it. The field is called "VMs Using this".
I have been going thru the API explorer but unable to find a way so far to do the same with Orchestrator - to find out if a host PCI device is in use by any VM or not. Is this possible?
If anyone's interested, this is the solution;
var devices = host.configManager.graphicsManager.graphicsInfo;
for each (device in devices) {
if (device.pciId.match("46")) {
System.log(device.vm);
}
}
If anyone's interested, this is the solution;
var devices = host.configManager.graphicsManager.graphicsInfo;
for each (device in devices) {
if (device.pciId.match("46")) {
System.log(device.vm);
}
}