I installed UPS monitoring application on one guest vm and now I want to shutdown all virtual machines and then host when power goes off or any specific event occurs.
I installed VMware ESXi 4.0 server as host and different guest VM(Linux,Windows,Unix) on host.Now I want to shutdown all virtual machines which are running on server and then ESXi host.
So how can I do it.
Thanks in advance.
I am newbie in VMware and we need not to use vSphere Command-Line Interface or vMA.
Is there any way that I can fire it from ESXi server?
Thanks for reply.
I have developed it with vMA and able to shutdown as required but now I want to do the same with other option.So please provide me other options which can perform the same task.
I will appreciate if you can provide me the script also.
You could use PowerShell, or just about anything else, to directly access the vCenter API if you're using vCenter I suppose.
OK.. Now If I want to monitor the UPS via ESXi server and when power goes off or any event occers then it should do the following things-
i) shutdown all vm running on ESXi server.
ii) shutdown ESXi host also.
How can I achieve it.
Remember, ESXi doesn't have a kernel, or even an OS, other than a very, very limited tech support console with a scattering of commands which isn't intended to be used to manage the server.
I installed vmware vSphare CLI on guest VM(Windows7) and when I am trying to run--
getting the following error--vicfg-hostops.pl -a poweroff -o shutdown -d Name of your ESXi server -f
'vicfg-hostops.pl' is not recognized as is not recognized as an internal or external command,operable program or batch file.
Last edited by Vanit; 27th October 2010 at 03:37 PM.
vSphere CLI installer installs both the vSphere CLI and vSphere SDK for Perl. So I dont think to install active perl externally.
When I am typing the following command-
and when I am trying to execute other commands like-C:\Program Files\VMware\VMware vSphere CLI\Perl\apps>perl -v
This is perl, v5.8.8 built for MSWin32-x86-multi-thread
(with 50 registered patches, see perl -V for more detail)
Copyright 1987-2006, Larry Wall
C:\Program Files\VMware\VMware vSphere CLI\bin>esxcfg-nas.pl --server ESXi server address here --list
it is working fine and I am also able to see this file in bin directory but I didn't found vicfg-hostops.pl file anywhere in the directory.
Please let me know what is going wrong here and how to resolve it.
Last edited by Vanit; 28th October 2010 at 10:23 AM.
Might be worth reinstalling, or just doing a search to try and make sure the perl script is in the right path.
Thanks a lot for support....As per your suggestion, I reinstall it and now I am able to execute most of the scripts.
but this is useful for shutting down ESXi server from guest VM which is not my requirement.
My requirement is to shutdown all guest from ESXi server and then server itself.so how can I make it?
Last edited by Vanit; 29th October 2010 at 09:06 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)