ubuntu编译安装libvirt
环境安装
sudo apt-get update -y
sudo apt-get install qemu-system-x86 bridge-utils -y
sudo apt-get install build-essential autoconf automake libtool -y
sudo apt-get install libxml2-dev libxslt1-dev libgnutls28-dev libpciaccess-dev libnl-3-dev libnl-route-3-dev -y
sudo apt-get install pkg-config python3-dev ruby-dev gettext libparted-dev libyaml-dev libssh2-1-dev -y
sudo apt-get install meson ninja-build -y
sudo apt-get install libxml2-utils -y
sudo apt install -y xsltproc -y
sudo apt install libmount-devel -y
sudo apt-get install libglib2.0-dev pkg-config -y
sudo apt-get install python3-docutils -y
sudo apt install virt-manager -y
libvirt下载
git clone https://gitee.com/openeuler/libvirt.git
编译安装
cd libvirt
sudo mkdir build
meson setup build -Dbuildtype=debug -Dsystem=true
sudo ninja -C build
sudo ninja -C build install
libivrt服务状态查看
sudo systemctl status libvirtd
编译安装libivrtd配置文件的位置
8.x
/usr/local/etc/libvirt/libvirtd.conf
10.x
/etc/libvirt/libvirtd.conf
安装qemu-kvm,输入命令无反应
sudo ln -s /usr/bin/qemu-system-x86_64 /usr/bin/qemu-kvm