更多博文关注个人博客: http://cloudbps.com
cloudstack添加主机
一.KVM主机安装kvm环境
[root@testing-kvm01 ~]# cat /etc/redhat-release CentOS release 6.4 (Final) [root@testing-kvm01 ~]# yum -y install yum install kvm kmod-kvm qemu kvm-qemu-img virt-viewer virt-manager libvirt vconfig ntp cloudstack-agent [root@testing-kvm01 ~]# hostname -f
二.修改libvirtd.conf和libvirtd为一下状态
[root@testing-kvm01 ~]# egrep -v '(^#|^$)' /etc/libvirt/libvirtd.conf listen_tls=0 listen_tcp=1 tcp_port="16509" mdns_adv = 0 auth_tcp="none" [root@testing-kvm01 ~]# egrep -v '(^#|^$)' /etc/sysconfig/libvirtd LIBVIRTD_ARGS=-l export CGROUP_DAEMON='cpu:/virt'
三.修改qemu.conf的vpc_listen
[root@testing-kvm01 ~]# grep "vnc_listen" /etc/libvirt/qemu.conf # vnc_listen = "0.0.0.0" # over vnc_listen. vnc_listen="0.0.0.0"
四.启动libvirtd
[root@testing-kvm01 ~]# /etc/init.d/libvirtd start
五.关闭selinux
[root@testing-kvm01 ~]# grep "^SELINUX" /etc/sysconfig/selinux SELINUX=disabled SELINUXTYPE=targete
六.通过web-gui添加主机
NOTE:碰到的问题
[root@testing-kvm01 ~]# tail -100 /var/log/cloudstack/agent/cloudstack-agent.out Unable to start agent: Failed to get private nic name Unable to start agent: Failed to get private nic name
上面的日志报错的原因是/etc/cloudstack/agent/agent.properties的问题。
你要保证里面的对的netword-device的名称要和kvm主机上面的一致否则会报错。