Subject: Libvirt LXC not working?

From: Denis 'GNUtoo' Carikli <[email-masked]>
Date: Wed, 4 Jan 2023 17:53:30 +0100

Hi,

I've tried to run a Parabola installation inside libvirt LXC (inside a
guix system intallation) and it gives me the following error:
> Unable to complete install: 'internal error: guest failed to start: Failure in libvirt_lxc startup: Unable to create directory /sys/fs/cgroup/unified: No such file or directory
> '
> 
> Traceback (most recent call last):
>   File "/gnu/store/mazwqywghxp2gib7bia3n482sky9q14w-virt-manager-4.1.0/share/virt-manager/virtManager/asyncjob.py", line 72, in cb_wrapper
>     callback(asyncjob, *args, **kwargs)
>   File "/gnu/store/mazwqywghxp2gib7bia3n482sky9q14w-virt-manager-4.1.0/share/virt-manager/virtManager/createvm.py", line 2008, in _do_async_install
>     installer.start_install(guest, meter=meter)
>   File "/gnu/store/mazwqywghxp2gib7bia3n482sky9q14w-virt-manager-4.1.0/share/virt-manager/virtinst/install/installer.py", line 695, in start_install
>     domain = self._create_guest(
>   File "/gnu/store/mazwqywghxp2gib7bia3n482sky9q14w-virt-manager-4.1.0/share/virt-manager/virtinst/install/installer.py", line 637, in _create_guest
>     domain = self.conn.createXML(initial_xml or final_xml, 0)
>   File "/gnu/store/sv6lwcmy8529zvdafag0xyv4svw5mz5y-python-libvirt-8.6.0/lib/python3.9/site-packages/libvirt.py", line 4442, in createXML
>     raise libvirtError('virDomainCreateXML() failed')
> libvirt.libvirtError: internal error: guest failed to start: Failure in libvirt_lxc startup: Unable to create directory /sys/fs/cgroup/unified: No such file or directory

Is it already fixed in libvirt master branch? Or is it a new bug?

Also is there any existing workarounds?

Denis.