headless-Server doesn't shutdown :-(
-
smartysmart34
- Posts: 101
- Joined: 21. Apr 2008, 20:56
headless-Server doesn't shutdown :-(
Hi all,
I am running a linux host that has a headless-Server on it (Windows). I start the host by running a init-script basivally calling VBoxHeadless -s guestname.
All works fine and the VM comes up.
When I shut down the host by "shutdown -h now" (called via init-Script as well I can see the script running, but the vm stays up. The command issued within the script is
"VBoxManage controlvm guestname acpipowerbutton"
For Minutes over minutes nothing happens. When I connect to that machine via Remotedesktop I can see the screensaver running. As soon as i MOVE THE MOUSE WITHIN THE WINDOW i GET THE "Windows is shutting down"-Popup and the system goes down.
Is there any more reliable way to bring the guest down even if no one is connected?
Regards,
Martin
I am running a linux host that has a headless-Server on it (Windows). I start the host by running a init-script basivally calling VBoxHeadless -s guestname.
All works fine and the VM comes up.
When I shut down the host by "shutdown -h now" (called via init-Script as well I can see the script running, but the vm stays up. The command issued within the script is
"VBoxManage controlvm guestname acpipowerbutton"
For Minutes over minutes nothing happens. When I connect to that machine via Remotedesktop I can see the screensaver running. As soon as i MOVE THE MOUSE WITHIN THE WINDOW i GET THE "Windows is shutting down"-Popup and the system goes down.
Is there any more reliable way to bring the guest down even if no one is connected?
Regards,
Martin
-
Sasquatch
- Volunteer
- Posts: 17798
- Joined: 17. Mar 2008, 13:41
- Primary OS: Debian other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows XP, Windows 7, Linux
- Location: /dev/random
You could use the Save State instead of ACPI PowerButton command. That will save the state of the VM and let you continue where you left it.
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.
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.
-
smartysmart34
- Posts: 101
- Joined: 21. Apr 2008, 20:56
-
smartysmart34
- Posts: 101
- Joined: 21. Apr 2008, 20:56
Sounds good. Last issue:
Is the command to start a machine with saved state identical to the one for a boot from scratch?
If I start the machine locally with VBoxManage the manual states that it does not matter whether the machine was shut down or saved state.
But I am starting with VBoxHeadless and that chapter of teh manual does not specify this issue. Can I still use
"VBoxHEadless -s guestname"
if the guest is in saved state?
Kind regards,
Martin
Is the command to start a machine with saved state identical to the one for a boot from scratch?
If I start the machine locally with VBoxManage the manual states that it does not matter whether the machine was shut down or saved state.
But I am starting with VBoxHeadless and that chapter of teh manual does not specify this issue. Can I still use
"VBoxHEadless -s guestname"
if the guest is in saved state?
Kind regards,
Martin
-
TerryE
- Volunteer
- Posts: 3572
- Joined: 28. May 2008, 08:40
- Primary OS: Ubuntu other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
- Contact:
Yes
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
Google your Q site:VirtualBox.org or search for the answer before posting.
-
smartysmart34
- Posts: 101
- Joined: 21. Apr 2008, 20:56
Well, actually, not THAT great :-(
I just started and stopped the server a couple of times and when logging into the VM I recognised some graphical defects.
I then wanted to reboot the VM from within (Start -> reboot) but it didn't completely finish shutting down. The VBoxHeadless-process was still there.
At the end I had to "kill <pid>" it.
Is this a known issue?
Kind regards,
Martin
I just started and stopped the server a couple of times and when logging into the VM I recognised some graphical defects.
I then wanted to reboot the VM from within (Start -> reboot) but it didn't completely finish shutting down. The VBoxHeadless-process was still there.
At the end I had to "kill <pid>" it.
Is this a known issue?
Kind regards,
Martin
-
TerryE
- Volunteer
- Posts: 3572
- Joined: 28. May 2008, 08:40
- Primary OS: Ubuntu other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
- Contact:
The VM will only exit if the guest OS issues a "Power Off". Reading through the entire topic again, it sounds to me as if the guest Windows OS is hanging before reaching this point. I think most have us have experienced this in the past with various generations of GatesWare. There can be various reasons, mostly driver problems and not nec. MS ones.
If this is the case, then it isn't a VBox issue, as VBox will hang just as real H/W hangs. You can either track down the reason for the stall in Windows shutdown or do as you do with real systems an reach for that power-off (or in this case do a VBoxManage controlvm yourVM poweroff).
The acpipowerbutton send a power-off request to the guest OS, and if this OS is stalling as I described then the power-off won't occur. The poweroff option ignores the guest OS and just pulls the plug. Note that even if the guest OS is stalling, its still worth requesting the power-off through the OS before pulling the plug as this at lest usually means that the file-systems are closed cleanly.
If this is the case, then it isn't a VBox issue, as VBox will hang just as real H/W hangs. You can either track down the reason for the stall in Windows shutdown or do as you do with real systems an reach for that power-off (or in this case do a VBoxManage controlvm yourVM poweroff).
The acpipowerbutton send a power-off request to the guest OS, and if this OS is stalling as I described then the power-off won't occur. The poweroff option ignores the guest OS and just pulls the plug. Note that even if the guest OS is stalling, its still worth requesting the power-off through the OS before pulling the plug as this at lest usually means that the file-systems are closed cleanly.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
Google your Q site:VirtualBox.org or search for the answer before posting.
-
Sasquatch
- Volunteer
- Posts: 17798
- Joined: 17. Mar 2008, 13:41
- Primary OS: Debian other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows XP, Windows 7, Linux
- Location: /dev/random
In addition to the hanging explenation, it's possible that a service or other program doesn't respond when it's asked to shut down. What you can do, is look for a tweak to automatically kill those programs. With Google, you're bound to find it.
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.
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.
-
smartysmart34
- Posts: 101
- Joined: 21. Apr 2008, 20:56
Thanks for all the hints.
I just want to add that the Windows-instance in question behaves quite normal as long as it is started in a VBox locally. That means: As long as I start VBox on my local Workstation and then fire up the XP everything is OK and within some 4-6 Months of using it - it never failed shutting down.
That just started now as I use it as headless server :-(
Regards,
Martin
P.S.: And I like to add:
It is quite some pain in the butt to worry about how to shut that thing down.
- acpipowerbutton does not work unless I connect to the box via RDP
- savestate and restart causes some corruption that prevents the system from going down completely
- pulling the virtual plug is some kind of bad idea.
So do I honestly have to write a script that tries acpipowerbutton, log in to try from there and at the end pull the plug?
Am I the only one who has these problems?
I just want to add that the Windows-instance in question behaves quite normal as long as it is started in a VBox locally. That means: As long as I start VBox on my local Workstation and then fire up the XP everything is OK and within some 4-6 Months of using it - it never failed shutting down.
That just started now as I use it as headless server :-(
Regards,
Martin
P.S.: And I like to add:
It is quite some pain in the butt to worry about how to shut that thing down.
- acpipowerbutton does not work unless I connect to the box via RDP
- savestate and restart causes some corruption that prevents the system from going down completely
- pulling the virtual plug is some kind of bad idea.
So do I honestly have to write a script that tries acpipowerbutton, log in to try from there and at the end pull the plug?
Am I the only one who has these problems?
-
TerryE
- Volunteer
- Posts: 3572
- Joined: 28. May 2008, 08:40
- Primary OS: Ubuntu other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
- Contact:
Are you saying that if you have an open RDP session and issue a controlvm acpipowerbutton then the machine shuts down properly but if you don't then the power-down sequence stalls?smartysmart34 wrote:acpipowerbutton does not work unless I connect to the box via RDP
What happens if you then RDP into the stalled machine?
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
Google your Q site:VirtualBox.org or search for the answer before posting.
-
smartysmart34
- Posts: 101
- Joined: 21. Apr 2008, 20:56
-
TerryE
- Volunteer
- Posts: 3572
- Joined: 28. May 2008, 08:40
- Primary OS: Ubuntu other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
- Contact:
Hmmn, this sounds interesting. I can't find a bug report open on this one, so I suggest that you raise one. You need to register for a wiki user account (this is different to a forum account sorry) and then you can use the public Bugtracker to raise a tickets for reporting problems in VirtualBox.
It may be that the shutdown sequence is polling the keyboard. You might be able to unblock this by using a VBoxManage controlvm yourVM keyboardputscancode <hex> [<hex> ...].
It may be that the shutdown sequence is polling the keyboard. You might be able to unblock this by using a VBoxManage controlvm yourVM keyboardputscancode <hex> [<hex> ...].
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
Google your Q site:VirtualBox.org or search for the answer before posting.
-
virtualpier
- Posts: 12
- Joined: 2. Jan 2009, 12:52
- Primary OS: Ubuntu 8.04
- VBox Version: OSE Debian
- Guest OSses: Linux, Windows
- Location: Italy
Re: headless-Server doesn't shutdown :-(
Hi all,
i've a problem with the acpipowerbutton and a Windows XP workstation.
If the Windows VM is locked (eg. Screensaver which prompt for user/password), the shutdown command seems to be ignored.
I've tried with the savestate as previously suggested..but, when i restart the VM (and a new VRDP connection), i see that desktop has not been correctly displayed, there are some "black hole" (black areas) on the desktop, the desktop icons are surrounded by black :/
Any advice?
Thanks
i've a problem with the acpipowerbutton and a Windows XP workstation.
If the Windows VM is locked (eg. Screensaver which prompt for user/password), the shutdown command seems to be ignored.
I've tried with the savestate as previously suggested..but, when i restart the VM (and a new VRDP connection), i see that desktop has not been correctly displayed, there are some "black hole" (black areas) on the desktop, the desktop icons are surrounded by black :/
Any advice?
Thanks