borgo1971 wrote:wyrdR wrote:I can use poweroff (like pulling out the plug)
this isn't really usefull... i think it's not much different as shutdown the server with running VM's
wyrdR wrote:and savestate (saves current state). Still working on acpipowerbutton (Not sure if this is supported on Mac OS X guests or guests without guest additions)
acpishutdown might never work for a server: Read
is there a command line ACPI shutdown for more info.
OK, but how do you think to launch commands on Mac OS shutdown? I've made an applescript to shutdown the server (that usese savestate), but mostly, If I'm not in office and server need to be shutted down, my collegue shut it down without using the script (it's on desktop, called "launch this to shutdown")
And yes, acpipowerbutton should be better, but I haven't found how make it work with Windows Server 2003 guest
As in this topic, you need to to run VBox as a Headless process as a LaunchDaemon. Everything you need is here:
VBox Daemon for Mac OS X. The only thing you'll need to do is edit
vbox.sh so it calls
savestate. This is good enough for me.
The only issue is that, while it neatly stops the VM running, it's not really
shut down but in a state of
suspended animation. The next time you turn it back on, the VM is like, "
where did the time go?" but then updates its clock and picks up where it left off.
If you literally want it to shutdown you'll need to use
shutdown or
pshutdown – perhaps leveraging Wine on MacOSX or by getting SSH listening on the Windows VM. I'm not running a Windows servers VM just now, so I won't be testing this right away.
Give it a shot and let us know