Windows Server (2003) and vboxheadless shutdown.

Discussions about using Windows guests in VirtualBox.

Windows Server (2003) and vboxheadless shutdown.

Postby borgo1971 » 10. Apr 2009, 08:40

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.
borgo1971
 
Posts: 24
Joined: 11. Feb 2009, 18:32
Location: Italy
Primary OS: Mac OS X Leopard
VBox Version: PUEL
Guest OSses: Windows Server 2003

Re: Windows Server (2003) and vboxheadless shutdown.

Postby TerryE » 10. Apr 2009, 08:58

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.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
TerryE
Site Moderator
 
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS

Re: Windows Server (2003) and vboxheadless shutdown.

Postby borgo1971 » 10. Apr 2009, 09:49

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?
borgo1971
 
Posts: 24
Joined: 11. Feb 2009, 18:32
Location: Italy
Primary OS: Mac OS X Leopard
VBox Version: PUEL
Guest OSses: Windows Server 2003

Re: Windows Server (2003) and vboxheadless shutdown.

Postby Sasquatch » 10. Apr 2009, 11:35

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.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Sasquatch
Volunteer
 
Posts: 17800
Joined: 17. Mar 2008, 13:41
Location: /dev/random
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux

Re: Windows Server (2003) and vboxheadless shutdown.

Postby borgo1971 » 10. Apr 2009, 12:22

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:
borgo1971
 
Posts: 24
Joined: 11. Feb 2009, 18:32
Location: Italy
Primary OS: Mac OS X Leopard
VBox Version: PUEL
Guest OSses: Windows Server 2003

Re: Windows Server (2003) and vboxheadless shutdown.

Postby TerryE » 10. Apr 2009, 18:32

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?
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
TerryE
Site Moderator
 
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS

Re: Windows Server (2003) and vboxheadless shutdown.

Postby borgo1971 » 10. Apr 2009, 21:13

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:
borgo1971
 
Posts: 24
Joined: 11. Feb 2009, 18:32
Location: Italy
Primary OS: Mac OS X Leopard
VBox Version: PUEL
Guest OSses: Windows Server 2003

Re: Windows Server (2003) and vboxheadless shutdown.

Postby TerryE » 11. Apr 2009, 00:08

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).
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
TerryE
Site Moderator
 
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS

Re: Windows Server (2003) and vboxheadless shutdown.

Postby borgo1971 » 11. Apr 2009, 11:12

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)
borgo1971
 
Posts: 24
Joined: 11. Feb 2009, 18:32
Location: Italy
Primary OS: Mac OS X Leopard
VBox Version: PUEL
Guest OSses: Windows Server 2003

Re: Windows Server (2003) and vboxheadless shutdown.

Postby coptang » 17. May 2010, 09:22

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
coptang
 
Posts: 8
Joined: 21. May 2009, 18:22
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: XP


Return to Windows Guests

Who is online

Users browsing this forum: Yahoo [Bot] and 9 guests