There have been, in the dim and distant past (about 18 months ago!), problems with shutting down and rebooting...
VMs that ran Windows 2003. People were getting that dialog that pops up when ever you power-cycle a Window 2003 machine without shutting it down properly. You know, the one that asks you why the W2K3 had to be shutdown in an ungraceful way... Thankfully, this error was resolved a while ago by a new and improved version of VMware Tools. However, one problem still persists with Windows 2003 and Shutdowns/Reboots
- If you have the Remote Console open with active RDP Sessions
- If you have mstsc.msc open with the X Console option (yes, it is a default) and active RDP Sessions
- It could effect Windows 2003 running Citrix Presentation Server (depending on what method you use to automate the shutdown & reboot process)
- It could effect Windows XP with an RDP Session open
Whatever the scenario, you get a “hard console warning” that goes something like this:
Figure 1: Windows 2003
Figure 2: Windows XP with Service Pack 2 with RDP Enabled and in use
This M$ feature is designed to stop you kicking of users unexpectedly by shutdown servers that have users connected (other wise referred to as The DOH! moment). If you power-off a virtual machine or physical machine there will be no-one there to power it back on. Unless you have a script to handle the power on process (something that is very easy to script using vmware-cmd at the Service Console)
The problem is – that if there is no-one to answer this question. The system tries to power down the virtual machine, and then eventually gives up altogether. The result of this is that an operator has to personally interact with the VM in question choose “yes” to confirm the shutdown or reboot.
One work around is to use M$ tsshutdn command together with a task scheduler to automate power-cycle events that must happen at certain times. For example you power-down the VM at 1.00am to do a “cold” backup at 1.30am.
Your script contain something like this:
tshutdn 0 /powerdown /delay:0
Notice that there are two delay values. The first delay is how long to give the users to logoff… and the second delay is how long to wait after the user have logged off to shutdown the system…Therefore 0 and 0 give no time what so ever – adjust as you see appropriate!
You could decide to add this to C:\Program Files\VMware\VMware Tools\poweroff-vm-default.bat (Please note this script does state inside it “DO NOT modify this file directly as it will be overwritten the next time the VMware Tools are installed”). However, this is a down side – this script is used for power-downs J and reboots L. So if you asked the system to reboot it would run tshutdn and shutdown the VM, not reboot it!
You see this poweroff-vm-default batch file is used by both power-down and reboots.