官术网_书友最值得收藏!

How to do it...

To install libvirt from packages and source follow the following steps:

  1. On Ubuntu, install the package by running:
root@kvm:~# apt update && apt install libvirt-bin
root@kvm:~#
  1. Ensure that the libvirt daemon is running by executing:
root@kvm:~# pgrep -lfa libvirtd
36667 /usr/sbin/libvirtd
root@kvm:~#
  1. Examine the default configuration:
root@kvm:~# cat /etc/libvirt/libvirtd.conf | grep -vi "#"
| sed '/^$/d'
unix_sock_group = "libvirtd"
unix_sock_ro_perms = "0777"
unix_sock_rw_perms = "0770"
auth_unix_ro = "none"
auth_unix_rw = "none"
root@kvm:~#
  1. Disable the security driver in QEMU by editing the qemu configuration file as follows:
root@kvm:~# vim /etc/libvirt/qemu.conf
...
security_driver = "none"
...
root@kvm:~#
  1. Restart the libvirt daemon:
root@kvm:~# /etc/init.d/libvirt-bin restart
libvirt-bin stop/waiting
libvirt-bin start/running, process 1158
root@kvm:~#
Depending on your Linux distribution, the name of the libvirt service may be different. On RHEL/CentOS, the name of the service is libvirtd; to restart it, run service libvirtd restart.
  1. Examine all configuration files in the libvirt directory:
root@kvm:~# ls -la /etc/libvirt/
total 76
drwxr-xr-x 5 root root 4096 Mar 22 14:27 .
drwxr-xr-x 90 root root 4096 Mar 21 23:17 ..
drwxr-xr-x 2 root root 4096 Feb 5 2016 hooks
-rw-r--r-- 1 root root 518 Feb 5 2016 libvirt.conf
-rw-r--r-- 1 root root 13527 Feb 5 2016 libvirtd.conf
-rw-r--r-- 1 root root 1176 Feb 5 2016 lxc.conf
drwxr-xr-x 2 root root 4096 Mar 21 23:16 nwfilter
drwxr-xr-x 3 root root 4096 Mar 21 23:57 qemu
-rw------- 1 root root 16953 Mar 21 23:18 qemu.conf
-rw-r--r-- 1 root root 2170 Feb 5 2016 qemu-lockd.conf
-rw-r--r-- 1 root root 2213 Feb 5 2016 virtlockd.conf
-rw-r--r-- 1 root root 1217 Feb 5 2016 virt-login-shell.conf
root@kvm:~#
主站蜘蛛池模板: 绥阳县| 阿勒泰市| 博野县| 旅游| 余姚市| 台北市| 桐城市| 修水县| 成武县| 昭通市| 汉沽区| 临汾市| 夏津县| 周口市| 武宁县| 龙口市| 上饶县| 库车县| 拉萨市| 多伦县| 中西区| 海丰县| 社旗县| 怀远县| 且末县| 新宁县| 汽车| 宜川县| 景德镇市| 甘肃省| 高邑县| 耒阳市| 大埔区| 凌海市| 永仁县| 阜城县| 开封市| 宜兰县| 平顺县| 博爱县| 团风县|