hello!
I have following problem.
I have a shell-script and want to get all IDs and Names of virtual machines: for i in `vmware-vim-cmd vmsvc/getallvms | sed '1d' | awk '{print $1":"$2}'`
all is fine, but in my list i get the notes of the machine I have written in Vcenter.
For example:
1000 TESTSERVER1 [Storagename] TESTSERVER1/TESTSERVER1.vmx winNetStandardGuest vmx-07 TESTSERVER this is our testsystem
- built on 2012-01-01
- for testing office
In my "for" I get "this is our testsystem" "- built on 2012-01-01" "- for testing office" as an VirtualMachine.
When I want to ask for the powerstate I get an error, because no correct Id is given.
How can get all VMs without listing the Annotation to the machine?
I hope you understand my problem
thx.
hansi