The reason for compilation and installation is mainly to test its new features by using the latest libvirt and qemu versions.
1. libvirt-1.0.4 compilation Installation
(1) install GCC and dependent Software
- Sudo apt-Get install libxml2-dev libgnutls-Dev
Libdevmapper-dev Python-dev libnl-dev libpciaccess-Dev
Build-essential
(2) Configure Configuration
- ./Configure -- prefix =/usr -- localstatedir =/var -- sysconfdir =/etc
(3) Compile and install
- Make & sudo make install
2. qemu-1.4 compilation Installation
(1) install the dependent software, where UML-utilities
Bridge-utils is used for KVM bridges. If no bridge is used, you do not need to install
- Sudo apt-Get install libzip-dev libsdl1.2-Dev
UML-utilities DH-autoreconf bridge-utils
(2) Configure Configuration
- ./Configure -- target-list = x86_64-softmmu -- prefix =/usr -- localstatedir =/var -- sysconfdir =/etc
(3) Compile and install: Make & sudo make install
3. Problems encountered and Solutions
Question 1:
Error: failed to connect to the hypervisor
Error: no valid connection
Error: failed to connect socket to '/var/run/libvirt-Sock': no such file or directory
Libmongod is not started. Just start it.
- Sudo libmongod-d
Question 2:
Dylan @ LAPTOP :~ $ Virsh net-start default
Error: failed to get network 'default'
Error: network not found: No network with matching name 'default'
This is because libvirt does not create the default network. You can create it manually:
- Virsh net-Define/etc/libvirt/qemu/networks/Default. xml
- Vrsh net-start default