i have a cluster with some ESX in it. since VM may be float from ESX to ESX? is there any script that i can get the current host whom run/host the VM? or is there any config file record this?
If you don't want to use the information provided by virtual center, there several ways to get this infomration scriptes e.g. using vmware-cmd.
This one might help: http://communities.vmware.com/thread/47823
Kind Regards,
Gerrit Lehr
If you found this or other information useful, please consider awarding points for "Correct" or "Helpful".
thanks for reply. i have vCenter, so maybe some easier script to get what i want. i use vcbVmName to connect to vCenter, i get all VMs, but no ESX host information
Use PowerShell or other scripting tools.
There are a lot of documentation and examples.
Andre
**if you found this or any other answer useful please consider allocating points for helpful or correct answers
powershell seems like a windows tool. is there ony script tool in linux(COS)?
it is a windows tool indeed. what do you need? a Linux tool or do you want to use the VMware service console?
you could use the RCLI to access every host and do a list. Or even perl.
Duncan
VMware Communities User Moderator | VCP | VCDX
-
If you find this information useful, please award points for "correct" or "helpful".
powershell seems like a windows tool. is there ony script tool in linux(COS)?
PowerShell is a scripting language. Ok is for Windows. You can use Perl or Python
With the correct language extension (using VMware API) you can have specific command for manage VM, ESX, VC, ...
Sometimes this command are more powerful than the "native" COS command.
Andre
**if you found this or any other answer useful please consider allocating points for helpful or correct answers
as you mentioned, can I use the perl or python method in COS? What package should be installed at first?
OK, what I need is writing some script in COS. Say I have a cluster with 4 ESX. I want to deploy backup software, but my backup windows is small.
If I using VCB proxy method, since the backup software can only do one backup at a time, the time can’t fit the window. I want to install the backup client in each ESX COS, so I can do simultaneous backup. Before backup begin, I want to suspend the VM to keep the file consistency. But the VM, you know, can be vmotion to any ESX.
I try vmware-cmd, but this command need a parameter that where the VM reside. This is my requirement. So RCLI is not a option. Yes I can use vmware-cmd to qurey every host, but Is there any method more convenient?
as you mentioned, can I use the perl or python method in COS? What package should be installed at first?
You do not need to write this script and run from COS. Can run also from an external system (or also a VM).
For information on the Perl API:
http://www.vmware.com/support/developer/viperltoolkit/
Andre
**if you found this or any other answer useful please consider allocating points for helpful or correct answers