[systemd-devel] Systemd and Qemu

Lennart Poettering lennart at poettering.net
Mon Sep 9 18:18:32 PDT 2013


On Tue, 03.09.13 20:32, Bartek Rekke (bojleros at gmail.com) wrote:

Heya,

> I'am running Archlinux (recent version) including Systemd and Qemu.
> 
> Since killing qemu directly is highly destructive for guest os I want to
> shut it gracefully. I think it is obvious nessesity To do so I decided to
> use 'net rpc' or qemu monitor command. Both requires networking to be up
> and running.

Doesn't qemu provide a way to trigger fake a acpi power key event from
the outside based on some signal maybe?

> haltcmd="/usr/bin/echo 'system_powerdown' | /usr/bin/nc localhost $port"
> Using this setup I am able to start vm at startup or manually from console.
> Stopping from console also works. I can see guest stopping as expected. But
> after invoking poweroff/reboot systemd does not wait for qemu process to
> close.....

Note that ExecStop= when specified is expected to synchronously wait for
the operation to finish (like it worked for the stop verb on sysv init
scripts...). 

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list