[libvirt] Loosing lxc guests when restarting libvirt
cbosdonnat at suse.com
Wed Dec 21 13:36:39 UTC 2016
On Tue, 2016-12-20 at 12:29 +0100, Christian Ehrhardt wrote:
> I found an issue in libvirt related to libvirt-lxc, but fail to find the root cause.
> The TL;DR is: libvirt-lxc guests get killed on libvirt restart due to "internal error: No valid cgroup for machine"
> It was able to reproduce libvirt 1.3.1, 2.4 and 2.5 as packages in Ubuntu and Debian.
> I wanted to ask for two things:
> - wider coverage where this does reproduce
I couldn't reproduce here with openSUSE Tumbleweed and libvirt 2.5 packages.
> - your expertise on the case itself.
It seems that you'll need to check what's going on in virCgroupDetect().
> Steps to reproduce:
> 1. Spawn new KVM Guest of your choice
> 2. install test dependencies
> $ apt-get install libvirt-daemon-system libvirt-clients libxml2-utils
> # or package managers / package names of your chosen os
> 3. run the following sequence as root
> export LIBVIRT_DEFAULT_URI=lxc:///
> cat << EOF > /tmp/smoke-lxc.xml
> <domain type='lxc'>
> <memory unit='KiB'>256000</memory>
> <currentMemory unit='KiB'>256000</currentMemory>
> <vcpu placement='static'>1</vcpu>
> <clock offset='utc'/>
The emulator should be removed from the config for portability
purpose: the libvirt_lxc path may vary from a distro / arch to another
and libvirt's lxc driver is able to auto-add it.
More information about the libvir-list