Can anyone tell me the correct way of referencing the following objects in vCli scripts:
vms on host, ipaddresses of vms, mac addresses of vms, cdrom (to see if is connected), cd rom to see if is iso, datastores, networks, if network is connected, scsitype, netcardtype,
Can't find any coherent reference guide (the Managed Object reference documentation does not make sense to me) - really annoying!!!
Any help appreciated.
VirtualMachine->guest->net->ipConfig->ipAddress - Doesn;t work in my script, why?
VirtualMachine->guest->net->ipConfig->macAddress (MAC address of the adapter) - Doesn't work either?
VirtualMachine->config->hardware->device->VirtualCdrom -> val eq connected
VirtualMachine->config->hardware->device->VirtualCdrom-> if ($class->isa('VirtualDeviceConnectInfo'-> filename -eq "$ISOPATH") - no workie
VirtualMachine->runtime->host (Virtual machines running on this host) - muh
VirtualMachine->datastore->vm (Virtual machines stored on this datastore) - muh
VirtualMachine->network->vm (Virtual machines using this network) - how would I do this - what is the path as in XX->XX if ($XX->isa(ZZZ)
VirtualMachine->network->summary->accessible -eq "true"
VirtualMachine->config->hardware->device # Then reference by - if ($class->isa('VirtualSCSIController'))
VirtualMachine->config->hardware->device # Then reference by - if ($class->isa('VirtualEthernetCard'))
VirtualMachine->runtime->powerState->val eq 'poweredOn'
VirtualMachine->network->summary->name -eq "network name"
VirtualMachine->guest->guestFullName