Re: [Tails-dev] QEmu guest agent in tails builder

Poista viesti

Vastaa
Lähettäjä: Arnaud
Päiväys:  
Vastaanottaja: tails-dev
Aihe: Re: [Tails-dev] QEmu guest agent in tails builder
Oups, edit to the previous mail.

>     $ sudo systemctl enable acpid
>     $ sudo systemctl status acpid


In the second line, replace status with start.

Moreove, `acpid` requires additional configuration that I forgot to
mention. It seems that by default it does nothing.

So, let's create an event to handle the power button.

    $ echo 'event=button/power
    action=/etc/acpi/actions/poweroff.sh %e
    ' > /etc/acpi/events/power-button


Then, create the action script to handle this event.

    $ mkdir /etc/acpi/actions
    $ echo '#!/bin/sh
    /sbin/shutdown -h now
    ' > /etc/acpi/actions/poweroff.sh
    $ chmod +x /etc/acpi/actions/poweroff.sh


With that, it seems now that the VM shuts down properly on `virsh shutdown`.

Cheers,
Arnaud