From 2a068696f8620410326a3984b498c7e9f1fd2ec5 Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Fri, 23 Mar 2018 11:48:13 +0530 Subject: [PATCH 1/2] CLOUDSTACK-10340: Add setter to hypervisorType in VMInstanceVO (#2504) This adds a missing setter to set hypervisorType in VMInstanceVO. Signed-off-by: Rohit Yadav --- engine/schema/src/com/cloud/vm/VMInstanceVO.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/engine/schema/src/com/cloud/vm/VMInstanceVO.java b/engine/schema/src/com/cloud/vm/VMInstanceVO.java index b55e030620b..b0ebf2406f5 100644 --- a/engine/schema/src/com/cloud/vm/VMInstanceVO.java +++ b/engine/schema/src/com/cloud/vm/VMInstanceVO.java @@ -267,6 +267,10 @@ public class VMInstanceVO implements VirtualMachine, FiniteStateObject Date: Fri, 23 Mar 2018 07:22:29 +0100 Subject: [PATCH 2/2] CLOUDSTACK-10341: VR minor fixes to systemvmtemplate (#2468) - Fixes rsyslog: fix config error in rsylslog.conf Feb 26 08:09:54 r-413-VM liblogging-stdlog[19754]: action '*' treated as ':omusrmsg:*' - please use ':omusrmsg:*' syntax instead, '*' will not be supported in the future [v8.24.0 try http://www.rsyslog.com/e/2184 ] Feb 26 08:09:54 r-413-VM liblogging-stdlog[19754]: error during parsing file /etc/rsyslog.conf, on or before line 95: warnings occured in file '/etc/rsyslog.conf' around line 95 [v8.24.0 try http://www.rsyslog.com/e/2207 ] - Run apache2 only after cloud-postinit - Increase /run size for VR with 256M RAM root@r-395-VM:~# systemctl daemon-reload Failed to reload daemon: Refusing to reload, not enough space available on /run/systemd. Currently, 15.8M are free, but a safety buffer of 16.0M is enforced. tmpfs 23M 6.5M 16M 29% /run --- systemvm/debian/etc/rsyslog.conf | 2 +- systemvm/debian/etc/systemd/system/cloud-postinit.service | 2 +- tools/appliance/systemvmtemplate/scripts/finalize.sh | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/systemvm/debian/etc/rsyslog.conf b/systemvm/debian/etc/rsyslog.conf index 8dc7c7504ca..c7de03d5ad6 100644 --- a/systemvm/debian/etc/rsyslog.conf +++ b/systemvm/debian/etc/rsyslog.conf @@ -92,7 +92,7 @@ news.notice -/var/log/news/news.notice # # Emergencies are sent to everybody logged in. # -*.emerg * +*.emerg :omusrmsg:* # # I like to have messages displayed on the console, but only on a virtual diff --git a/systemvm/debian/etc/systemd/system/cloud-postinit.service b/systemvm/debian/etc/systemd/system/cloud-postinit.service index c23516e67ff..19ddfcc6384 100644 --- a/systemvm/debian/etc/systemd/system/cloud-postinit.service +++ b/systemvm/debian/etc/systemd/system/cloud-postinit.service @@ -1,7 +1,7 @@ [Unit] Description=CloudStack post-patching init script After=cloud-early-config.service network.target local-fs.target -Before=ssh.service +Before=ssh.service apache2.service Requires=network.service [Install] diff --git a/tools/appliance/systemvmtemplate/scripts/finalize.sh b/tools/appliance/systemvmtemplate/scripts/finalize.sh index 260bddff4e5..e5d15ecb61c 100644 --- a/tools/appliance/systemvmtemplate/scripts/finalize.sh +++ b/tools/appliance/systemvmtemplate/scripts/finalize.sh @@ -24,6 +24,12 @@ function configure_misc() { echo "cloud:`openssl rand -base64 32`" | chpasswd } +function configure_rundisk_size() { + # Debian's default is 10% of total RAM. This is too low when total is 256M. + # See https://manpages.debian.org/stretch/initscripts/tmpfs.5.en.html + echo "tmpfs /run tmpfs nodev,nosuid,size=20%,mode=755 0 0" >> /etc/fstab +} + function configure_sudoers() { cat >/etc/sudoers <