%BOOK_ENTITIES; ]> KVM Setup and installation KVM is the hypervisor we'll be using - we will recover the initial setup which has already been done on the hypervisor host and cover installation of the agent software, you can use the same steps to add additional KVM nodes to your CloudStack environment.
Prerequisites We explicitly are using the management server as a compute node as well, which means that we have already performed many of the prerequisite steps when setting up the management server, but we will list them here for clarity. Those steps are: You shouldn't need to do that for the management server, of course, but any additional hosts will need for you to complete the above steps.
Installation Installation of the KVM agent is trivial with just a single command, but afterwards we'll need to configure a few things. # yum -y install cloud-agent
KVM Configuration We have two different parts of KVM to configure, libvirt, and QEMU.
QEMU Configuration KVM configuration is relatively simple at only a single item. We need to edit the QEMU VNC configuration. This is done by editing /etc/libvirt/qemu.conf and ensuring the following line is present and uncommented. vnc_listen=0.0.0.0
Libvirt Configuration CloudStack uses libvirt for managing virtual machines. Therefore it is vital that libvirt is configured correctly. Libvirt is a dependency of cloud-agent and should already be installed. In order to have live migration working libvirt has to listen for unsecured TCP connections. We also need to turn off libvirts attempt to use Multicast DNS advertising. Both of these settings are in /etc/libvirt/libvirtd.conf Set the following paramaters: listen_tls = 0 listen_tcp = 1 tcp_port = "16059" auth_tcp = "none" mdns_adv = 0 Turning on "listen_tcp" in libvirtd.conf is not enough, we have to change the parameters as well: On RHEL or CentOS modify /etc/sysconfig/libvirtd: Uncomment the following line: #LIBVIRTD_ARGS="--listen" On Ubuntu: modify /etc/init/libvirt-bin.conf Change the following line (at the end of the file): exec /usr/sbin/libvirtd -d to (just add -l) exec /usr/sbin/libvirtd -d -l Restart libvirt In RHEL or CentOS: $ service libvirtd restart In Ubuntu: $ service libvirt-bin restart
KVM configuration complete That concludes our installation and configuration of KVM, and we'll now move to using the CloudStack UI for the actual configuration of our cloud.