You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by pa...@apache.org on 2018/12/12 22:11:49 UTC
[cloudstack] 16/18: move dedication
This is an automated email from the ASF dual-hosted git repository.
paul_a pushed a commit to branch 41120-memory
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
commit 2a10fc1e1d4943fcc8e24f96e641f742e3e0472a
Author: Paul Angus <pa...@shapeblue.com>
AuthorDate: Sun Dec 9 17:00:37 2018 +0000
move dedication
---
.../debian/opt/cloud/bin/setup/cloud-early-config | 1 +
systemvm/debian/opt/cloud/bin/setup/postinit.sh | 54 +++++++++++-----------
.../scripts/configure_systemvm_services.sh | 4 +-
3 files changed, 29 insertions(+), 30 deletions(-)
diff --git a/systemvm/debian/opt/cloud/bin/setup/cloud-early-config b/systemvm/debian/opt/cloud/bin/setup/cloud-early-config
index 8ba7701..976b2ca 100755
--- a/systemvm/debian/opt/cloud/bin/setup/cloud-early-config
+++ b/systemvm/debian/opt/cloud/bin/setup/cloud-early-config
@@ -217,6 +217,7 @@ start() {
export HYPERVISOR=$(hypervisor)
[ $? -ne 0 ] && log_it "Failed to detect hypervisor type, bailing out of early init" && exit 10
log_it "Detected that we are running inside $HYPERVISOR"
+ echo "$HYPERVISOR" > /etc/cloudstack-agent_detected_hypervisor
config_guest
get_boot_params
diff --git a/systemvm/debian/opt/cloud/bin/setup/postinit.sh b/systemvm/debian/opt/cloud/bin/setup/postinit.sh
index 5eb8f55..d067df2 100755
--- a/systemvm/debian/opt/cloud/bin/setup/postinit.sh
+++ b/systemvm/debian/opt/cloud/bin/setup/postinit.sh
@@ -31,35 +31,33 @@ fi
sysctl -p
# HYPERVISOR exported by cloud-early-config
-
+HYPERVISOR=$(</etc/cloudstack-agent_detected_hypervisor)
case $HYPERVISOR in
- xen-pv|xen-domU)
- systemctl stop ntpd
- systemctl start xe-daemon xenstored
- ;;
- xen-hvm)
- systemctl stop ntpd
- systemctl start xe-daemon xenstored
-
- ;;
- kvm)
- systemctl start qemu-guest-agent
- VPORT=$(find /dev/virtio-ports -type l -name '*.vport' 2>/dev/null|head -1)
- ;;
- vmware)
- systemctl stop ntpd
- systemctl start vmtoolsd
-
- ;;
- virtualpc|hyperv)
- # Hyper-V is recognized as virtualpc hypervisor type. Boot args are passed using KVP Daemon
- systemctl start hyperv-daemons
- ;;
- virtualbox)
- # Virtualbox is used to test the virtual router
-
- ;;
- esac
+ xen-pv|xen-domU)
+ systemctl stop ntpd
+ systemctl start xe-daemon
+ ;;
+ xen-hvm)
+ systemctl stop ntpd
+ systemctl start xe-daemon
+ ;;
+ kvm)
+ systemctl start qemu-guest-agent
+ VPORT=$(find /dev/virtio-ports -type l -name '*.vport' 2>/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
diff --git a/tools/appliance/systemvmtemplate/scripts/configure_systemvm_services.sh b/tools/appliance/systemvmtemplate/scripts/configure_systemvm_services.sh
index 5fd7deb..0d3defd 100644
--- a/tools/appliance/systemvmtemplate/scripts/configure_systemvm_services.sh
+++ b/tools/appliance/systemvmtemplate/scripts/configure_systemvm_services.sh
@@ -111,8 +111,8 @@ function configure_services() {
systemctl disable vgauth
# Disable guest services which will selectively be started based on hypervisor
- systemctl disable vmtoolsd xe-daemon hyperv-daemons xenstored
- /lib/systemd/systemd-sysv-install disable qemu-guest-agent
+ systemctl disable open-vm-tools xe-daemon hyperv-daemons.hv-fcopy-daemon.service hyperv-daemons.hv-kvp-daemon.service hyperv-daemons.hv-vss-daemon.service qemu-guest-agent
+ /lib/systemd/systemd-sysv-install disable
configure_apache2
configure_strongswan