Article View: linux.debian.kernel
Article #475Bug#1153342: hyperv-daemons: upgrade stops hv-kvp-daemon and hv-vss-daemon and never starts them again
From: Alex Barbu
Date: Sat, 07 Nov 2026 13:20
Date: Sat, 07 Nov 2026 13:20
344 lines
15571 bytes
15571 bytes
This is a multipart message in MIME format.
------=_NextPart_000_003E_01DD6ECB.26EDD480
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
Source: linux
Package: hyperv-daemons
Version: 6.12.115-2
Severity: normal
Tags: patch
Dear Maintainer,
On trixie Hyper-V guests, every upgrade of hyperv-daemons leaves
hv-kvp-daemon.service and hv-vss-daemon.service stopped until the next
reboot. While they are down, the Hyper-V host no longer sees the guest's IP
addresses (Get-VMNetworkAdapter shows none) and host-side backups lose the
VSS freeze.
Steps to reproduce, on a Hyper-V guest with hyperv-daemons installed and
hv-kvp-daemon running:
# systemctl is-active hv-kvp-daemon
active
# apt-get install --reinstall hyperv-daemons
# systemctl is-active hv-kvp-daemon
inactive
We saw this on all 9 guests we checked, when unattended-upgrades took
hyperv-daemons from 6.12.113-1 to 6.12.115-2 on 2026-11-03 and 2026-11-04.
It happened the same way earlier with 6.12.111-1 to 6.12.113-1. Whether the
units are enabled makes no difference. The journal shows the stop during the
dpkg run and no start after it:
systemd[1]: Stopping hv-kvp-daemon.service - Hyper-V key-value pair (KVP)
daemon...
systemd[1]: hv-kvp-daemon.service: Deactivated successfully.
systemd[1]: Stopping hv-vss-daemon.service - Hyper-V volume shadow copy
service (VSS) daemon...
systemd[1]: hv-vss-daemon.service: Deactivated successfully.
Cause: debian/rules.real installs the units with
dh_installsystemd --name hv-$$service-daemon --no-enable --no-start
With debhelper 13.24.2 this generates, in preinst:
if [ -z "$DPKG_ROOT" ] && [ "$1" = upgrade ] && [ -d /run/systemd/system ]
; then
deb-systemd-invoke stop 'hv-kvp-daemon.service' >/dev/null || true
fi
Because of --no-start, the generated postinst code never starts the unit.
The
hand-written postinst then runs
# On upgrade make sure running daemons are restarted
systemctl try-restart hv-kvp-daemon.service hv-vss-daemon.service
but preinst has already stopped the units, so try-restart does nothing. Most
installations do not notice, because hyperv-daemons is upgraded together
with a new kernel, and at the next boot udev starts the units through their
device binding. Guests that are not rebooted after unattended upgrades stay
without KVP and VSS until they are.
Proposed fix: add --no-stop-on-upgrade. The units then keep running through
the upgrade, and the existing try-restart in postinst restarts them on the
new binaries, which is what its comment says it is for. I built a test
package in a trixie container with debhelper 13.24.2, with the same flags
as above. Adding --no-stop-on-upgrade removes only the preinst stop block;
the generated postinst and prerm are unchanged. The patch is against
debian/latest and applies to debian/6.12/trixie with an offset.
--- a/debian/rules.real
+++ b/debian/rules.real
@@ -679,7 +679,7 @@
$(dh_binary_pre)
$(call make-tools,tools/hv) install
for service in kvp vss; do \
- dh_installsystemd --name hv-$$service-daemon --no-enable
--no-start \
+ dh_installsystemd --name hv-$$service-daemon --no-enable
--no-start --no-stop-on-upgrade \
|| break; \
dh_installinit --name hv-$$service-daemon \
|| break; \
A fix in a trixie point release would be appreciated, since stable guests
are the ones running unattended-upgrades.
Thanks,
Rex
------=_NextPart_000_003E_01DD6ECB.26EDD480
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40"><head><META =
HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii"><meta name=3DGenerator content=3D"Microsoft Word 15 =
(filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DEN-US =
link=3D"#0563C1" vlink=3D"#954F72"><div class=3DWordSection1><p =
class=3DMsoNormal>Source: linux<o:p></o:p></p><p =
class=3DMsoNormal>Package: hyperv-daemons<o:p></o:p></p><p =
class=3DMsoNormal>Version: 6.12.115-2<o:p></o:p></p><p =
class=3DMsoNormal>Severity: normal<o:p></o:p></p><p =
class=3DMsoNormal>Tags: patch<o:p></o:p></p><p =
class=3DMsoNormal><o:p> </o:p></p><p class=3DMsoNormal>Dear =
Maintainer,<o:p></o:p></p><p class=3DMsoNormal><o:p> </o:p></p><p =
class=3DMsoNormal>On trixie Hyper-V guests, every upgrade of =
hyperv-daemons leaves<o:p></o:p></p><p =
class=3DMsoNormal>hv-kvp-daemon.service and hv-vss-daemon.service =
stopped until the next<o:p></o:p></p><p class=3DMsoNormal>reboot. While =
they are down, the Hyper-V host no longer sees the guest's =
IP<o:p></o:p></p><p class=3DMsoNormal>addresses (Get-VMNetworkAdapter =
shows none) and host-side backups lose the<o:p></o:p></p><p =
class=3DMsoNormal>VSS freeze.<o:p></o:p></p><p =
class=3DMsoNormal><o:p> </o:p></p><p class=3DMsoNormal>Steps to =
reproduce, on a Hyper-V guest with hyperv-daemons installed =
and<o:p></o:p></p><p class=3DMsoNormal>hv-kvp-daemon =
running:<o:p></o:p></p><p class=3DMsoNormal><o:p> </o:p></p><p =
class=3DMsoNormal> # systemctl is-active =
hv-kvp-daemon<o:p></o:p></p><p class=3DMsoNormal> =
active<o:p></o:p></p><p class=3DMsoNormal> # apt-get install =
--reinstall hyperv-daemons<o:p></o:p></p><p class=3DMsoNormal> # =
systemctl is-active hv-kvp-daemon<o:p></o:p></p><p =
class=3DMsoNormal> inactive<o:p></o:p></p><p =
class=3DMsoNormal><o:p> </o:p></p><p class=3DMsoNormal>We saw this =
on all 9 guests we checked, when unattended-upgrades =
took<o:p></o:p></p><p class=3DMsoNormal>hyperv-daemons from 6.12.113-1 =
to 6.12.115-2 on 2026-11-03 and 2026-11-04.<o:p></o:p></p><p =
class=3DMsoNormal>It happened the same way earlier with 6.12.111-1 to =
6.12.113-1. Whether the<o:p></o:p></p><p class=3DMsoNormal>units are =
enabled makes no difference. The journal shows the stop during =
the<o:p></o:p></p><p class=3DMsoNormal>dpkg run and no start after =
it:<o:p></o:p></p><p class=3DMsoNormal><o:p> </o:p></p><p =
class=3DMsoNormal> systemd[1]: Stopping hv-kvp-daemon.service - =
Hyper-V key-value pair (KVP) daemon...<o:p></o:p></p><p =
class=3DMsoNormal> systemd[1]: hv-kvp-daemon.service: Deactivated =
successfully.<o:p></o:p></p><p class=3DMsoNormal> systemd[1]: =
Stopping hv-vss-daemon.service - Hyper-V volume shadow copy service =
(VSS) daemon...<o:p></o:p></p><p class=3DMsoNormal> systemd[1]: =
hv-vss-daemon.service: Deactivated successfully.<o:p></o:p></p><p =
class=3DMsoNormal><o:p> </o:p></p><p class=3DMsoNormal>Cause: =
debian/rules.real installs the units with<o:p></o:p></p><p =
class=3DMsoNormal><o:p> </o:p></p><p class=3DMsoNormal> =
dh_installsystemd --name hv-$$service-daemon --no-enable =
--no-start<o:p></o:p></p><p class=3DMsoNormal><o:p> </o:p></p><p =
class=3DMsoNormal>With debhelper 13.24.2 this generates, in =
preinst:<o:p></o:p></p><p class=3DMsoNormal><o:p> </o:p></p><p =
class=3DMsoNormal> if [ -z "$DPKG_ROOT" ] && [ =
"$1" =3D upgrade ] && [ -d /run/systemd/system ] ; =
then<o:p></o:p></p><p =
class=3DMsoNormal> =
deb-systemd-invoke stop 'hv-kvp-daemon.service' >/dev/null || =
true<o:p></o:p></p><p class=3DMsoNormal> fi<o:p></o:p></p><p =
class=3DMsoNormal><o:p> </o:p></p><p class=3DMsoNormal>Because of =
--no-start, the generated postinst code never starts the unit. =
The<o:p></o:p></p><p class=3DMsoNormal>hand-written postinst then =
runs<o:p></o:p></p><p class=3DMsoNormal><o:p> </o:p></p><p =
class=3DMsoNormal> # On upgrade make sure running daemons are =
restarted<o:p></o:p></p><p class=3DMsoNormal> systemctl =
try-restart hv-kvp-daemon.service hv-vss-daemon.service<o:p></o:p></p><p =
class=3DMsoNormal><o:p> </o:p></p><p class=3DMsoNormal>but preinst =
has already stopped the units, so try-restart does nothing. =
Most<o:p></o:p></p><p class=3DMsoNormal>installations do not notice, =
because hyperv-daemons is upgraded together<o:p></o:p></p><p =
class=3DMsoNormal>with a new kernel, and at the next boot udev starts =
the units through their<o:p></o:p></p><p class=3DMsoNormal>device =
binding. Guests that are not rebooted after unattended upgrades =
stay<o:p></o:p></p><p class=3DMsoNormal>without KVP and VSS until they =
are.<o:p></o:p></p><p class=3DMsoNormal><o:p> </o:p></p><p =
class=3DMsoNormal>Proposed fix: add --no-stop-on-upgrade. The units then =
keep running through<o:p></o:p></p><p class=3DMsoNormal>the upgrade, and =
the existing try-restart in postinst restarts them on =
the<o:p></o:p></p><p class=3DMsoNormal>new binaries, which is what its =
comment says it is for. I built a test<o:p></o:p></p><p =
class=3DMsoNormal>package in a trixie container with debhelper 13.24.2, =
with the same flags<o:p></o:p></p><p class=3DMsoNormal>as above. Adding =
--no-stop-on-upgrade removes only the preinst stop =
block;<o:p></o:p></p><p class=3DMsoNormal>the generated postinst and =
prerm are unchanged. The patch is against<o:p></o:p></p><p =
class=3DMsoNormal>debian/latest and applies to debian/6.12/trixie with =
an offset.<o:p></o:p></p><p class=3DMsoNormal><o:p> </o:p></p><p =
class=3DMsoNormal>--- a/debian/rules.real<o:p></o:p></p><p =
class=3DMsoNormal>+++ b/debian/rules.real<o:p></o:p></p><p =
class=3DMsoNormal>@@ -679,7 +679,7 @@<o:p></o:p></p><p =
class=3DMsoNormal> =
$(dh_binary_pre)<o:p></o:p></p><p =
class=3DMsoNormal> $(call =
make-tools,tools/hv) install<o:p></o:p></p><p =
class=3DMsoNormal> for service =
in kvp vss; do \<o:p></o:p></p><p =
class=3DMsoNormal>- =
dh_installsystemd --name =
hv-$$service-daemon --no-enable --no-start \<o:p></o:p></p><p =
class=3DMsoNormal>+ =
dh_installsystemd --name =
hv-$$service-daemon --no-enable --no-start --no-stop-on-upgrade =
\<o:p></o:p></p><p =
class=3DMsoNormal> &=
nbsp; &n=
bsp; || break; \<o:p></o:p></p><p =
class=3DMsoNormal> &=
nbsp; dh_installinit --name =
hv-$$service-daemon \<o:p></o:p></p><p =
class=3DMsoNormal> &=
nbsp; &n=
bsp; || break; \<o:p></o:p></p><p =
class=3DMsoNormal><o:p> </o:p></p><p class=3DMsoNormal>A fix in a =
trixie point release would be appreciated, since stable =
guests<o:p></o:p></p><p class=3DMsoNormal>are the ones running =
unattended-upgrades.<o:p></o:p></p><p =
class=3DMsoNormal><o:p> </o:p></p><p =
class=3DMsoNormal>Thanks,<o:p></o:p></p><p =
class=3DMsoNormal>Rex<o:p></o:p></p></div></body></html>
------=_NextPart_000_003E_01DD6ECB.26EDD480--
Technical Details
Message-ID:
<NWOuR-aoEH-1@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.corradoroberto.it!bofh.it!news.nic.it!robomodShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.corradoroberto.it!bofh.it!news.nic.it!robomod
From: "Alex Barbu" <rex.barbu@gmail.com>
Newsgroups: linux.debian.bugs.dist,linux.debian.kernel
Subject: Bug#1153342: hyperv-daemons: upgrade stops hv-kvp-daemon and hv-vss-daemon and never starts them again
Date: Sat, 07 Nov 2026 14:20:01 +0100
Message-ID: <NWOuR-aoEH-1@gated-at.bofh.it>
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Sat Nov 7 13:19:08 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -0.546
Reply-To: "Alex Barbu" <rex.barbu@gmail.com>, 1153342@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: debian-kernel@lists.debian.org
X-Debian-Pr-Message: report 1153342
X-Debian-Pr-Package: src:linux
X-Debian-Pr-Source: linux
X-Gm-Message-State: APuU4Z/zypMuQNsVpZxaIRWzN/QZMlPUP8Qr8ud8eeIwk6YZ7Qk4eHdx
wktSnhTvMMV//Udods4gL5rBkSR8y90SMUnCrtsM7qBxlWH599FwRNdQw057bQ==
X-Gm-Gg: AYBFou0Z6ZmLJiuCHlfqxF5bqthWADTtT/pCiVIHydxAKVfp1DtH7Jbrx+Ss9Ri5clp
4s7prV6vdSOCNtfmoPOOyzo7rKXGHYbIMWnw+ELyKz5Cu0Za/qEU5aJp1blWxAUSkh1SqAI7asS
cyI1Ix9LIMlti4p0fLbSz7shcnwpHBXCh3I0e7F44c/w74EsZi2yS94WPJuVWtoyaOoC6ouDJ2Q
5OlsCcFXLQFbhvQIJn54sTatjFJ+YsXJ36XpZ49wj/7p76MkNflFBHMB+yNnGAu3JcI3e0WZdX+
7EC5mqJa+PoHkaP+k+0jWCiSTEih/p6P4djXXJaVQ029UKGVvT92sxeK64atMDjQ5Dea9xkqOrm
fWMzXtmOecu60xXqvtftI5n42pmZSyppwJZSrack3AvfjihEPhKirQ0E4OMfXlyAeWemZEvXFn1
nmdXMTELqHaARlqn7wVMS7B1PQOGKD0FwXg+nTbnqcIl4FaY7312sWnnAuUDyp8PqiDlC/RLV1M
MY6FnzSYLYFVnJTawYw4F74DOprMvyCORmpIcNt/NWzkpC4AdPtvkYweI4qOO45dd6XW6ZOo0U2
AFq5P6tlrScTj1VwIddM5CY1oX5xcdnIKScgc3Nu
X-Received: by 2002:a05:6000:4a03:b0:48e:6264:c373 with SMTP id ffacd0b85a97d-492761d00d8mr10548253f8f.14.1794057470762;
Sat, 07 Nov 2026 05:17:50 -0800 (PST)
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_003E_01DD6ECB.26EDD480"
X-Mailer: Microsoft Outlook 15.0
Content-Language: en
Thread-Index: Ad1uuk4J3KCTdv6RRUKfItfakwYhWw==
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2001272
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 344
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Sat, 7 Nov 2026 15:17:48 +0200
X-Original-Message-ID: <003d01dd6eba$636356d0$2a2a0470$@gmail.com>