i'm trying to get even the simplest busybox container with libvirt+LXC
with very limited success. I feel l am missing something supremely
simple for me to be hung on this for weeks.
i dont see anything interesting in domain log, but getting this error
from "LIBVIRT_DEBUG=1 libvirtd":
05:27:56.113: error : lxcDomainGetInfo:462 : internal error Unable to
get cgroup for arch-nano
05:27:56.113: debug : virDomainFree:2004 : domain=0x81d8e68
05:27:56.113: debug : virUnrefDomain:422 : unref domain 0x81d8e68 arch-nano 1
05:27:56.113: debug : virReleaseDomain:376 : release domain 0x81d8e68 arch-nano
05:27:56.113: debug : virReleaseDomain:392 : unref connection 0x81dc0f0 2
05:27:56.113: debug : remoteSerializeError:141 : prog=536903814 ver=1
proc=16 type=1 serial=4, msg=internal error Unable to get cgroup for
arch-nano
i've been using this root filesystem layout:
[root@PHS-001 arch-nano]# tree
.
|-- bin
| |-- cat -> ../sbin/busybox
| |-- chdir -> ../sbin/busybox
| |-- chmod -> ../sbin/busybox
| |-- ls -> ../sbin/busybox
| |-- rm -> ../sbin/busybox
| |-- sh -> ../sbin/busybox
| `-- vi -> ../sbin/busybox
|-- dev
| `-- pts
|-- etc
|-- proc
|-- sbin
| |-- busybox
| `-- init -> busybox
`-- sys
all folders besides /bin and /sbin were created by libvirt. i tried
using the /sbin/init script previously suggested:
#!/sbin/busybox
sh
but i get a similar results either way (script/symlink):
8173 ? Ss 0:00 /usr/lib/libvirt-git/libvirt_lxc --name
arch-nano --console 11 --background
8175 pts/0 Ss+ 0:00 init
8177 ? Ss 0:00 init
8181 ? Zs 0:00 [init] <defunct>
8182 ? Zs 0:00 [init] <defunct>
8183 ? Zs 0:00 [init] <defunct>
"busybox init" doc says that without an /etc/inittab, sh will be
started on /dev/tty2... im am using this config:
<domain type='lxc'>
<name>arch-nano</name>
<memory>500000</memory>
<os>
<type>exe</type>
<init>/sbin/init</init>
</os>
<devices>
<filesystem type='mount'>
<source dir='/vps/dom/arch-nano'/>
<target dir='/'/>
</filesystem>
</devices>
</domain>
on this config i tried removing the console/serial section altogether,
but i attempted many configurations of serial/console, including
changing the <target> to "2", in attempt to match busybox default.
[root@PHS-001 arch-nano]# virsh -c lxc:/// console arch-nano
error: Unable to get domain status
error: internal error Unable to get cgroup for arch-nano
[root@PHS-001 arch-nano]# mount | grep cgroup
none on /cgroup type cgroup (rw)
if anyone can please point out what i am doing wrong to not be able to
move the root and get a console, i'd greatly appreciate it. ive been
really stuck on this; i'd rather not write a bunch of scripts/wrappers
for lxc-* tools when libvirt does it all splendidly already!
libvirt 0.7.4+
kernel 2.6.32 (am i missing a CONFIG_*?)
thanks for your time