oem-azure: add hyperv daemons

This change adds hyperv daemons hv_fcopy, hv_kvp, and hv_vss to the
Azure OEM sysext. hv_kvp specifically is needed to submit OS version
information to the Azure hypervisor.

The daemons, tough userspace programs, are built from the kernel sources
as they are included in the Linux kernel.

Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
This commit is contained in:
Thilo Fromm 2024-09-11 19:09:58 +02:00
parent 0a09534ff3
commit fdc82bd1cb
6 changed files with 63 additions and 0 deletions

View File

@ -0,0 +1,9 @@
[Unit]
Description=Hyper-V FCOPY daemon
ConditionPathExists=/dev/vmbus/hv_fcopy
[Service]
ExecStart=/usr/bin/hv_fcopy_daemon --no-daemon
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,11 @@
[Unit]
Description=Hyper-V KVP daemon
BindsTo=sys-devices-virtual-misc-vmbus\x21hv_kvp.device
ConditionPathExists=/dev/vmbus/hv_kvp
[Service]
Type=exec
ExecStart=/usr/bin/hv_kvp_daemon --no-daemon
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,10 @@
[Unit]
Description=Hyper-V VSS daemon
ConditionPathExists=/dev/vmbus/hv_vss
[Service]
Type=exec
ExecStart=/usr/bin/hv_vss_daemon --no-daemon
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,28 @@
# Copyright 2044-2016 The Flatcar Maintainers
# Distributed under the terms of the GNU General Public License v2
EAPI=7
COREOS_SOURCE_REVISION=""
inherit coreos-kernel savedconfig systemd
DESCRIPTION="HyperV guest support daemons."
KEYWORDS="amd64 arm64"
src_compile() {
# Build hv_vss_daemon, hv_kvp_daemon, hv_fcopy_daemon
kmake tools/hv
}
src_install() {
dobin "${S}/build/tools/hv/hv_fcopy_daemon"
dobin "${S}/build/tools/hv/hv_kvp_daemon"
dobin "${S}/build/tools/hv/hv_vss_daemon"
systemd_dounit "${FILESDIR}/hv_fcopy_daemon.service"
systemd_dounit "${FILESDIR}/hv_kvp_daemon.service"
systemd_dounit "${FILESDIR}/hv_vss_daemon.service"
systemd_enable_service "multi-user.target" "hv_fcopy_daemon.service"
systemd_enable_service "multi-user.target" "hv_kvp_daemon.service"
systemd_enable_service "multi-user.target" "hv_vss_daemon.service"
}

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
</pkgmetadata>

View File

@ -17,6 +17,7 @@ IUSE=""
RDEPEND="
~app-emulation/wa-linux-agent-${PV}
net-misc/chrony
app-emulation/hv-daemons
"
# for coreos-base/common-oem-files