Send host to hibernation from within the guest

Discussions about using Windows guests in VirtualBox.
Post Reply
Ranguno
Posts: 29
Joined: 28. Apr 2013, 14:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows Xp Home

Send host to hibernation from within the guest

Post by Ranguno »

Host: Windows 8.1 Guest: Windows XP VirtualBox: 5.1.8

Hi,

in order to send the host to sleep I want to call the host executable
C:\Windows\System32\shutdown.exe /h
from within the guest. How can I manage this?
Martin
Volunteer
Posts: 2561
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: Send host to hibernation from within the guest

Post by Martin »

Nothing in Virtualbox. You can do it like between standalone PCs with remote execution tools like psexec.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Send host to hibernation from within the guest

Post by socratis »

Thank the old gods and the new, you can't. Can you imagine how many Pandora's boxes that would open if you could control the host from a guest?

You didn't tell us what your end goal is, but I'm thinking you're running a long task in the guest, after which you want the host to go to sleep/hibernate. Well, you could do that by having a "file" in a shared folder and check its existence from the host. Something like a "I'm done" flag.
  • Once your guest finishes whatever it's doing, you create the file.
  • You run a program periodically on your host which checks for that file.
  • Once the file is there, you delete it and you put the host to sleep.
EDIT: Plus what Martin said, but I wouldn't trust my guest (especially WinXP) to have "the keys" (credentials) to my host.


PS. You could upgrade your VirtualBox, your version is quite old...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Ranguno
Posts: 29
Joined: 28. Apr 2013, 14:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows Xp Home

Re: Send host to hibernation from within the guest

Post by Ranguno »

@Martin @socratis: Thanks for your efforts.

You're right, socratis, I want to hibernate the host after a backup on the guest, and I intend to implement your ingenious idea.
Post Reply