Shutdown and Reboot problem with Windows 2003
There has been in the dim and distant past (about 18 months ago!) there were problems with shutting down and reboot VM’s that ran Windows 2003. People getting that dialog that pops up when ever your power-cycle a Window 2003 machine without shutting down properly – you know the one 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 versions of VMware Tools. However, one problem still persists with this Windows 2003 and Shutdowns/Reboots
- If you have Remote Console open with active RDP Sessions
- If you have mstsc.msc open with 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 a RDP Session open
Whatever the scenario – you get this “hard console warning” 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.





RSS
iTunes