0

I'm running xen on ubuntu 20.04 and I'm trying to create a new xen connection with virt-manager,but it does not work,because the error : "failed to connect socket to '/var/run/libvirt/-virtxend-sock. file or directory not found". I tried to do :

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

I tried also to do :

sudo systemctl enable libvirtd
sudo systemctl start libvirtd

but I got the same result. what can I do ?

UPDATE :

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.

now the error is :

libxenlight state driver is not active.

LOG gathered this armor denials,but they appeared before to create the xen domain :

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"
4
  • Hi @mark2020 checking a few common issues - do you have a related apparmor denial in dmesg? Furthermore that socket should only be needed if using split daemons for virtxend which Ubuntu doesn't use in 20.04. But maybe you miss the function - libvirt xen support is now a separate not default installed package - consider installing libvirt-daemon-driver-xen and then restarting libvirtd. – Christian Ehrhardt Jul 15 '20 at 8:29
  • refresh the page please. I added more informations. what should I do for adding the apparmor denial in dmesg ? – mark2020 Jul 15 '20 at 16:17
  • Hi @mark2020, since this seems to be the answer to this issue I converted it to an answer that you can +1. I have suggested ideas on the follow on issue already. – Christian Ehrhardt Jul 16 '20 at 7:23
0

Checking a few common issues:

#1 do you have a related apparmor denial in dmesg? You'd in one console run dmesg -w and then on another start your guest. If the log gathered has any appamor ... DENIED ... messages check them and consider adding rules accordingly.

#2 Furthermore that socket should only be needed if using split daemons for virtxend which Ubuntu doesn't use in 20.04. But maybe you miss the function - libvirt xen support is now a separate not default installed package - consider installing libvirt-daemon-driver-xen and then restarting libvirtd.

apt install libvirt-daemon-driver-xen
systemctl restart libvirtd
2
  • refresh the page. It does not seems that the guest produced armor denials,but anyway,it still does not work. – mark2020 Jul 16 '20 at 12:09
  • I'm stil getting this error: failed to connect to the hypervisor error: internal error: libxenlight state driver is not active. – mark2020 Jul 16 '20 at 12:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.