Thread View: linux.debian.kernel
1 messages
1 total messages
Started by Alex Barbu
Sat, 07 Nov 2026 13:20
Bug#1153342: hyperv-daemons: upgrade stops hv-kvp-daemon and hv-vss-daemon and never starts them again
Author: 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--
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads