我在 ubuntu 20.04 上运行 xen,我正在尝试使用 virt-manager 创建一个新的 xen 连接,但它不起作用,因为错误:“无法将套接字连接到 '/var/run/libvirt/-virtxend -sock. 找不到文件或目录”。我试着做:
root@ziomario-I9:/etc/xen# systemctl status libvirtd
● libvirtd.service - Virtualization daemon
Loaded: loaded (/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2020-07-14 07:41:04 CEST; 14h ago
TriggeredBy: ● libvirtd-admin.socket
● libvirtd.socket
● libvirtd-ro.socket
Docs: man:libvirtd(8)
https://libvirt.org
Main PID: 2376 (libvirtd)
Tasks: 17 (limit: 32768)
Memory: 41.0M
CGroup: /system.slice/libvirtd.service
└─2376 /usr/sbin/libvirtd
lug 14 21:31:19 ziomario-I9 libvirtd[2376]: End of file while reading data: Error di input/output
lug 14 21:33:15 ziomario-I9 libvirtd[2376]: Failed to connect socket to '/var/run/libvirt/virtxend-sock': File o directory not found
lug 14 21:33:15 ziomario-I9 libvirtd[2376]: End of file while reading data: Errore di input/output
lug 14 21:39:29 ziomario-I9 libvirtd[2376]: Failed to connect socket to '/var/run/libvirt/virtxend-sock': File o directory no>
lug 14 21:39:29 ziomario-I9 libvirtd[2376]: End of file while reading data: Error input/output
lug 14 21:41:13 ziomario-I9 libvirtd[2376]: operation failed: pool 'default' already exists with uuid 4794da80-c4ef-43a5-aee5>
lug 14 21:41:23 ziomario-I9 libvirtd[2376]: Failed to connect socket to '/var/run/libvirt/virtbhyved-sock': File or directory not found
lug 14 21:41:23 ziomario-I9 libvirtd[2376]: End of file while reading data: Errore di input/output
lug 14 21:41:46 ziomario-I9 libvirtd[2376]: Failed to connect socket to '/var/run/libvirt/virtxend-sock': File o directory no>
lug 14 21:41:46 ziomario-I9 libvirtd[2376]: End of file while reading data: Errore di input/output
我也尝试过:
sudo systemctl enable libvirtd
sudo systemctl start libvirtd
但我得到了同样的结果。我能做些什么 ?
更新 :
root@ziomario-I9:/etc/xen# apt install libvirt-daemon-driver-xen
root@ziomario-I9:/etc/xen# sudo systemctl restart libvirtd
root@ziomario-I9:/etc/xen# systemctl status libvirtd
lines 1--1...skipping...
● libvirtd.service - Virtualization daemon
Loaded: loaded (/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Wed 2020-07-15 18:14:28 CEST; 18s ago
TriggeredBy: ● libvirtd-admin.socket
● libvirtd.socket
● libvirtd-ro.socket
Docs: man:libvirtd(8)
https://libvirt.org
Process: 31289 ExecStart=/usr/sbin/libvirtd $libvirtd_opts (code=exited, status=0/SUCCESS)
Main PID: 31289 (code=exited, status=0/SUCCESS)
lug 15 18:14:27 ziomario-I9 systemd[1]: Starting Virtualization daemon...
lug 15 18:14:27 ziomario-I9 systemd[1]: Started Virtualization daemon.
lug 15 18:14:28 ziomario-I9 libvirtd[31289]: libvirt version: 6.0.0, package: 0ubuntu8.1 (Christian Ehrhardt <christian.ehrha>
lug 15 18:14:28 ziomario-I9 libvirtd[31289]: hostname: ziomario-I9
lug 15 18:14:28 ziomario-I9 libvirtd[31289]: Unable to configure libxl's memory management parameters
lug 15 18:14:28 ziomario-I9 libvirtd[31289]: Initialization of LIBXL state driver failed: no error
lug 15 18:14:28 ziomario-I9 libvirtd[31289]: Driver state initialization failed
lug 15 18:14:28 ziomario-I9 systemd[1]: libvirtd.service: Succeeded.
现在错误是:
libxenlight 状态驱动程序未激活。
LOG收集了这个盔甲否认,但他们之前出现过创建xen域:
root@ziomario-I9:/home/ziomario# dmesg -w | grep apparmor
[ 5.887830] evm: security.apparmor
[ 31.653223] audit: type=1400 audit(1594897201.258:2): apparmor="STATUS" operation="profile_load" profile="unconfined" name="libreoffice-senddoc" pid=665 comm="apparmor_parser"
[ 31.702186] audit: type=1400 audit(1594897201.306:3): apparmor="STATUS" operation="profile_load" profile="unconfined" name="libreoffice-xpdfimport" pid=672 comm="apparmor_parser"
[ 31.802911] audit: type=1400 audit(1594897201.406:4): apparmor="STATUS" operation="profile_load" profile="unconfined" name="libreoffice-oopslash" pid=671 comm="apparmor_parser"
[ 31.823300] audit: type=1400 audit(1594897201.430:5): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/ipsec/stroke" pid=663 comm="apparmor_parser"
[ 31.953066] audit: type=1400 audit(1594897201.558:6): apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe" pid=669 comm="apparmor_parser"
[ 31.953076] audit: type=1400 audit(1594897201.558:7): apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe//kmod" pid=669 comm="apparmor_parser"
[ 31.966592] audit: type=1400 audit(1594897201.570:8): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/bin/man" pid=660 comm="apparmor_parser"
[ 31.966601] audit: type=1400 audit(1594897201.570:9): apparmor="STATUS" operation="profile_load" profile="unconfined" name="man_filter" pid=660 comm="apparmor_parser"
[ 31.966607] audit: type=1400 audit(1594897201.570:10): apparmor="STATUS" operation="profile_load" profile="unconfined" name="man_groff" pid=660 comm="apparmor_parser"
[ 31.975582] audit: type=1400 audit(1594897201.582:11): apparmor="STATUS" operation="profile_load" profile="unconfined" name="lsb_release" pid=664 comm="apparmor_parser"
[ 48.715193] audit: type=1400 audit(1594897218.322:59): apparmor="DENIED" operation="open" profile="/{,usr/}sbin/dhclient" name="/proc/1733/task/1734/comm" pid=1733 comm="dhclient" requested_mask="wr" denied_mask="wr" fsuid=0 ouid=0
[ 48.715835] audit: type=1400 audit(1594897218.322:60): apparmor="DENIED" operation="open" profile="/{,usr/}sbin/dhclient" name="/proc/1733/task/1735/comm" pid=1733 comm="dhclient" requested_mask="wr" denied_mask="wr" fsuid=0 ouid=0
[ 48.716222] audit: type=1400 audit(1594897218.322:61): apparmor="DENIED" operation="open" profile="/{,usr/}sbin/dhclient" name="/proc/1733/task/1736/comm" pid=1733 comm="dhclient" requested_mask="wr" denied_mask="wr" fsuid=0 ouid=0
[ 137.782108] audit: type=1400 audit(1594897307.641:62): apparmor="DENIED" operation="capable" profile="/usr/sbin/cups-browsed" pid=2396 comm="cups-browsed" capability=23 capname="sys_nice"
[ 183.363064] audit: type=1400 audit(1594897353.229:63): apparmor="STATUS" operation="profile_load" profile="unconfined" name="docker-default" pid=3461 comm="apparmor_parser"