@@ -72,6 +72,8 @@ info "Installing dependencies"
7272# apt-get update
7373apt-get install -y openssh-server sudo wget jq htop tar nmap bridge-utils
7474
75+ # FIXME: check for host spec (min 4-8G RAM?) /dev/kvm and
76+
7577# ## Setup Bridge ###
7678
7779setup_bridge () {
@@ -178,7 +180,7 @@ configure_storage() {
178180configure_host () {
179181 info " Configuring KVM on this host"
180182 sed -i -e ' s/\#vnc_listen.*$/vnc_listen = "0.0.0.0"/g' /etc/libvirt/qemu.conf
181- if ! grep ' LIBVIRTD_ARGS="--listen"' /etc/default/libvirtd > /dev/null; then
183+ if ! grep ' ^ LIBVIRTD_ARGS="--listen"' /etc/default/libvirtd > /dev/null; then
182184 echo LIBVIRTD_ARGS=\" --listen\" >> /etc/default/libvirtd
183185 fi
184186 if ! grep ' listen_tcp=1' /etc/libvirt/libvirtd.conf > /dev/null; then
@@ -191,8 +193,8 @@ configure_host() {
191193 systemctl restart libvirtd
192194
193195 # Ubuntu: disable apparmor
194- ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/
195- ln -s /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper /etc/apparmor.d/disable/
196+ ln -sf /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/
197+ ln -sf /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper /etc/apparmor.d/disable/
196198 apparmor_parser -R /etc/apparmor.d/usr.sbin.libvirtd
197199 apparmor_parser -R /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper
198200 fi
@@ -264,12 +266,12 @@ deploy_zone() {
264266 # sudo nmap -v -sn -n 192.168.1.0/24 -oG - | awk '/Status: Down/{print $2}'
265267 # FIXME: prompt for IP range?
266268 RANGE=$( echo $GATEWAY | sed ' s/\..$//g' )
267- pod_start=
268- pod_end=
269+ pod_start=192.168.10.200
270+ pod_end=192.168.10.220
269271 pod_gw=$GATEWAY
270272 pod_mask=255.255.255.0
271- ip_start=
272- ip_end=
273+ ip_start=192.168.10.221
274+ ip_end=192.168.10.240
273275 ip_gw=$GATEWAY
274276 ip_mask=255.255.255.0
275277
@@ -284,7 +286,7 @@ deploy_zone() {
284286 # Add by CloudStack Management Server's public key
285287 mkdir -p /root/.ssh
286288 cat /var/lib/cloudstack/management/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys
287- cmk add host zoneid=$zone_id podid=$pod_id clusterid=$cluster_id clustertype=CloudManaged hypervisor=KVM username=root url=http://$HOST_IP
289+ cmk add host zoneid=$zone_id podid=$pod_id clusterid=$cluster_id clustertype=CloudManaged hypervisor=KVM username=root password= url=http://$HOST_IP
288290
289291 cmk create storagepool zoneid=$zone_id podid=$pod_id clusterid=$cluster_id name=Primary-StoragePool1 scope=zone hypervisor=KVM url=nfs://$HOST_IP /export/primary
290292
@@ -324,7 +326,8 @@ install_completed
324326
325327# ## Installer: Deploy Zone ###
326328
327- # deploy_zone
329+ # FIXME: configuration global setting & restart mgmt server
330+ deploy_zone
328331
329332# ## Installer: Finish ###
330333
0 commit comments