https://libvirt.org/compiling.htmlhttps://libvirt.org/compiling.html

目录

Compiling a release tarball

Building from a GIT checkout


Compiling a release tarball

libvirt uses the standard setup/build/install steps and mandates that the build directory is different from the source directory:

$ xz -dc libvirt-x.x.x.tar.xz | tar xvf -
$ cd libvirt-x.x.x
$ meson build

The meson script can be given options to change its default behaviour.

Note: Please ensure that you have the appropriate minimal meson version installed in your build environment. The minimal version for a specific package can be checked in the top level meson.build file in the meson_version field.

To get the complete list of the options run the following command:

$ meson configure

When you have determined which options you want to use (if any), continue the process.

Note the use of sudo with the ninja install command below. Using sudo is only required when installing to a location your user does not have write access to. Installing to a system location is a good example of this.

If you are installing to a location that your user does have write access to, then you can instead run the ninja install command without putting sudo before it.

$ meson build [possible options]
$ ninja -C build
$ sudo ninja -C build install

At this point you may have to run ldconfig or a similar utility to update your list of installed shared libs.

Building from a GIT checkout

The libvirt build process uses Meson build system. By default when the meson is run from within a GIT checkout, it will turn on -Werror for builds. This can be disabled with --werror=false, but this is not recommended.

To build & install libvirt to your home directory the following commands can be run:

$ meson build --prefix=$HOME/usr
$ ninja -C build
$ sudo ninja -C build install

Be aware though, that binaries built with a custom prefix will not interoperate with OS vendor provided binaries, since the UNIX socket paths will all be different. To produce a build that is compatible with normal OS vendor prefixes, use

$ meson build -Dsystem=true
$ ninja -C build

When doing this for day-to-day development purposes, it is recommended not to install over the OS vendor provided binaries. Instead simply run libvirt directly from the source tree. For example to run a privileged libvirtd instance

$ su -
# service libvirtd stop  (or systemctl stop libvirtd.service)
# /home/to/your/checkout/build/src/libvirtd

It is also possible to run virsh directly from the build tree using the ./run script (which sets some environment variables):

$ pwd
/home/to/your/checkout/build
$ ./run ./tools/virsh ....

libvirt Installation相关推荐

  1. linux搭建--centos使用qemu-kvm,libvirt搭建虚拟机,并搭建libvmi来虚拟机自省(四)

    qemu版本:2.4.0.1 libvmi版本:0.10.1 libvirt版本:2.4.0 1.安装qemu sudo yum install virt-viewer tigervnc -y sud ...

  2. linux搭建--ubuntu使用qemu-kvm,libvirt搭建虚拟机,并搭建libvmi来虚拟机自省(三)

    qemu版本:2.4.0.1 libvmi版本:0.10.1 libvirt版本:2.4.0 1.安装qemu 准备工作: sudo apt-get update -ysudo apt-get ins ...

  3. QEMU KVM Libvirt手册(7): 硬件虚拟化

    在openstack中,如果我们启动一个虚拟机,我们会看到非常复杂的参数 qemu-system-x86_64 -enable-kvm -name instance-00000024 -S -mach ...

  4. QEMU KVM libvirt手册(4) – images

    RAW raw是默认的格式,格式简单,容易转换为其他的格式.需要文件系统的支持才能支持sparse file 创建image # qemu-img create -f raw flat.img 10G ...

  5. 在CentOS上进行虚拟化:QEMU、Xen、KVM、LibVirt、oVirt

    Table of Contents 在CentOS上进行虚拟化 1.概述 2.谁做什么? 3. CentOS支持 3.1 CentOS的4 3.2 CentOS的5 Xen4 CentOS快速入门 0 ...

  6. libvirt 问题解决记录集

    本篇记录在使用libvirt的时候遇到的一些情况,即解决方法. 出现Permission denied [root@localhost vm]# virsh start centos error: F ...

  7. libvirt 详解(1)

    1.1 libvirt 1.1.1 libvirt简介 提到KVM的管理工具,首先不得不介绍的就是大名鼎鼎的libvirt,因为libvirt是目前使用最为广泛的对KVM虚拟机进行管理的工具和应用程序 ...

  8. libvirt零知识学习6 —— libvirt源码编译安装(4)

    接前一篇文章libvirt零知识学习5 -- libvirt源码编译安装(3) 上一篇文章中解决了YAJL包的编译时依赖问题.但是在解决后再次执行meson build时又遇到了新的错误"E ...

  9. libvirt零知识学习3 —— libvirt源码编译安装(1)

    接前一篇文章libvirt零知识学习2 -- libvirt源码下载 上一篇文章中详细介绍了libvirt的源码下载过程,下载了libvirt-8.10.tar.xz并解压.本文在前文的基础上进行源码 ...

最新文章

  1. python 给定URL 如何获取其内容,并将其保存至HTML文档。
  2. 每天一个linux命令:cat
  3. 日文 LaTeX 系统介绍 - 最简示例
  4. linux安卓主线程同步,Android解决:使用多线程和Handler同步更新UI
  5. boost::mp11::mp_or相关用法的测试程序
  6. movs 数据传送指令_PLC中简单好用的传送指令功能,你学会了吗?
  7. Spring Boot定时任务-cron表达式
  8. JS实现图片循环滚动
  9. 阿里天池供应链需求预测比赛小结
  10. pppoe服务器虚拟机,Hyper-V 批量建立虚拟机自动改IP并配置PPPOE拨号
  11. 过滤器为JSP文件生成静态页面
  12. Mac安装Qt出现错误Could not resolve SDK Path for ‘macosx‘
  13. 2012第二届GIS制图大赛——公开课技术问题答疑(珍贵资源哦!)
  14. 互补滤波 二阶低通滤波理解
  15. C# RestClient查询Elasticsearch(附带账号密码)
  16. 云服务器搭建文件存储,云服务器 搭建 文件分类存储
  17. 容器技术—docker stack
  18. iView级联选择器Cascader回显慢的问题
  19. 5.1.2 消费者的加入组和同步组
  20. linux电脑开机显示pciroot,PCI ROOT HID fail=0x5 ACPI Linux错误一般解决之道

热门文章

  1. 涨姿势,简单易懂带你玩转二叉树(图码并茂)
  2. Java 小白:没有项目经验,企业会要我么
  3. SSH实现进销存(ERP)项目之订单管理模块解析(附源码地址)
  4. linux下hba卡服务,在Linux下查看FC HBA卡的速率和状态
  5. 计算机网络 多个站点共享信道的方式图
  6. 【Webpack5 配置分包加载 多文件js/css打包 】
  7. SpringBoot学习(三)
  8. (转)利用AIR的ServerSocket类让 AIR 做socket服务器
  9. 64位树莓派运行linux,树莓派3B+安装64位debian GUN/Linux系统
  10. python登录验证程序_Python模拟用户登录验证