There has to be a way to do this that I'm missing. I'm trying to modify attributes on a whole bunch of VMs at the same time from the CLI:
Look! 24 VMs:
$ vmware-cmd --server 10.91.1.1 --username root --password vmware -h 10.91.1.3 -l
/vmfs/volumes/volumes/V-RHEL-01/V-RHEL-01.vmx
/vmfs/volumes/volumes/V-RHEL-02/V-RHEL-02.vmx
/vmfs/volumes/volumes/V-RHEL-03/V-RHEL-03.vmx
…
/vmfs/volumes/volumes/V-RHEL-24/V-RHEL-24.vmx
Let's try and modify them:
$ for i in `seq -w 1 24`; do
CFG="/vmfs/volumes/volumes/V-RHEL-$i/V-RHEL-$i.vmx"
echo $CFG
vmware-cmd --server 10.91.1.1 --username root --password vmware -h 10.91.1.3 "$CFG" setguestinfo memsize 8192
vmware-cmd --server 10.91.1.1 --username root --password vmware -h 10.91.1.3 "$CFG" setguestinfo sched.mem.min 2048
done
results in:
/vmfs/volumes/volumes/V-RHEL-01/V-RHEL-01.vmx
No virtual machine found.
No virtual machine found.
/vmfs/volumes/volumes/V-RHEL-02/V-RHEL-02.vmx
No virtual machine found.
No virtual machine found.
/vmfs/volumes/volumes/V-RHEL-03/V-RHEL-03.vmx
No virtual machine found.
No virtual machine found.
…
I'm running VMware-vSphere-CLI-5.1.0-780721 and ESXi 5.1.
Apparently when the tool DISPLAYS configs, it uses the old path-style format. But when it accepts them it uses the datastore reference:
Not that this actually works! It appears to make the change, but doesn't actually change anything!