VMware Cloud Community
sant0sk1
Contributor
Contributor
Jump to solution

Safely Powering Down Windows 2003 Servers with Remote CLI

Whenever I execute:

vmware-cmd <cfg> soft

Against Windows 2003 Servers, upon reboot I am greeted with the unfortunate "Shutdown Event Tracker" dialog box. You know, the one where it says "Why did the computer shut down unexpectedly?". The fact is that it did not shut down unexpectedly, but was a planned and scheduled offline backup.

Is there any way to power down Windows servers "safely" so that this message doesn't appear and a nasty error in the system event log doesn't occur?

In adjunct, is there any way to execute a command inside the guest Operating System? I would like to invoke 'tsshutdown' command to power off our terminal server if possible.

Thanks.

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
ceemour
Enthusiast
Enthusiast
Jump to solution

I use vmcontrol.pl myself as I had the same issue

cd "C:\Program Files (x86)\VMware\VMware VI Remote CLI\Perl\apps\vm"

vmcontrol.pl --host fqdn_of_host --url https://ip_of_host:443/sdk/webService --username root --password esx_password --vmname name_of_vm --operation shutdown

vmcontrol.pl --host fqdn_of_host --url https://ip_of_host:443/sdk/webService --username root --password esx_password --vmname name_of_vm --operation poweron

Chris

View solution in original post

0 Kudos
8 Replies
sant0sk1
Contributor
Contributor
Jump to solution

bump.

Anybody have any ideas on this?

0 Kudos
glynnd1
Expert
Expert
Jump to solution

Do you have VMware tools installed within the VM?

0 Kudos
sant0sk1
Contributor
Contributor
Jump to solution

Yes, on all machines that I'm having this problem with.

0 Kudos
glynnd1
Expert
Expert
Jump to solution

What behaviour do you see with:

vmware-cmd /vmfs/volume/vmfslabel/VMName/VMName.vmx stop trysoft

from the ESX command line?

What do see in hte log file from the VMs directory?

0 Kudos
sant0sk1
Contributor
Contributor
Jump to solution

If I run vmware-cmd stop with the 'trysoft' option the server doesn't shutdown at all and the current vmware.log doesn't change at all. If I run vmware-cmd stop with the 'soft' option the machine shuts down and upon reboot I am greeted with the same dialog box.

0 Kudos
sant0sk1
Contributor
Contributor
Jump to solution

bump. Nobody else has this problem/concern? Any work-arounds? anything?

0 Kudos
ceemour
Enthusiast
Enthusiast
Jump to solution

I use vmcontrol.pl myself as I had the same issue

cd "C:\Program Files (x86)\VMware\VMware VI Remote CLI\Perl\apps\vm"

vmcontrol.pl --host fqdn_of_host --url https://ip_of_host:443/sdk/webService --username root --password esx_password --vmname name_of_vm --operation shutdown

vmcontrol.pl --host fqdn_of_host --url https://ip_of_host:443/sdk/webService --username root --password esx_password --vmname name_of_vm --operation poweron

Chris

0 Kudos
sant0sk1
Contributor
Contributor
Jump to solution

@ceemour

That does it, thanks!

0 Kudos