Page 1 of 1

Windows Server (2003) and vboxheadless shutdown.

Posted: 10. Apr 2009, 08:40
by borgo1971
Is there a way to gracefully shutdown a VM with windows server 2003 (I think it's the same with other windows server versions), without logging into windows? I'd like to make a shutdown script on our Server (an Apple MacPro with Mac OS X 10.5 Server), to shutdown VirtualBox VM running as vboxheadless daemon.
The problem is that It seems windows server with standard configuration will not accept ACPI signal (correct me If I'm wrong), so I'm looking where (in windows) to enable ACPI signal listening, or to pass another shutdown signal from a Mac command to windows.

Re: Windows Server (2003) and vboxheadless shutdown.

Posted: 10. Apr 2009, 08:58
by TerryE
Another way is to have a watcher process guest-side which monitors a guest property. You can then set this host side to pass messages, such as a shutdown request or to synchronise backups etc. This technique also works in the reverse direction.

Re: Windows Server (2003) and vboxheadless shutdown.

Posted: 10. Apr 2009, 09:49
by borgo1971
TerryE wrote:Another way is to have a watcher process guest-side which monitors a guest property. You can then set this host side to pass messages, such as a shutdown request or to synchronise backups etc. This technique also works in the reverse direction.
Sorry, even I understand what you say, I'm not abele to do It without other indications. I lost most of my windows knowhow in the last few years (about 10, with windows 98, and normally I don't regret it).
The unique way I think I'm able to shutdown windows server 2003 without loggin into, is to install openssh on windows and shutdown windows through an ssh command. But I'm looking for something less invasive.
In the meantime, I saw that windows has a cli shutdown command, but how can I recall It from host? Even through network access...
Other ideas?

Re: Windows Server (2003) and vboxheadless shutdown.

Posted: 10. Apr 2009, 11:35
by Sasquatch
To use the shutdown command through the network, you need a Windows system to give the command from, and a user that has the right privileges to shut it down. The command for that is shutdown, makes sense, doesn't it ;). When you issue a "shutdown -r", it will reboot after 30 seconds. You can modify the time with -t and many other things through the right parameter.
Windows comes with a Telnet server by default, but is not enabled. You can use that instead of SSH, but it's not as safe as everthing is send as plain text.
If you only need to shutdown VB, but not actually wanting the VM to shutdown, you can send the savestate command to the VM instead of the ACPI Powerbutton.

Re: Windows Server (2003) and vboxheadless shutdown.

Posted: 10. Apr 2009, 12:22
by borgo1971
Sasquatch wrote:If you only need to shutdown VB, but not actually wanting the VM to shutdown, you can send the savestate command to the VM instead of the ACPI Powerbutton.
OK, this is seems a good idea :mrgreen:

Re: Windows Server (2003) and vboxheadless shutdown.

Posted: 10. Apr 2009, 18:32
by TerryE
borgo1971 wrote:
TerryE wrote:Another way is to have a watcher process guest-side which monitors a guest property. You can then set this host side to pass messages, such as a shutdown request or to synchronise backups etc. This technique also works in the reverse direction.
Sorry, even I understand what you say, I'm not able to do It without other indications...

I lost most of my windows knowhow in the last few years (about 10, with windows 98, and normally I don't regret it).
If you want to understand what I mean by guestproperty why not read the User guide and search for this, and also search the forum using the google tip. I've done a detailed post on this.

As to you trying to do Windows system administration without Windows know-how, well what can I say?

Re: Windows Server (2003) and vboxheadless shutdown.

Posted: 10. Apr 2009, 21:13
by borgo1971
TerryE wrote:If you want to understand what I mean by guestproperty why not read the User guide and search for this
Because I didn't understand it was explained there: did you say it was there? I mean guestproperty cold be a lot of things not related to virtualbox...
TerryE wrote:and also search the forum using the google tip. I've done a detailed post on this.
OK, google is always a good help, if one knows what to search. And, yes, your post is clear if one knows what guestproperty are, and your previos post are interesting too... But for now, savestate can made the job.
TerryE wrote:As to you trying to do Windows system administration without Windows know-how, well what can I say?
I do what my company ask me to do. My know-how on windows was enough to install and configure windows sever 2003, with terminal server accounts, install and configure the software we needed, and make some software work for terminal service user, even this one that shouldn't. This from guest shutdown without loggin into is my idea that goes beyond... But it's not my job, and I won't go to much beyond (with windows know-how).
On the other side, I talk with software administrators, that should remotely administrate our treasurer software (the company decided to use Windows server for this new, fabulous software that works with terminal service :shock: ), but this software administrator was no able to connect through PPTP vpn that works perfectly (he said it probably doesn't work because we use a VM, and more worse: on Mac!), so I must open and close the port on the firewall every time they want to connect to our windows 2003. I've configured an PPTP account because they didn't know what openvpn is and how to connect; with PPTP they said to use it with other clients. And this are windows system administrators?!
But our great managers said it's a good software with a good support (i guess it's cheap, too). Good for me, I'll say, so I must not put my hands in their crap software.
OK, now I turn back to my job: projecting houses. With my Mac, that just works :mrgreen:

Re: Windows Server (2003) and vboxheadless shutdown.

Posted: 11. Apr 2009, 00:08
by TerryE
You might also look at the MS Sysinternals tool psexec. You can use this to run commands on other machine on you network (in this case, the other machine happen to be a VM).

Re: Windows Server (2003) and vboxheadless shutdown.

Posted: 11. Apr 2009, 11:12
by borgo1971
TerryE wrote:You might also look at the MS Sysinternals tool psexec. You can use this to run commands on other machine on you network (in this case, the other machine happen to be a VM).
But the VM with Windows 2003 is the last and unique Windows machine remained in our company. So thanks for your suggestions, but for now I think we will be happy with our configuration, even we must launch manually the script to save VM state and exit virtualbox before shutting down the host server (in truth it should not happen often). For emergency shutdown (like power failure, UPS overheat, ecc...), I've installed APC network shutdown, and Windows VM shuts down 100 sec. before the host (all client shuts down still before).
All things considered, I think I've done a good job 8)

Re: Windows Server (2003) and vboxheadless shutdown.

Posted: 17. May 2010, 09:22
by coptang
Just been looking for a way to do the same thing and came across this post: http://forums.techarena.in/windows-serv ... 022184.htm

It is possible to enable acpi graceful shutdowbn for server 2003:
HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System

shutdownwithoutlogon reg_dword default is 0 = off put 1 to allow shutdown with pressing power button