安装环境: Ubuntu12.04 Server
安装包: libvirt-1.0.0
2012.12.22更新:libvirt版本的发布速度很快,不过安装方法基本是不变的,如不想花大把时间看完一下全文,这里总结一点:正确安装libvirt的前提是要有如下依赖包:gcc、make、pkg-config、libxml2-dev、libgnutls-dev、libdevmapper-dev、libcurl4-gnutls(xen)、python-dev(可能早期版本还需要libyajl-dev)
./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc
configure附上参数可以完成覆盖原有libvirt
第一阶段:
以下操作都是在root模式下使用
Ubuntu缺省情况下,没有提供C/C++的编译环境,所以还需手动安装如下包
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
因为libvirt1.0.0中包含有支持python 的库
apt-get install python-dev
error: libnl-devel >= 1.1 is required for macvtap support
apt-get install libnl-dev
安装完libnl-dev后还是报同样的错误,我们安装pkg-config 修改一下以安装的libnl-devel的版本
apt-get install pkg-config
pkg-config --modversion libnl-1
第二阶段:
此时基本上没什么错误了,接下来就是
make
make install
安装完成后,我们用 virsh list 命令检查libvirt是否可用了
virsh: error while loading shared libraries: libvirt.so.0: cannot open shared object file: No such file or directory
有一种可能就是系统第一次在/usr/local下手动编译安装程序,执行ldconfig命令更新动态链接库缓存
又出现不一样的错
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
查看libvirt进程是否启动? ps -le | grep libvirt* 如果没有启动,那么上面的错误就是这个原因
现在启动libvirt进程 libvirtd -d
现在检查是否安装成功 virsh version ,出现版本 1.0.0 安装成功。
第三阶段:
启动默认虚拟网络 virsh net-start default
error: Failed to start network default
error: Cannot find 'dnsmasq' in path: No such file or directory
apt-get install dnsmasq-base
如果发布虚拟机网络配置是bridge的话不影响,只是在选择net模式的就会有问题。
virsh freecell 出现的错误
error: this function is not supported by the connection driver: NUMA memory information not available on this platform
安装
apt-get install libnuma1 libnuma-dev
加上配置的启动:/usr/local/sbin/libvirtd -d --listen --config /usr/local/etc/libvirt/libvirtd.conf
分享到:
相关推荐
libvirt编译安装
编译的libvirt-php,基于国产飞腾2000_64加麒麟OS+PHP7.4.13。适用于KVM
libvirt源码,用于安装,0.9.11
NULL 博文链接:https://charlescui.iteye.com/blog/577640
libvirt-snmp 虚拟化网络管理接口工具,解包后编译,安装方法可以看http://blog.csdn.net/gg296231363/article/details/6927759
编译后直接可用的libvirt-java.jar,java监控虚拟机的必要jar包
并配置:专用的libvirt dnsmasq配置专用的libvirt网络(完全可自定义)专用的libvirt存储池(完全可自定义)地貌libvirt-terraform-provider(基于编译和初始化)您可以选择以下选项来自定义设置:您要使用的容器...
编译的libvirt-php,基于国产龙芯3A4000加UOS系统+PHP7.4.13。适用于KVM。
编译的libvirt-php,基于X86_64 CPU+麒麟OS+PHP7.4.13。适用于KVM.
官方离线安装包,亲测可用。使用rpm -ivh [rpm完整包名] 进行安装
利用Arduino从libvirt连接和分离设备。配置热键您可以按原样构建它以响应Arduino按钮,也可以按照以下步骤将其映射到热键组合。 使用make hotkey构建项目。 像这样进行编译将禁用arduino热键,而服务器将侦听TCP...
从OpenCV官网下载的4.5.0版本的源码,通过emscripten编译得到opencv.js。除了opencv.js之外,还带有一个index.html文件,是官网对opencv.js使用的一个简单示例。
天网 ... dnf install protobuf-compiler protobuf-devel libpcap-devel libvirt 提供了一个Makefile来简化skydive的编译: make skydive 这将下载正确版本的skydive(当前是我的私人分支),进行构建
openshift-baremetal-install是从源代码下载或编译的(带有要应用的PR号的附加列表) 停止节点通过ipmi进行部署 针对一组裸机节点启动安装。虚拟主机也可以部署。 为什么 在配置节点上使用bare minimum部署bare ...
灰烬的CSI- 多供应商CSI插件驱动程序,在单个插件中支持80多个存储驱动程序,以向block Orchestration系统(例如Kubernetes和OpenShift)提供... 注意:测试脚本将安装必要的软件包,例如KVM,libvirt,tinyproxy ...
备份计划 Backup-cron是基于GNU工具和Cron... 它实现依赖关系管理,对软件包进行微调以适合管理员,假安装(OpenBSD风格),编译期间的测试环境,安全卸载,系统配置文件,虚拟软件包,配置文件管理以及同一软件包不同