diff --git a/debian/linux-cloud-tools-common.hv-kvp-daemon.service b/debian/linux-cloud-tools-common.hv-kvp-daemon.service index 015c96f9fea7f..571440344cb50 100644 --- a/debian/linux-cloud-tools-common.hv-kvp-daemon.service +++ b/debian/linux-cloud-tools-common.hv-kvp-daemon.service @@ -5,7 +5,8 @@ Description=Hyper-V KVP Protocol Daemon ConditionVirtualization=microsoft DefaultDependencies=no -After=systemd-remount-fs.service +BindsTo=sys-devices-virtual-misc-vmbus\x21hv_kvp.device +After=sys-devices-virtual-misc-vmbus\x21hv_kvp.device systemd-remount-fs.service Before=shutdown.target cloud-init-local.service walinuxagent.service Conflicts=shutdown.target RequiresMountsFor=/var/lib/hyperv diff --git a/debian/linux-cloud-tools-common.hv-kvp-daemon.udev b/debian/linux-cloud-tools-common.hv-kvp-daemon.udev new file mode 100644 index 0000000000000..0c648f54d4c49 --- /dev/null +++ b/debian/linux-cloud-tools-common.hv-kvp-daemon.udev @@ -0,0 +1 @@ +SUBSYSTEM=="misc", KERNEL=="vmbus/hv_kvp", TAG+="systemd", ENV{SYSTEMD_WANTS}+="hv-kvp-daemon.service" diff --git a/debian/rules.d/3-binary-indep.mk b/debian/rules.d/3-binary-indep.mk index b27275685612d..6c847da42bd44 100644 --- a/debian/rules.d/3-binary-indep.mk +++ b/debian/rules.d/3-binary-indep.mk @@ -190,6 +190,7 @@ ifeq ($(do_tools_hyperv),true) dh_installinit -p$(cloudpkg) -n --name hv-kvp-daemon dh_installinit -p$(cloudpkg) -n --name hv-vss-daemon dh_installinit -p$(cloudpkg) -n --name hv-fcopy-daemon + dh_installudev -p$(cloudpkg) -n --name hv-kvp-daemon dh_systemd_enable -p$(cloudpkg) dh_installinit -p$(cloudpkg) -o --name hv-kvp-daemon dh_installinit -p$(cloudpkg) -o --name hv-vss-daemon