Hi,
For a VC:VirtualMachine, the following code may work (the input parameter is vm😞
for each (var device in vm.config.hardware.device) {
if (device instanceof VcVirtualDisk) {
System.log(device.backing.fileName);
}
}
Now, the question becomes how to get vCAC:VirtualMachine from VC:VirtualMachine. There are several ways to do this; check this thread https://communities.vmware.com/thread/469612 for sample code snippets how it can be done.