CentOS 7.x Cloudstack 4.11 KVM Host setup
From Notes_Wiki
Home > CentOS > CentOS 7.x > CentOS 7.x Cloudstack 4.11 > CentOS 7.x Cloudstack 4.11 KVM Host setup
To setup a KVM host so that it can become part of cloudstack cluster use following steps:
- Full install CentOS 7.4. Basically we need at least:
- yum -y install epel-release
- yum groupinstall -y "Development Tools"
- yum install -y java-1.8.0-openjdk-devel.x86_64 genisoimage ws-commons-util MySQL-python createrepo
- Disable Selinux by editing /etc/selinux/config
- SELINUX=disabled
- Stop & Disable firewalld
- systemctl stop firewalld
- systemctl disable firewalld
- Set linux system hostname by editing /etc/hostname
- hostname.domain.com
-
- and also edit /etc/hosts to reflect the same:
- 192.168.1.2 hostname.domain.com hostname
- and also edit /etc/hosts to reflect the same:
- Install NTP client as following
- yum install ntp -y
- Edit /etc/ntp.conf
- server 192.168.2.2
-
- where 192.168.2.2 is local ntp server
- Start and enable ntp service
- systemctl start ntpd
- systemctl enable ntpd
- Configuring cloudstack repository using '/etc/yum.repos.d/cloudstack.repo'
- [cloudstack]
- name=cloudstack
- baseurl=http://cloudstack.apt-get.eu/centos/7/4.11/
- enabled=1
- gpgcheck=0
- Install KVM and related packages using:
- yum install -y qemu-kvm qemu-img virt-manager libvirt libvirt-python libvirt-client virt-install virt-viewer bridge-utils
- Create /mnt/primary and /mnt/secondary empty folders for cloudstack to mount primary and secondary storages at later stage. As such only primary storages are mounted on KVM hosts and secondary storages are not mounted.
- Create bridges for host and management communication eg cloudbr0, cloudbr1, etc. Compared to Creating bridge interfaces (br0) for virtual hosts to use shared interface. Also do following:
- In bridge configuration append:
- HOTPLUG=no
- DELAY=0
- STP=no
- In interface configuration append:
- HOTPLUG=no
-
- This is apart from normal TYPE=Bridge or BRIDGE=<bridge-name> etc. configuration already described in reference link above.
- In bridge configuration append:
- Change below parameters in /etc/libvirt/libvirtd.conf file using:
- listen_tls = 0
- listen_tcp = 1
- tcp_port = "16509"
- auth_tcp = "none"
- mdns_adv = 0
- Uncomment below parameter in /etc/sysconfig/libvirtd file:
- LIBVIRTD_ARGS="--listen"
- Start and enable the libvirtd service using:
- systemctl start libvirtd
- systemctl enable libvirtd
- Install CloudStack agent using:
- yum install cloudstack-agent -y
- Start and enable CloudStack agent using:
- systemctl daemon-reload
- systemctl start cloudstack-agent.service
- systemctl enable cloudstack-agent.service
-
- Note that service would be in failed status unless we add this host to cloudstack management server, but still it is important to run the start command mentioned here.
Home > CentOS > CentOS 7.x > CentOS 7.x Cloudstack 4.11 > CentOS 7.x Cloudstack 4.11 KVM Host setup