Guest User

Compiling Libvirt 1.2.3 on CentOS 6.5

a guest
Jun 20th, 2014
459
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.53 KB | None | 0 0
  1. #####################################################################################
  2. ### REPLACING STOCK CENTOS/RHEL LIBVIRT 0.10.2 with 1.2.3 with RBD/CEPH support ###
  3. #####################################################################################
  4. #####################################################################################
  5. #####################################################################################
  6. #qemu-kvm and qemu-kvm-tools must be installed
  7.  
  8.  
  9. ######################################################
  10. ### COMPILE AND MAKE, PREPARE FOR MAKE INSTALL: ###
  11. ######################################################
  12. mkdir /root/src-DONT-TOUCH/
  13. cd /root/src-DONT-TOUCH/
  14. pwd
  15. wget http://libvirt.org/sources/libvirt-1.2.3.tar.gz
  16. tar -zxf libvirt-1.2.3.tar.gz
  17. cd libvirt-1.2.3/
  18. yum install libxml2-devel device-mapper-devel libpciaccess-devel libpciaccess libnl-devel gnutls-devel yajl-devel libblkid-devel ceph-devel libcurl-devel python-devel ncurses-devel
  19. yum install gcc make autoconf automake bison byacc flex gcc gcc-c++ gettext libstdc++ libtool make patch rpm-build glib2*
  20. yum install numactl numactl-devel
  21. ./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc --libdir=/usr/lib64 --with-numactl --with-numad --with-storage-rbd --with-curl --with-blkid
  22. make
  23. #backup original config files
  24. rsync -av /etc/libvirt/ /etc/libvirt-stock-version/
  25. cp /etc/sysconfig/libvirtd /etc/libvirt-stock-version-sysconfig-libvirtd
  26. cp /etc/sysconfig/libvirt-guests /etc/libvirt-stock-version-sysconfig-libvirt-guests
  27.  
  28. #################################################################
  29. ### CS2: REMOVE OLD LIBCIRT, MAKE INSTALL NEW EDIT CONFIG FILES #
  30. #################################################################
  31. rpm -e --nodeps libvirt
  32. rpm -e --nodeps libvirt-client
  33. cd libvirt-1.2.3/
  34. make install
  35. ldconfig
  36. #FIREWALL WAS MODIFIED BY INSTALL
  37. service iptables stop
  38. chkconfig iptables off
  39. #DELETE DEFAULT NETWORK
  40. virsh net-destroy default
  41. virsh net-undefine default
  42.  
  43. EDIT: /etc/libvirt/libvirtd.conf
  44. # compare with RPMSAVE version
  45. listen_tcp=1
  46. tcp_port="16509"
  47. auth_tcp="none"
  48. listen_tls=0
  49. mdns_adv = 0
  50.  
  51. EDIT /etc/libvirt/qemu.conf
  52. # compare with RPMSAVE version
  53. cgroup_controllers=["cpu"]
  54. security_driver="none"
  55. user="root"
  56. group="root"
  57. vnc_listen="0.0.0.0"
  58.  
  59. /etc/sysconfig/libvirtd
  60. # compare with RPMSAVE version
  61. export CGROUP_DAEMON='cpu:/virt'
  62. LIBVIRTD_ARGS=-l
  63.  
  64. service libvirtd restart
  65. chkconfig --add libvirtd
  66. chkconfig libvirtd on
  67.  
  68. RESTART EACH VM, try to deploy new VM, etc...
Advertisement
Add Comment
Please, Sign In to add comment