On 03/06/2013 12:18, Edward Ned Harvey (vbox-users) wrote:

Running virtualbox with fedora guest, I want the host to be able to gracefully shutdown the guest.

Unfortunately, in recent versions of fedora, they ignore the acpi power button, and there is no easy way to enable it. (If you are logged into the guest, you can configure it via gnome, but nothing at the login screen. And if you install acpid which isn't included by default anymore, it doesn't do anything.)

At present, I'm having to resort to TCP, specifcally ssh. But if you have to use *any* thing tcp, it's all the same - dependencies on TCP being up, and authentication working, and DNS or static DHCP configured, etc. What I really want is something that's built into the guest additions, that will work without all those other dependencies.

Is there any other way to get the guest additions to run a shutdown command, or do some other form of shutdown, other than just hoping and assuming the guest OS will handle it? (Graceful shutdown. Not poweroff, and not savestate.)

I would love to see the ability to send a signal to the guest additions, and have a config file (or something) in the guest, that specified what the guest additions behavior should be upon receiving that signal. Then, without the acpipowerbutton or anything, you can directly send a signal from host to guest.

Thanks...



I've not had this exact issue, as I just use acpid and run Centos rather than Fedora. But I just thought I would check -

After installing acpid are you checking that it is actually set to run at boot time?

e.g.

chkconfig

/etc/init.d/acpid status

What about the configuration under

/etc/acpid/events/power.conf

# ACPID config to power down machine if powerbutton is pressed, but only if
# no gnome-power-manager is running

event=button/power.*
action=/etc/acpi/actions/power.sh

and

/etc/acpi/actions/power.sh

#!/bin/sh

PATH=/sbin:/bin:/usr/bin

# Get the ID of the first active X11 session:
uid_session=$(
ck-list-sessions | \
awk '
/^Session[0-9]+:$/ { uid = active = x11 = "" ; next }
{ gsub(/'\''/, "", $3) }
$1 == "unix-user" { uid = $3 }
$1 == "active" { active = $3 }
$1 == "x11-display" { x11 = $3 }
active == "TRUE" && x11 != "" {
        print uid
        exit
}')

# Check that there is a power manager, otherwise shut down.
[ "$uid_session" ] &&
ps axo uid,cmd | \
awk '
    $1 == '$uid_session' &&
        ($2 ~ /gnome-power-manager/ || $2 ~ /kpowersave/ ||
         $2 ~ /kded4/ || $3 ~ /guidance-power-manager/) \
                { found = 1; exit }
    END { exit !found }
' ||
  shutdown -h now



--
Regards,

Giles Coochey, CCNP, CCNA, CCNAS
NetSecSpec Ltd
+44 (0) 7983 877438
http://www.coochey.net
http://www.netsecspec.co.uk
gi...@coochey.net

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
VBox-users-community mailing list
VBox-users-community@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vbox-users-community
_______________________________________________
Unsubscribe:  
mailto:vbox-users-community-requ...@lists.sourceforge.net?subject=unsubscribe

Reply via email to