CentOS 7.x Cloudstack 4.11 KVM Host setup

From Notes_Wiki
Revision as of 16:52, 8 July 2018 by Saurabh (talk | contribs) (Created page with "<yambe:breadcrumb>CentOS_7.x_Cloudstack_4.11|CentOS 7.x Cloudstack 4.11</yambe:breadcrumb> =CentOS 7.x Cloudstack 4.11 KVM Host setup= To setup a KVM host so that it can beco...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

<yambe:breadcrumb>CentOS_7.x_Cloudstack_4.11|CentOS 7.x Cloudstack 4.11</yambe:breadcrumb>

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:

  1. 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
  2. Disable Selinux by editing /etc/selinux/config
    SELINUX=disabled
  3. Stop & Disable firewalld
    systemctl stop firewalld
    systemctl disable firewalld
  4. 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
  5. Install NTP client as following
    1. yum install ntp -y
    2. Edit /etc/ntp.conf
      server 192.168.2.2
      where 192.168.2.2 is local ntp server
  6. Start and enable ntp service
    systemctl start ntpd
    systemctl enable ntpd
  7. 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
  8. 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
  9. 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.
  10. 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:
    1. In bridge configuration append:
      HOTPLUG=no
      DELAY=0
      STP=no
    2. 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.
  11. 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
  12. Uncomment below parameter in /etc/sysconfig/libvirtd file:
    LIBVIRTD_ARGS="--listen"
  13. Start and enable the libvirtd service using:
    systemctl start libvirtd
    systemctl enable libvirtd
  14. Install CloudStack agent using:
    yum install cloudstack-agent -y
  15. Start and enable CloudStack agent using:
    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.



<yambe:breadcrumb>CentOS_7.x_Cloudstack_4.11|CentOS 7.x Cloudstack 4.11</yambe:breadcrumb>