diff --git a/systemvm/debian/etc/systemd/system/baremetal-vr.service b/systemvm/debian/etc/systemd/system/baremetal-vr.service deleted file mode 100644 index f880f0ca18a..00000000000 --- a/systemvm/debian/etc/systemd/system/baremetal-vr.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=CloudStack Baremetal VR service -After=network.target local-fs.target - -[Install] -WantedBy=multi-user.target - -[Service] -Type=simple -WorkingDirectory=/opt/cloud/bin -ExecStart=/usr/bin/python /opt/cloud/bin/baremetal-vr.py -Restart=on-failure diff --git a/systemvm/debian/etc/systemd/system/cloud.service b/systemvm/debian/etc/systemd/system/cloud.service deleted file mode 100644 index e3824bf53c2..00000000000 --- a/systemvm/debian/etc/systemd/system/cloud.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=CloudStack Agent service -After=cloud-early-config.service network.target cloud-postinit.service local-fs.target - -[Install] -WantedBy=multi-user.target - -[Service] -Type=simple -WorkingDirectory=/usr/local/cloud/systemvm -ExecStart=/usr/local/cloud/systemvm/_run.sh -Restart=on-failure diff --git a/systemvm/debian/opt/cloud/bin/setup/cloud-early-config b/systemvm/debian/opt/cloud/bin/setup/cloud-early-config index 976b2ca2dec..f1162b588bb 100755 --- a/systemvm/debian/opt/cloud/bin/setup/cloud-early-config +++ b/systemvm/debian/opt/cloud/bin/setup/cloud-early-config @@ -205,6 +205,41 @@ patch() { return 0 } + +enable_guest_services() { + +HYPERVISOR=$(/dev/null|head -1) + ;; + vmware) + # system time sync'd with host via vmware tools + systemctl stop ntpd + systemctl disable ntpd + systemctl start open-vm-tools + ;; + virtualpc|hyperv) + # Hyper-V is recognized as virtualpc hypervisor type. Boot args are passed using KVP Daemon + systemctl start hyperv-daemons.hv-fcopy-daemon.service hyperv-daemons.hv-kvp-daemon.service hyperv-daemons.hv-vss-daemon.service + ;; + virtualbox) + # Virtualbox is used to test the virtual router + ;; + esac +} + start() { log_it "Executing cloud-early-config" @@ -225,6 +260,10 @@ start() { patch sync sysctl -p + + log_it "Starting Virtual Guest Services for $HYPERVISOR" + + enable_guest_services log_it "Configuring systemvm type=$TYPE" diff --git a/systemvm/debian/opt/cloud/bin/setup/common.sh b/systemvm/debian/opt/cloud/bin/setup/common.sh index e24642fc603..110800aaa59 100755 --- a/systemvm/debian/opt/cloud/bin/setup/common.sh +++ b/systemvm/debian/opt/cloud/bin/setup/common.sh @@ -584,7 +584,7 @@ setup_ntp() { routing_svcs() { echo "haproxy apache2" > /var/cache/cloud/enabled_svcs - echo "cloud nfs-common portmap" > /var/cache/cloud/disabled_svcs + echo "nfs-common portmap" > /var/cache/cloud/disabled_svcs if [ "$RROUTER" -eq "1" ] then echo "keepalived conntrackd" >> /var/cache/cloud/enabled_svcs diff --git a/systemvm/debian/opt/cloud/bin/setup/consoleproxy.sh b/systemvm/debian/opt/cloud/bin/setup/consoleproxy.sh index 225dc6f5ad2..c20fed2c857 100755 --- a/systemvm/debian/opt/cloud/bin/setup/consoleproxy.sh +++ b/systemvm/debian/opt/cloud/bin/setup/consoleproxy.sh @@ -1,4 +1,4 @@ -#!/bin/bash +\#!/bin/bash # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information @@ -19,7 +19,6 @@ . /opt/cloud/bin/setup/common.sh consoleproxy_svcs() { - echo "cloud" > /var/cache/cloud/enabled_svcs echo "haproxy dnsmasq apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs mkdir -p /var/log/cloud } diff --git a/systemvm/debian/opt/cloud/bin/setup/postinit.sh b/systemvm/debian/opt/cloud/bin/setup/postinit.sh index d067df2e93c..fdb21114f75 100755 --- a/systemvm/debian/opt/cloud/bin/setup/postinit.sh +++ b/systemvm/debian/opt/cloud/bin/setup/postinit.sh @@ -30,37 +30,6 @@ else fi sysctl -p -# HYPERVISOR exported by cloud-early-config -HYPERVISOR=$(/dev/null|head -1) - ;; - vmware) - # system time sync'd with host via vmware tools - systemctl stop ntpd - systemctl start open-vm-tools - ;; - virtualpc|hyperv) - # Hyper-V is recognized as virtualpc hypervisor type. Boot args are passed using KVP Daemon - systemctl start hyperv-daemons.hv-fcopy-daemon.service hyperv-daemons.hv-kvp-daemon.service hyperv-daemons.hv-vss-daemon.service - ;; - virtualbox) - # Virtualbox is used to test the virtual router - ;; - esac - - - # Restart journald for setting changes to apply systemctl restart systemd-journald @@ -103,3 +72,5 @@ fi systemctl enable --now --no-block ssh date > /var/cache/cloud/boot_up_done + +systemctl start cloud diff --git a/systemvm/debian/opt/cloud/bin/setup/secstorage.sh b/systemvm/debian/opt/cloud/bin/setup/secstorage.sh index 8b6d4ee5a4b..8d5440ae5b1 100755 --- a/systemvm/debian/opt/cloud/bin/setup/secstorage.sh +++ b/systemvm/debian/opt/cloud/bin/setup/secstorage.sh @@ -19,7 +19,7 @@ . /opt/cloud/bin/setup/common.sh secstorage_svcs() { - echo "apache2 cloud nfs-common portmap" > /var/cache/cloud/enabled_svcs + echo "apache2 nfs-common portmap" > /var/cache/cloud/enabled_svcs echo "conntrackd keepalived haproxy dnsmasq" > /var/cache/cloud/disabled_svcs mkdir -p /var/log/cloud }