* lxc and cgroups issue
@ 2014-02-15 11:29 arnaud gaboury
[not found] ` <CAK1hC9tzeaZE8xaOG8cdZaJj8ff0aTfmG9u5E2XhtjchTxSuTQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: arnaud gaboury @ 2014-02-15 11:29 UTC (permalink / raw)
To: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA
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 /machine/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
# virsh dumpxml
<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 /machine/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 deafult 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
Something puzzles me. In /sys/fs/cgroup/blkio, I see two dirs: dahlia
and machine.slice. Inside machine.slice, I see another dir
machine-dahlia. I guess there is something wrong here !! Same for
cpuset or other controllers.
- 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
Apologize for the long post, but I wanted to detail everything.
Thank you for help on my cgroup set up.
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/containers
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: lxc and cgroups issue
[not found] ` <CAK1hC9tzeaZE8xaOG8cdZaJj8ff0aTfmG9u5E2XhtjchTxSuTQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2014-02-15 11:57 ` arnaud gaboury
[not found] ` <CAK1hC9vUv4AF1QrH6wc1Ef6oWqP2z1CTfA+V=C+ZYJh_GwYrrQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: arnaud gaboury @ 2014-02-15 11:57 UTC (permalink / raw)
To: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA
I must add I can boot the container this way :
gabx@hortensia ➤➤ ~ # systemd-nspawn -bD /machine/dahlia
A few error messages at boot :
Set hostname to <dahlia>.
Failed to verify GPT partition /dev/sdb1: No such file or directory
/usr/lib/systemd/system-generators/systemd-gpt-auto-generator exited
with exit status 1.
# blkid
/dev/sdb1: UUID="f69d032f-c80f-4f2e-84cd-d2328a862818" TYPE="ext4"
PARTUUID="d0b295ec-c189-497f-86f1-0e631390ff19"
gabx@hortensia ➤➤ ~ # parted /dev/sdb
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 115GB 115GB ext4
So where does the issue comes ?
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/containers
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: lxc and cgroups issue
[not found] ` <CAK1hC9vUv4AF1QrH6wc1Ef6oWqP2z1CTfA+V=C+ZYJh_GwYrrQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2014-02-15 13:40 ` arnaud gaboury
0 siblings, 0 replies; 3+ messages in thread
From: arnaud gaboury @ 2014-02-15 13:40 UTC (permalink / raw)
To: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA
On Sat, Feb 15, 2014 at 12:58 PM, arnaud gaboury
<arnaud.gaboury@gmail.com> wrote:
> I must add I can boot the container this way :
>
> gabx@hortensia ➤➤ ~ # systemd-nspawn -bD /machine/dahlia
>
> A few error messages at boot :
>
>
> Set hostname to <dahlia>.
> Failed to verify GPT partition /dev/sdb1: No such file or directory
> /usr/lib/systemd/system-
> generators/systemd-gpt-auto-generator exited
> with exit status 1.
It seems this is due to broken udev inside the container
. udev is not available in containers [1]
[1]http://www.freedesktop.org/wiki/Software/systemd/ContainerInterface/
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/containers
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-02-15 13:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-15 11:29 lxc and cgroups issue arnaud gaboury
[not found] ` <CAK1hC9tzeaZE8xaOG8cdZaJj8ff0aTfmG9u5E2XhtjchTxSuTQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-02-15 11:57 ` arnaud gaboury
[not found] ` <CAK1hC9vUv4AF1QrH6wc1Ef6oWqP2z1CTfA+V=C+ZYJh_GwYrrQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-02-15 13:40 ` arnaud gaboury
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.