Devuan bug report logs - #633
qemu-guest-agent: Guest agent does not shut down the guest when requested to

version graph

Package: sysvinit; Maintainer for sysvinit is Devuan Developers <>; Source for sysvinit is src:sysvinit.

Reported by: Fabio Muzzi <>

Date: Sat, 20 Nov 2021 19:12:01 UTC

Severity: grave

Tags: chimaera

Found in version 2.96-7+devuan1

Fixed in versions 3.00-1+devuan1, 2.96-7+devuan2


Full log

🔗 View this message in rfc822 format

Subject: bug#633: gdb trace - and a workaround
Reply-To: Fabio Muzzi <>,
Resent-From: Fabio Muzzi <>
Resent-Date: Sat, 20 Nov 2021 23:02:02 +0000
Resent-Message-ID: <>
X-Devuan-PR-Message: followup 633
X-Devuan-PR-Package: qemu-guest-agent
References: <163743517558.1458.16031504645366650167.reportbug@fileserver.geldue.locale>
Received: via spool by id=B633.16374492019988
          (code B ref 633); Sat, 20 Nov 2021 23:02:02 +0000
Received: (at 633) by; 20 Nov 2021 23:00:01 +0000
Received: from []
	by with IMAP (fetchmail-6.4.0.beta4)
	for <debbugs@localhost> (single-drop); Sat, 20 Nov 2021 23:00:01 +0000 (UTC)
Received: from ( [])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by (Postfix) with ESMTPS id B316BF6096A
	for <>; Sat, 20 Nov 2021 23:54:30 +0100 (CET)
	dkim=pass (1024-bit key; unprotected) header.b="g6NmGN3x";
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;;
	 s=dkim; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Date:
	bh=r2wX7fzSVuQh0UMbIMnlp1jCRM2bmKbnFjSi6V1xLuc=; b=g6NmGN3xhQDEJuNxnU7dKEzCJS
Received: from [] (port=53982 helo=[])
	by with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128)
	(Exim 4.92)
	(envelope-from <>)
	id 1moZFd-0002L1-JP
	for; Sat, 20 Nov 2021 23:54:29 +0100
From: Fabio Muzzi <>
Message-ID: <>
Date: Sat, 20 Nov 2021 23:54:29 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: it-IT
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
	DKIM_VALID_AU,DKIM_VALID_EF,SPF_PASS autolearn=disabled version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
I have gone further and run gdb.

It seems that the agent actually tries to call /sbin/shutdown with the following parameters:

"-h -P +0 hypervisor initiated shutdown"

But if I run shutdown manually with  these parameters, I get an error and the help message shows up:

root@fileserver:/sbin# /sbin/shutdown -h -P +0 hypervisor initiated shutdown
Usage:    shutdown [-akrhPHfFnc] [-t sec] time [warning message]
                  -a:      use /etc/shutdown.allow
                  -k:      don't really shutdown, only warn.
                  -r:      reboot after shutdown.
                  -h:      halt after shutdown.
                  -P:      halt action is to turn off power.
                           can only be used along with -h flag.
                  -H:      halt action is to just halt.
                           can only be used along with -h flag.
                  -f:      do a 'fast' reboot (skip fsck).
                  -F:      Force fsck on reboot.
                  -n:      do not go through "init" but go down real fast.
                  -c:      cancel a running shutdown.
                  -q:      quiet mode - display fewer shutdown warnings.
                  -Q:      full quiet mode - display only final shutdown warning.
                  -t secs: delay between warning and kill signal.
                  ** the "time" argument is mandatory! (try "now") **

So it seems that /sbin/shutdown does not like the command line that qemu-agent uses.

It seems that the Devuan shutdown command wants a mandatory "time", so for example

shutdown -h -P now


But the qemu agent uses a syntax that is wrong for the Devuan shutdown binary, while it works fine for the systemd-infested shutdown that is just a link to systemcl (in Debian 11).

A workaroung is to rename /sbin/shutdown and create a script that calls shutdown with a command line that it accepts, like:

/sbin/shutdown -h -P now hypervisor initiated shutdown

Notice the "now" instead of the "+0" in the arguments.

Fabio "Kurgan" Muzzi

- IZ4UFQ -

"Il massimo danno con il minimo sforzo"

Send a report that this bug log contains spam.

Devuan BTS -- Powered by Debian bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.

Devuan Bugs Owner <>.
Last modified: Wed Apr 17 16:23:03 2024;