Installation Environment: Ubuntu12.04 Server
Installation package: libvirt-1.0.0
2012.12.22 Update: Libvirt version of the release is very fast, but the installation method is basically the same, if you do not want to spend a lot of time to read the full text, here is summed up: The premise of the correct installation of Libvirt is to have the following dependency package: gcc, make, pkg-config, Libxml2-dev, Libgnutls-dev, Libdevmapper-dev, Libcurl4-gnutls (Xen), Python-dev (may also require Libyajl-dev in earlier versions)
./configure--prefix=/usr--localstatedir=/var--sysconfdir=/etc
Configure attached parameters can be completed to cover the original Libvirt
First stage:
The following actions are used in root mode
Ubuntu By default, there is no compiled environment for C/A + +, so it is necessary to manually install the following packages
sudo apt-get install build-essential
./configure
Error:could not find libxml2 anywhere
Apt-get Install LIBXML2 Libxml2-dev
Error:you must install the GNUTLS library in order to compile and run Libvirt
Apt-get Install Gnutls-bin Libgnutls-dev
Error:you must install Device-mapper-devel/libdevmapper >= 1.0.0 to compile Libvirt
Apt-get Install libdevmapper1.02.1 Libdevmapper-dev
Error:you must install Python-devel to build Python bindings
Because a python-enabled library is included in the libvirt1.0.0
Apt-get Install Python-dev
Error:libnl-devel >= 1.1 is required for MACVTAP support
Apt-get Install Libnl-dev
After installing Libnl-dev or reporting the same error, we install Pkg-config to modify the version of the Libnl-devel installed
Apt-get Install Pkg-config
Pkg-config--modversion Libnl-1
Phase II:
There's basically nothing wrong with that, and then
Make
Make install
After the installation is complete, we use the Virsh List command to check if the Libvirt is available.
Virsh:error while loading shared libraries:libvirt.so.0:cannot open Shared object file:no such file or directory
One possibility is that the system compiles the installer manually under/usr/local for the first time, and executes the ldconfig command to update the dynamic-link library cache
And there's a different mistake.
Error:failed to reconnect to the hypervisor
Error:no Valid connection
Error:failed to connect socket to '/usr/local/var/run/libvirt/libvirt-sock ': No such file or directory
See if the libvirt process is started? Ps-le | grep libvirt* If not started, then the above error is the reason
Now start the Libvirt process libvirtd-d
Now check to see if the installation succeeded Virsh version, 1.0.0 installation succeeded.
Phase III:
Start the default virtual network Virsh Net-start
error:failed to start Network default
Error:cannot find ' dnsmasq ' in path:no such file or directory
Apt-get Install Dnsmasq-base
If you publish a virtual machine network configuration is bridge, it is not affected, but in the choice of net mode will be problematic.
Virsh FreeCell Error occurred
Error:this function is not supported by the connection Driver:numa memory information not available on this platform
Installation
Apt-get Install LIBNUMA1 Libnuma-dev
Libvirt Compiling and installing