From 9cd93a56bd98c652f25eb3cab71e7365b522bb6c Mon Sep 17 00:00:00 2001 From: Wei Zhou Date: Mon, 5 Feb 2024 09:54:53 +0100 Subject: [PATCH] Revert "systemvm template: remove hyperv packages and do not export" This reverts commit 4383d59d031bde6eae7ebba261ff641ca0a66cd5. --- tools/appliance/build.sh | 12 ++++++++++++ .../scripts/configure_systemvm_services.sh | 3 +++ .../scripts/install_systemvm_packages.sh | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/tools/appliance/build.sh b/tools/appliance/build.sh index 87a750ebf942..1c83f9aba510 100755 --- a/tools/appliance/build.sh +++ b/tools/appliance/build.sh @@ -326,6 +326,17 @@ function vmware_export() { log INFO "${appliance} exported for VMWare: dist/${appliance_build_name}-vmware.ova" } +function hyperv_export() { + log INFO "creating hyperv export" + qemu-img convert -f qcow2 -O vpc "dist/${appliance}" "dist/${appliance_build_name}-hyperv.vhd" + CDIR=$PWD + cd dist + zip "${appliance_build_name}-hyperv.vhd.zip" "${appliance_build_name}-hyperv.vhd" + rm -f *vhd + cd $CDIR + log INFO "${appliance} exported for HyperV: dist/${appliance_build_name}-hyperv.vhd.zip" +} + ### ### Main invocation ### @@ -341,6 +352,7 @@ function main() { ovm_export xen_server_export vmware_export + hyperv_export rm -f "dist/${appliance}" cd dist && chmod +r * && cd .. cd dist && md5sum * > md5sum.txt && cd .. diff --git a/tools/appliance/systemvmtemplate/scripts/configure_systemvm_services.sh b/tools/appliance/systemvmtemplate/scripts/configure_systemvm_services.sh index 6d8702c1079d..1a465f4999fd 100644 --- a/tools/appliance/systemvmtemplate/scripts/configure_systemvm_services.sh +++ b/tools/appliance/systemvmtemplate/scripts/configure_systemvm_services.sh @@ -122,6 +122,9 @@ function configure_services() { # Disable guest services which will selectively be started based on hypervisor systemctl disable open-vm-tools systemctl disable xe-daemon + systemctl disable hyperv-daemons.hv-fcopy-daemon.service + systemctl disable hyperv-daemons.hv-kvp-daemon.service + systemctl disable hyperv-daemons.hv-vss-daemon.service systemctl disable qemu-guest-agent # Disable container services diff --git a/tools/appliance/systemvmtemplate/scripts/install_systemvm_packages.sh b/tools/appliance/systemvmtemplate/scripts/install_systemvm_packages.sh index a48e0de3c765..1c5b22ba3c81 100644 --- a/tools/appliance/systemvmtemplate/scripts/install_systemvm_packages.sh +++ b/tools/appliance/systemvmtemplate/scripts/install_systemvm_packages.sh @@ -75,7 +75,7 @@ function install_packages() { radvd \ sharutils genisoimage \ strongswan libcharon-extra-plugins libstrongswan-extra-plugins strongswan-charon strongswan-starter \ - virt-what open-vm-tools qemu-guest-agent cloud-guest-utils \ + virt-what open-vm-tools qemu-guest-agent hyperv-daemons cloud-guest-utils \ conntrack apt-transport-https ca-certificates curl gnupg gnupg-agent software-properties-common apt-get install -y python3-json-pointer python3-jsonschema cloud-init