Skip to content

Commit

Permalink
Merge pull request #4030 from laozc/fix-hv-daemon
Browse files Browse the repository at this point in the history
Update Hyper-V daemons
  • Loading branch information
tstromberg committed Apr 10, 2019
2 parents 903e9c2 + 9a5f3c2 commit 14414d1
Show file tree
Hide file tree
Showing 12 changed files with 105 additions and 50 deletions.
2 changes: 1 addition & 1 deletion deploy/iso/minikube-iso/package/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ menu "System tools"
source "$BR2_EXTERNAL_MINIKUBE_PATH/package/docker-bin/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/package/cni-bin/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/package/cni-plugins-bin/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/package/hv-kvp-daemon/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/package/hyperv-daemons/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/package/gluster/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/package/vbox-guest/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/package/containerd-bin/Config.in"
Expand Down
4 changes: 0 additions & 4 deletions deploy/iso/minikube-iso/package/hv-kvp-daemon/Config.in

This file was deleted.

30 changes: 0 additions & 30 deletions deploy/iso/minikube-iso/package/hv-kvp-daemon/hv_kvp_daemon.mk

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SUBSYSTEM=="misc", KERNEL=="vmbus/hv_fcopy", TAG+="systemd", ENV{SYSTEMD_WANTS}+="hv_fcopy_daemon.service"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SUBSYSTEM=="misc", KERNEL=="vmbus/hv_kvp", TAG+="systemd", ENV{SYSTEMD_WANTS}+="hv_kvp_daemon.service"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SUBSYSTEM=="misc", KERNEL=="vmbus/hv_vss", TAG+="systemd", ENV{SYSTEMD_WANTS}+="hv_vss_daemon.service"
4 changes: 4 additions & 0 deletions deploy/iso/minikube-iso/package/hyperv-daemons/Config.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
config BR2_PACKAGE_HYPERV_DAEMONS
bool "hyperv-daemons"
default y
depends on BR2_x86_64
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Unit]
Description=Hyper-V FCOPY Daemon
Documentation=https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/reference/integration-services#hyper-v-guest-service-interface
BindsTo=sys-devices-virtual-misc-vmbus\x21hv_fcopy.device

[Service]
ExecStart=/usr/sbin/hv_fcopy_daemon -n

[Install]
WantedBy=multi-user.target
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Unit]
Description=Hyper-V Key Value Pair Daemon
Documentation=https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/reference/integration-services#hyper-v-data-exchange-service-kvp
BindsTo=sys-devices-virtual-misc-vmbus\x21hv_kvp.device

[Service]
ExecStart=/usr/sbin/hv_kvp_daemon -n

[Install]
WantedBy=multi-user.target
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Unit]
Description=Hyper-V VSS Daemon
Documentation=https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/reference/integration-services#hyper-v-volume-shadow-copy-requestor
BindsTo=sys-devices-virtual-misc-vmbus\x21hv_vss.device

[Service]
ExecStart=/usr/sbin/hv_vss_daemon -n

[Install]
WantedBy=multi-user.target
67 changes: 67 additions & 0 deletions deploy/iso/minikube-iso/package/hyperv-daemons/hyperv-daemons.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
################################################################################
#
# hyperv-daemons
#
################################################################################

HYPERV_DAEMONS_VERSION = 4.15.1
HYPERV_DAEMONS_SITE = https://www.kernel.org/pub/linux/kernel/v${HYPERV_DAEMONS_VERSION%%.*}.x
HYPERV_DAEMONS_SOURCE = linux-$(HYPERV_DAEMONS_VERSION).tar.xz

define HYPERV_DAEMONS_BUILD_CMDS
$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)/tools/hv/
endef

define HYPERV_DAEMONS_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0755 \
$(@D)/tools/hv/hv_fcopy_daemon \
$(TARGET_DIR)/usr/sbin/hv_fcopy_daemon

$(INSTALL) -D -m 0755 \
$(@D)/tools/hv/hv_kvp_daemon \
$(TARGET_DIR)/usr/sbin/hv_kvp_daemon
$(INSTALL) -D -m 0755 \
$(@D)/tools/hv/hv_get_dhcp_info.sh \
$(TARGET_DIR)/usr/libexec/hypervkvpd/hv_get_dhcp_info
$(INSTALL) -D -m 0755 \
$(@D)/tools/hv/hv_get_dns_info.sh \
$(TARGET_DIR)/usr/libexec/hypervkvpd/hv_get_dns_info
$(INSTALL) -D -m 0755 \
$(@D)/tools/hv/hv_set_ifconfig.sh \
$(TARGET_DIR)/usr/libexec/hypervkvpd/hv_set_ifconfig

$(INSTALL) -D -m 0755 \
$(@D)/tools/hv/hv_vss_daemon \
$(TARGET_DIR)/usr/sbin/hv_vss_daemon
endef

define HYPERV_DAEMONS_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 644 \
$(BR2_EXTERNAL_MINIKUBE_PATH)/package/hyperv-daemons/70-hv_fcopy.rules \
$(TARGET_DIR)/etc/udev/rules.d/70-hv_fcopy.rules
$(INSTALL) -D -m 644 \
$(BR2_EXTERNAL_MINIKUBE_PATH)/package/hyperv-daemons/70-hv_kvp.rules \
$(TARGET_DIR)/etc/udev/rules.d/70-hv_kvp.rules
$(INSTALL) -D -m 644 \
$(BR2_EXTERNAL_MINIKUBE_PATH)/package/hyperv-daemons/70-hv_vss.rules \
$(TARGET_DIR)/etc/udev/rules.d/70-hv_vss.rules

$(INSTALL) -D -m 644 \
$(BR2_EXTERNAL_MINIKUBE_PATH)/package/hyperv-daemons/hv_fcopy_daemon.service \
$(TARGET_DIR)/usr/lib/systemd/system/hv_fcopy_daemon.service
$(INSTALL) -D -m 644 \
$(BR2_EXTERNAL_MINIKUBE_PATH)/package/hyperv-daemons/hv_kvp_daemon.service \
$(TARGET_DIR)/usr/lib/systemd/system/hv_kvp_daemon.service
$(INSTALL) -D -m 644 \
$(BR2_EXTERNAL_MINIKUBE_PATH)/package/hyperv-daemons/hv_vss_daemon.service \
$(TARGET_DIR)/usr/lib/systemd/system/hv_vss_daemon.service

ln -fs /usr/lib/systemd/system/hv_fcopy_daemon.service \
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/hv_fcopy_daemon.service
ln -fs /usr/lib/systemd/system/hv_kvp_daemon.service \
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/hv_kvp_daemon.service
ln -fs /usr/lib/systemd/system/hv_vss_daemon.service \
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/hv_vss_daemon.service
endef

$(eval $(generic-package))

0 comments on commit 14414d1

Please sign in to comment.