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

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:~#
主站蜘蛛池模板: 苗栗市| 当阳市| 卢龙县| 新绛县| 台北市| 潮安县| 容城县| 武鸣县| 大宁县| 唐河县| 内丘县| 康定县| 延安市| 额济纳旗| 体育| 磴口县| 庄浪县| 安西县| 丘北县| 永善县| 科技| 老河口市| 宁阳县| 高唐县| 孟津县| 鲁山县| 罗定市| 鄂托克前旗| 休宁县| 尖扎县| 镇康县| 新绛县| 建始县| 嘉荫县| 库车县| 运城市| 南通市| 侯马市| 乐平市| 凉山| 井冈山市|