[arch-general] libvirt / lxc : no valid cgroup for machine
Dear list, I am bulding a VM using libvirt and lxc for linux container. I have an issue with my cgroups settings: gabx@hortensia ➤➤ ~ # virsh start dahlia error: Failed to start domain dahlia error: internal error: No valid cgroup for machine dahlia My environement: Host : Arch Linux - systemd 208-11, libvirt 1.2.1-4 guest : Arch Linux , machine name : dahlia , /etc/libvirt/lxc/dahlia.xml , mounted in /dahlia My set up so far : - gabx@hortensia ➤➤ ~ % sudo virsh uri [sudo] password for root: lxc:/// - gabx@hortensia ➤➤ ~ # virsh -c lxc:/// list --all Id Name State ------------------------------ ---------------------- - dahlia shut off - custom kernel with user space set gabx@hortensia ➤➤ ~ % zgrep USER_NS /proc/config.gz CONFIG_USER_NS=y - /etc/libvirt/lxc/dahlia.xml $ ls -al -rw------- 1 root root 1.1K Feb 15 12:11 /etc/libvirt/lxc/dahlia.xml $ cat <domain type='lxc'> <name>dahlia</name> <uuid>a34b58db-894f-4f4a-81f0-b13d2d5d7732</uuid> <memory unit='KiB'>409600</memory> <currentMemory unit='KiB'>409600</currentMemory> <vcpu placement='static'>1</vcpu> <resource> <partition>/machine/dahlia</partition> </resource> <os> <type arch='x86_64'>exe</type> <init>/bin/init</init> </os> <idmap> <uid start='0' target='1000' count='10'/> <gid start='0' target='1000' count='10'/> </idmap> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> <emulator>/usr/lib/libvirt/libvirt_lxc</emulator> <interface type='network'> <mac address='52:54:00:89:8f:1a'/> <source network='default'/> </interface> <console type='pty'> <target type='lxc' port='0'/> </console> </devices> </domain> - fstab : UUID=f69d032f-c80f-4f2e-84cd-d2328a862818 /dahlia ext4 defaults,relatime,discard 0 1 $ ls -al drwxr-xr-x 17 root root 4.0K Feb 11 21:41 dahlia/ - /etc/cgconfig: group dahlia { perm { # who can manage limits admin { uid = 1000; gid = 1004; } # who can add task task { uid = 1000; gid = 1004; } } # create this group in the controllers cpu { } cpuset { } memory { } devices { } freezer { } net_cls { } blkio { } } - /etc/cgrules is the default one, so everything is commented. Maybe shall I edit a line ?? - gabx@hortensia ➤➤ ~ # cat /proc/cgroups #subsys_name hierarchy num_cgroups enabled cpuset 3 5 1 cpu 4 4 1 cpuacct 4 4 1 memory 5 5 1 devices 6 4 1 freezer 7 5 1 net_cls 8 5 1 blkio 9 4 1 - gabx@hortensia ➤➤ ~ % systemctl status machine-dahlia.slice machine-dahlia.slice - dahlia VM slice Loaded: loaded (/etc/systemd/system/machine-dahlia.slice; static) Active: active since Sat 2014-02-15 11:53:01 CET; 15min ago Feb 15 11:53:01 hortensia systemd[1]: Starting dahlia VM slice. Feb 15 11:53:01 hortensia systemd[1]: Created slice dahlia VM slice. My systemd unit file machine-dahlia.slice in /etc/systemd/system. I am able to boot the container this way: # systemd-nspawn -bD /dahlia Apologize for the long post, but I wanted to detail everything. Thank you for help on my cgroups set up. -- google.com/+arnaudgabourygabx
Am 15.02.2014 14:37, schrieb arnaud gaboury:
Dear list,
I am bulding a VM using libvirt and lxc for linux container. I have an issue with my cgroups settings:
gabx@hortensia ➤➤ ~ # virsh start dahlia error: Failed to start domain dahlia error: internal error: No valid cgroup for machine dahlia [...] <domain type='lxc'> <name>dahlia</name> <uuid>a34b58db-894f-4f4a-81f0-b13d2d5d7732</uuid> <memory unit='KiB'>409600</memory> <currentMemory unit='KiB'>409600</currentMemory> <vcpu placement='static'>1</vcpu> <resource> <partition>/machine/dahlia</partition> </resource> <os> <type arch='x86_64'>exe</type> <init>/bin/init</init> </os> <idmap> <uid start='0' target='1000' count='10'/> <gid start='0' target='1000' count='10'/> </idmap> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> <emulator>/usr/lib/libvirt/libvirt_lxc</emulator> <interface type='network'> <mac address='52:54:00:89:8f:1a'/> <source network='default'/> </interface> <console type='pty'> <target type='lxc' port='0'/> </console> </devices> </domain>
I have an identical setup. Archlinux for both host and (fully working) container in user_ns with libvirt and <idmap>. Here are some notes I collected while setting this up, it might help you, too. - Systemd creates all necessary cgroups, no need to fiddle with /etc/cgconfig - I do not even have that file, from which package is it? - The cgroup that gets auto-created (machine.slice/machine-lxc...) needs to be chown'ed to the mapped uid/gid. libvirt doesn't do that yet, but there's a patch on the libvirt devel mailing-list by Richard Weinberger which fixes this. Posted yesterday. - The container's rootfs needs to be chown'ed to the mapped uid, I used a simple script that reads `ls -n` and chowns all dirs and files with a defined offset (new_uid=$[$old_uid + 5000] .. you get the idea) - You need to override the dbus.service unit and remove the OOMScoreAdjust, same for any other units the use this. systemd-logind needs dbus. - You need to remove pam_loginuid.so from pam.d/system-auth, it's set to optional on ArchLinux, so actually not an issue here. (At that point you should be able to login using "virsh -c lxc:// console <machine name>") - You need to mask some units in the container so it boots cleanly (like dev-hugepages.mount, sys-fs-fuse.. and anything that wants to mount something) - Using dhcpcd requires a somewhat nasty hack, you better use static network (with a custom unit, netctl doesn't work) - SSH login doesn't work unless you set UseDNS=No in the container's sshd_config. No idea why that happens, confirmed by someone with completely different linux flavors for host and guest. Good luck! ~tom
On Sat, Feb 15, 2014 at 5:41 PM, Tom Kuther <tom@kuther.net> wrote:
Am 15.02.2014 14:37, schrieb arnaud gaboury:
Dear list,
I am bulding a VM using libvirt and lxc for linux container. I have an issue with my cgroups settings:
gabx@hortensia ➤➤ ~ # virsh start dahlia error: Failed to start domain dahlia error: internal error: No valid cgroup for machine dahlia [...] <domain type='lxc'> <name>dahlia</name> <uuid>a34b58db-894f-4f4a-81f0-b13d2d5d7732</uuid> <memory unit='KiB'>409600</memory> <currentMemory unit='KiB'>409600</currentMemory> <vcpu placement='static'>1</vcpu> <resource> <partition>/machine/dahlia</partition> </resource> <os> <type arch='x86_64'>exe</type> <init>/bin/init</init> </os> <idmap> <uid start='0' target='1000' count='10'/> <gid start='0' target='1000' count='10'/> </idmap> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> <emulator>/usr/lib/libvirt/libvirt_lxc</emulator> <interface type='network'> <mac address='52:54:00:89:8f:1a'/> <source network='default'/> </interface> <console type='pty'> <target type='lxc' port='0'/> </console> </devices> </domain>
I have an identical setup. Archlinux for both host and (fully working) container in user_ns with libvirt and <idmap>.
Here are some notes I collected while setting this up, it might help you, too.
- Systemd creates all necessary cgroups, no need to fiddle with /etc/cgconfig - I do not even have that file, from which package is it?
- The cgroup that gets auto-created (machine.slice/machine-lxc...) needs to be chown'ed to the mapped uid/gid. libvirt doesn't do that yet, but there's a patch on the libvirt devel mailing-list by Richard Weinberger which fixes this. Posted yesterday.
- The container's rootfs needs to be chown'ed to the mapped uid, I used a simple script that reads `ls -n` and chowns all dirs and files with a defined offset (new_uid=$[$old_uid + 5000] .. you get the idea)
- You need to override the dbus.service unit and remove the OOMScoreAdjust, same for any other units the use this. systemd-logind needs dbus.
- You need to remove pam_loginuid.so from pam.d/system-auth, it's set to optional on ArchLinux, so actually not an issue here.
(At that point you should be able to login using "virsh -c lxc:// console <machine name>")
- You need to mask some units in the container so it boots cleanly (like dev-hugepages.mount, sys-fs-fuse.. and anything that wants to mount something)
- Using dhcpcd requires a somewhat nasty hack, you better use static network (with a custom unit, netctl doesn't work)
- SSH login doesn't work unless you set UseDNS=No in the container's sshd_config. No idea why that happens, confirmed by someone with completely different linux flavors for host and guest.
Good luck!
~tom
Thank you Tom for your long and precise help. I think I will give up libvirt and go to LXC. Btw, the container does not need so much settings offer by libvirt management. For your info, /etc/cgconfig is needed and read by systemd cgconfig.service. But there is no need in fact to enable this service.
Thank you Tom for your long and precise help. I think I will give up libvirt and go to LXC. Btw, the container does not need so much settings offer by libvirt management. For your info, /etc/cgconfig is needed and read by systemd cgconfig.service. But there is no need in fact to enable this service.
I gave a try to LXC. There is unfortunately no better doc, and it seems I still have an issue with my cgroup configuration: gabx@hortensia ➤➤ ~ # lxc-start -n dahlia -d lxc-start: command get_cgroup failed to receive response gabx@hortensia ➤➤ ~ # lxc-ls dahlia The container is here and lxc see it. No idea where my cgroup issue comes from
On Sat, 15 Feb 2014 21:04:43 +0100 arnaud gaboury <arnaud.gaboury@gmail.com> wrote:
Thank you Tom for your long and precise help. I think I will give up libvirt and go to LXC. Btw, the container does not need so much settings offer by libvirt management. For your info, /etc/cgconfig is needed and read by systemd cgconfig.service. But there is no need in fact to enable this service.
I gave a try to LXC. There is unfortunately no better doc, and it seems I still have an issue with my cgroup configuration:
What LXC version do you use? Cheers, -- Leonid Isaev GPG key fingerprint: C0DF 20D0 C075 C3F1 E1BE 775A A7AE F6CB 164B 5A6D
Am 15.02.2014 18:03, schrieb arnaud gaboury:
Thank you Tom for your long and precise help. I think I will give up libvirt and go to LXC. Btw, the container does not need so much settings offer by libvirt management. For your info, /etc/cgconfig is needed and read by systemd cgconfig.service. But there is no need in fact to enable this service.
Are you planning to use LXC with lxc.id_map (so, user namespace)? That completely failed here. If you succeed, please let us know how. Without user namespace there are almost no issues with both LXC and libvirt (well, beside the security issue of course) I see cgconfig.service comes from libcgroup. Never heard of it before, so not sure how it fits in the systemd picture. ~Tom
Are you planning to use LXC with lxc.id_map (so, user namespace)? That completely failed here. If you succeed, please let us know how.
I would like to use user namespace facility. Until now, I didn't try to set up lxc.id_map -- google.com/+arnaudgabourygabx
I guess my lxc container is borken: root@hortensia ➤➤ /etc/netctl # CONFIG=/var/lib/lxc/dahlia/config /usr/sbin/lxc-checkconfig --- Namespaces --- Namespaces: required Utsname namespace: missing Ipc namespace: required Pid namespace: required User namespace: missing Network namespace: missing Multiple /dev/pts instances: missing --- Control groups --- Cgroup: required Cgroup clone_children flag: enabled Cgroup device: missing Cgroup sched: missing Cgroup cpu account: missing Cgroup memory controller: /usr/sbin/lxc-checkconfig: line 103: [: too many arguments missing --- Misc --- Veth pair device: missing Macvlan: missing Vlan: missing File capabilities: /usr/sbin/lxc-checkconfig: line 118: [: -gt: unary operator expected and this with no config path specified (everything is green) root@hortensia ➤➤ /etc/netctl # sudo lxc-checkconfig --- Namespaces --- Namespaces: enabled Utsname namespace: enabled Ipc namespace: enabled Pid namespace: enabled User namespace: enabled Network namespace: enabled Multiple /dev/pts instances: enabled --- Control groups --- Cgroup: enabled Cgroup clone_children flag: enabled Cgroup device: enabled Cgroup sched: enabled Cgroup cpu account: enabled Cgroup memory controller: enabled Cgroup cpuset: enabled --- Misc --- Veth pair device: enabled Macvlan: enabled Vlan: enabled File capabilities: enabled
I see cgconfig.service comes from libcgroup. Never heard of it before, so not sure how it fits in the systemd picture.
~Tom
with cgconfig.service anble or disable, it doesn't change anything: I still get this error: gabx@hortensia ➤➤ ~ # lxc-start -n dahlia -d lxc-start: command get_cgroup failed to receive response
- Systemd creates all necessary cgroups
How can I be sure systemd created them ? Are the command line & results below OK ? gabx@hortensia ➤➤ ~aur/libvirt-git # cat /proc/cgroups #subsys_name hierarchy num_cgroups enabled cpuset 3 2 1 cpu 4 2 1 cpuacct 4 2 1 memory 5 2 1 devices 6 2 1 freezer 7 2 1 net_cls 8 2 1 blkio 9 2 1
- The cgroup that gets auto-created (machine.slice/machine-lxc...)
Where can I see these cgroup and who auto-created them ? needs
to be chown'ed to the mapped uid/gid. libvirt doesn't do that yet, but there's a patch on the libvirt devel mailing-list by Richard Weinberger which fixes this. Posted yesterday.
- I tried to install linvirt-git, but got an error when building.
- The container's rootfs needs to be chown'ed to the mapped uid, I used a simple script that reads `ls -n` and chowns all dirs and files with a defined offset (new_uid=$[$old_uid + 5000] .. you get the idea)
I think I see. Do you mean sharing your script? TY Tom for your help.
Am 16.02.2014 00:52, schrieb arnaud gaboury:
- Systemd creates all necessary cgroups
How can I be sure systemd created them ? Are the command line & results below OK ?
gabx@hortensia ➤➤ ~aur/libvirt-git # cat /proc/cgroups #subsys_name hierarchy num_cgroups enabled cpuset 3 2 1 cpu 4 2 1 cpuacct 4 2 1 memory 5 2 1 devices 6 2 1 freezer 7 2 1 net_cls 8 2 1 blkio 9 2 1
Looks okay, anyways that's not a good command to check this. Take a look at /sys/fs/cgroup/systemd/ Or even better: └» systemd-cgls (output for my libvirt_lxc container) ├─machine.slice │ └─machine-lxc\x2darch\x2dweb1.scope │ ├─28422 /usr/lib/libvirt/libvirt_lxc --name arch-web1 --console 21 --security=none --handshake 24 --background --veth macvlan1 │ └─machine.slice │ └─machine-lxc\x2darch\x2dweb1.scope │ ├─machine.slice │ │ └─machine-lxc\x2darch\x2dweb1.scope │ │ └─user.slice │ │ └─user-0.slice │ │ └─user@0.service │ │ └─28488 /usr/lib/systemd/systemd --user │ ├─user.slice │ │ └─user-0.slice │ │ └─user@0.service │ │ └─28489 (sd-pam) │ └─system.slice │ ├─28428 /usr/bin/init │ ├─systemd-logind.service │ │ └─28459 /usr/lib/systemd/systemd-logind │ ├─console-getty.service │ │ └─28463 /sbin/agetty --noclear -s console 115200 38400 9600 │ ├─dbus.service │ │ └─28458 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation │ ├─sshd.service │ │ └─28470 /usr/bin/sshd -D │ └─systemd-journald.service │ └─28443 /usr/lib/systemd/systemd-journald
- The cgroup that gets auto-created (machine.slice/machine-lxc...)
Where can I see these cgroup and who auto-created them ?
See above. More info about "who" and "how": http://libvirt.org/cgroups.html
needs
to be chown'ed to the mapped uid/gid. libvirt doesn't do that yet, but there's a patch on the libvirt devel mailing-list by Richard Weinberger which fixes this. Posted yesterday.
- I tried to install linvirt-git, but got an error when building.
The libvirt-git AUR package worked fine 2 days ago. But it could be temp breakage upstream. No error output, no help possible.
- The container's rootfs needs to be chown'ed to the mapped uid, I used a simple script that reads `ls -n` and chowns all dirs and files with a defined offset (new_uid=$[$old_uid + 5000] .. you get the idea)
I think I see. Do you mean sharing your script?
-----snip---- #!/bin/bash LXC_VM=$1 ID_OFFSET=$2 LXC_BASEDIR=/var/lib/lxc if [[ ! -d "${LXC_BASEDIR}/${LXC_VM}/rootfs" ]]; then echo "ERROR: ${LXC_BASEDIR}/${LXC_VM}/rootfs does not exist" exit 1 fi cd ${LXC_BASEDIR}/${LXC_VM} echo "Changing directories" for dir in `find rootfs -type d`; do old_uid=`ls -nd ${dir}|awk '{print $3}'` old_gid=`ls -nd ${dir}|awk '{print $4}'` new_uid=$[${old_uid} + ${ID_OFFSET}] new_gid=$[${old_gid} + ${ID_OFFSET}] chown ${new_uid}:${new_gid} ${dir} done echo "Changing files" for file in `find rootfs -type f`; do old_uid=`ls -nd ${file}|awk '{print $3}'` old_gid=`ls -nd ${file}|awk '{print $4}'` new_uid=$[${old_uid} + ${ID_OFFSET}] new_gid=$[${old_gid} + ${ID_OFFSET}] chown ${new_uid}:${new_gid} ${file} done ----snap---- Disclaimer: separating dirs and files has no real reason here. Needs to run as root. May kill your cat etc..
TY Tom for your help.
NP ~tom
└» systemd-cgls
That's the point : I do not see any machine.slice in the tree :-( gabx@hortensia ➤➤ ~aur/libvirt-git % systemctl status libvirt-guests.service libvirt-guests.service - Suspend Active Libvirt Guests Loaded: loaded (/usr/lib/systemd/system/libvirt-guests.service; enabled) Active: active (exited) since Sat 2014-02-15 23:40:12 CET; 1h 22min ago Docs: man:libvirtd(8) http://libvirt.org Process: 748 ExecStart=/usr/lib/libvirt/libvirt-guests.sh start (code=exited, status=0/SUCCESS) Main PID: 748 (code=exited, status=0/SUCCESS)
CGroup: /system.slice/libvirt-guests.service<<<<<< WHERE ARE THEY ?
gabx@hortensia ➤➤ ~aur/libvirt-git % ls -al /sys/fs/cgroup total 0 drwxr-xr-x 10 root root 240 Feb 15 23:39 ./ drwxr-xr-x 7 root root 0 Feb 15 23:39 ../ drwxr-xr-x 3 root root 0 Feb 15 23:39 blkio/ drwxr-xr-x 3 root root 0 Feb 15 23:39 cpu,cpuacct/ drwxr-xr-x 3 root root 0 Feb 15 23:39 cpuset/ drwxr-xr-x 3 root root 0 Feb 15 23:39 devices/ drwxr-xr-x 3 root root 0 Feb 15 23:39 freezer/ drwxr-xr-x 3 root root 0 Feb 15 23:39 memory/ drwxr-xr-x 3 root root 0 Feb 15 23:39 net_cls/ drwxr-xr-x 4 root root 0 Feb 15 23:39 systemd/ lrwxrwxrwx 1 root root 11 Feb 15 23:39 cpu -> cpu,cpuacct/ lrwxrwxrwx 1 root root 11 Feb 15 23:39 cpuacct -> cpu,cpuacct/ Do you have anything more inside this dir ? I can not find machine.slice I think I must have a closer look at my systemd setup. Can you tell em yours ?
-----snip---- #!/bin/bash LXC_VM=$1 ID_OFFSET=$2 LXC_BASEDIR=/var/lib/lxc
if [[ ! -d "${LXC_BASEDIR}/${LXC_VM}/rootfs" ]]; then echo "ERROR: ${LXC_BASEDIR}/${LXC_VM}/rootfs does not exist" exit 1 fi
cd ${LXC_BASEDIR}/${LXC_VM}
echo "Changing directories" for dir in `find rootfs -type d`; do old_uid=`ls -nd ${dir}|awk '{print $3}'` old_gid=`ls -nd ${dir}|awk '{print $4}'` new_uid=$[${old_uid} + ${ID_OFFSET}] new_gid=$[${old_gid} + ${ID_OFFSET}] chown ${new_uid}:${new_gid} ${dir} done echo "Changing files" for file in `find rootfs -type f`; do old_uid=`ls -nd ${file}|awk '{print $3}'` old_gid=`ls -nd ${file}|awk '{print $4}'` new_uid=$[${old_uid} + ${ID_OFFSET}] new_gid=$[${old_gid} + ${ID_OFFSET}] chown ${new_uid}:${new_gid} ${file} done ----snap----
Disclaimer: separating dirs and files has no real reason here. Needs to run as root. May kill your cat etc..
TY for the script. I understand the UID and GID principles, but I had no idea how to map all this.
Three more thins I have some doubts about : 1- the guest : shall I mount it at rootfs in /dahlia or /machine/dahlia ? I have tried both. 2- in my dahlia.xml : <partition>/machine/dahlia</partition> Is that correct for a /dahlia OR /machine/dahlia guest mount point ? I do have any .scope unit file (normal ?) neither /etc/systemd/system/dahlia.service ? TY again Tom for your support
Am 16.02.2014 11:56, schrieb arnaud gaboury:
└» systemd-cgls
That's the point : I do not see any machine.slice in the tree :-(
That would be strange. With your machine-dahlia.slice config and the partition setting in your domain.xml, you should have machine.slice -> machine-dahlia.slice -> machine-lxc...scope What does "machinectl -l" spit out? └» machinectl -l MACHINE CONTAINER SERVICE lxc-arch-web1 container libvirt-lxc └» machinectl status lxc-arch-web1 lxc-arch-web1(xxx) Since: Sa 2014-02-15 22:09:04 CET; 14h ago Leader: 28398 Service: libvirt-lxc; class container Unit: machine-lxc\x2darch\x2dweb1.scope ├─ [... the cgroup tree again ..]
gabx@hortensia ➤➤ ~aur/libvirt-git % ls -al /sys/fs/cgroup total 0 drwxr-xr-x 10 root root 240 Feb 15 23:39 ./ drwxr-xr-x 7 root root 0 Feb 15 23:39 ../ drwxr-xr-x 3 root root 0 Feb 15 23:39 blkio/ drwxr-xr-x 3 root root 0 Feb 15 23:39 cpu,cpuacct/ drwxr-xr-x 3 root root 0 Feb 15 23:39 cpuset/ drwxr-xr-x 3 root root 0 Feb 15 23:39 devices/ drwxr-xr-x 3 root root 0 Feb 15 23:39 freezer/ drwxr-xr-x 3 root root 0 Feb 15 23:39 memory/ drwxr-xr-x 3 root root 0 Feb 15 23:39 net_cls/ drwxr-xr-x 4 root root 0 Feb 15 23:39 systemd/ lrwxrwxrwx 1 root root 11 Feb 15 23:39 cpu -> cpu,cpuacct/ lrwxrwxrwx 1 root root 11 Feb 15 23:39 cpuacct -> cpu,cpuacct/
Do you have anything more inside this dir ? I can not find machine.slice I think I must have a closer look at my systemd setup. Can you tell em yours ?
As said, it's all in the systemd/ subdir there. └» ls -l /sys/fs/cgroup/systemd/ insgesamt 0 -rw-r--r-- 1 root root 0 15. Feb 18:12 cgroup.clone_children --w--w--w- 1 root root 0 15. Feb 18:12 cgroup.event_control -rw-r--r-- 1 root root 0 15. Feb 18:12 cgroup.procs -r--r--r-- 1 root root 0 15. Feb 18:12 cgroup.sane_behavior drwxr-xr-x 3 root root 0 15. Feb 22:09 machine.slice -rw-r--r-- 1 root root 0 15. Feb 18:12 notify_on_release -rw-r--r-- 1 root root 0 15. Feb 18:12 release_agent drwxr-xr-x 98 root root 0 15. Feb 18:27 system.slice -rw-r--r-- 1 root root 0 15. Feb 18:12 tasks drwxr-xr-x 3 root root 0 15. Feb 18:12 user.slice ~tom
On Sun, Feb 16, 2014 at 12:20 PM, Tom Kuther <tom@kuther.net> wrote:
Am 16.02.2014 11:56, schrieb arnaud gaboury:
└» systemd-cgls
That would be strange. With your machine-dahlia.slice config and the partition setting in your domain.xml, I am not quite sur of a good setting of the partition. See my previous email you should have machine.slice -> machine-dahlia.slice -> machine-lxc...scope
What does "machinectl -l" spit out?
└» machinectl -l MACHINE CONTAINER SERVICE 0 machines listed.
bad news
gabx@hortensia ➤➤ ~aur/libvirt-git # virsh list --all Id Name State ---------------------------------------------------- - dahlia shut off
>Machine is here
gabx@hortensia ➤➤ ~aur/libvirt-git % systemctl status systemd-machined.service systemd-machined.service - Virtual Machine and Container Registration Service Loaded: loaded (/usr/lib/systemd/system/systemd-machined.service; static) Active: active (running) since Sun 2014-02-16 12:18:36 CET; 1min 50s ago Docs: man:systemd-machined.service(8) http://www.freedesktop.org/wiki/Software/systemd/machined Main PID: 3401 (systemd-machine) CGroup: /system.slice/systemd-machined.service └─3401 /usr/lib/systemd/systemd-machined
gabx@hortensia ➤➤ ~aur/libvirt-git % ls -al /sys/fs/cgroup total 0 drwxr-xr-x 10 root root 240 Feb 15 23:39 ./ drwxr-xr-x 7 root root 0 Feb 15 23:39 ../ drwxr-xr-x 3 root root 0 Feb 15 23:39 blkio/ drwxr-xr-x 3 root root 0 Feb 15 23:39 cpu,cpuacct/ drwxr-xr-x 3 root root 0 Feb 15 23:39 cpuset/ drwxr-xr-x 3 root root 0 Feb 15 23:39 devices/ drwxr-xr-x 3 root root 0 Feb 15 23:39 freezer/ drwxr-xr-x 3 root root 0 Feb 15 23:39 memory/ drwxr-xr-x 3 root root 0 Feb 15 23:39 net_cls/ drwxr-xr-x 4 root root 0 Feb 15 23:39 systemd/ lrwxrwxrwx 1 root root 11 Feb 15 23:39 cpu -> cpu,cpuacct/ lrwxrwxrwx 1 root root 11 Feb 15 23:39 cpuacct -> cpu,cpuacct/
A few ideas : how do you boot ? I boot at console login with gabx % startx Did you : systemctl enable systemd-nspawn@machine.service ? I didn't
I can see the overall setup was not so bad. When I start the container this way : gabx@hortensia ➤➤ ~ # systemd-nspawn -bD /dahlia container boots. gabx@hortensia ➤➤ ~ % machinectl -l MACHINE CONTAINER SERVICE dahlia container nspawn 1 machines listed. Machine is listed and I can see a /sys/fs/cgroup/systemd/machine.slice directory
participants (3)
-
arnaud gaboury
-
Leonid Isaev
-
Tom Kuther