Page 1 of 1

is there a command line ACPI shutdown

Posted: 21. Oct 2009, 22:18
by hobbyhack
Is there a way to initiate an ACPI shutdown of a guest from the command line? I can't find it as an option in VBoxManage.

I am trying to have all my virtual machines automatically shutdown at a certain time in order to backup the host.

Re: is there a command line ACPI shutdown

Posted: 21. Oct 2009, 22:34
by Sasquatch
Weird that you couldn't find it, because it's in plain view.

Code: Select all

VBoxManage controlvm        <uuid>|<name>
                            pause|resume|reset|poweroff|savestate|
                            acpipowerbutton|acpisleepbutton|

Re: is there a command line ACPI shutdown

Posted: 24. Jun 2010, 10:52
by wyrdR
Sasquatch wrote:Weird that you couldn't find it, because it's in plain view.

Code: Select all

VBoxManage controlvm        <uuid>|<name>
                            pause|resume|reset|poweroff|savestate|
                            acpipowerbutton|acpisleepbutton|
Does acpipowerbutton require guest additions?

My Mac OS X Server VM doesn't respond to this command nor does it do anything when I select "Send the Shutdown Signal". Either Mac OS X doesn't work like this or it needs the (currently still in development) Mac OS X Guest Additions.

TA :)

Re: is there a command line ACPI shutdown

Posted: 24. Jun 2010, 21:09
by Sasquatch
It doesn't require GA. However, since it's a server you're running, it's quite possible that it's designed to do nothing when it receives that call. Windows 2003 has the same thing, it will only shut down when you are logged on to the console and it's NOT locked. All other variations (locked, log on screen, etc) all ignores the acpi call. Other systems might react the same way.

Re: is there a command line ACPI shutdown

Posted: 25. Jun 2010, 00:18
by wyrdR
Sasquatch wrote:It doesn't require GA. However, since it's a server you're running, it's quite possible that it's designed to do nothing when it receives that call. Windows 2003 has the same thing, it will only shut down when you are logged on to the console and it's NOT locked. All other variations (locked, log on screen, etc) all ignores the acpi call. Other systems might react the same way.
TA.

So, this being guest dependent, it complicates a whole lotta things.

I guess it is possible that each OS may have configuration options that will allow it to honour acpipowerbutton in any state.

Perhaps VirtualBox could add to the Guest Additions a special process that listens for acpipowerbutton that could trigger neat shutdown inside the guest?

Re: is there a command line ACPI shutdown

Posted: 25. Jun 2010, 20:38
by sh1ny
Isn't there anything similar to acpid for mac os x ?

Re: is there a command line ACPI shutdown

Posted: 26. Jun 2010, 03:43
by wyrdR
sh1ny wrote:Isn't there anything similar to acpid for mac os x ?
If it runs on *nix it will propbably port to Mac OS X using any number of ways.

I'm wondering if most modern OSes might not have this built in; We might just need to find the right config/preference/reghack/policy/whatever: Googling that thought now…

[Update]
After Googling…
*Nix
People seem to have this under control using acpid.

Windows
Windows Server (2003) and vboxheadless shutdown.

Mac OS X
Still hunting. Maybe porting acpid us the only way? Anyone know otherwise?