How can I run command in containers on the host? Just like the lxc command lxc-attach.
I run :
virsh -c lxc:/// lxc-enter-namespace fedora2 --noseclabel /bin/ls
but get error:
libvirt: error : Expected at least one file descriptor
error: internal error: Child process (14930) unexpected exit status 125
Here is my libvirt.xml
<domain type='lxc'>
<name>fedora2</name>
<memory>190000</memory>
<vcpu>2</vcpu>
<cputune>
<shares>1000</shares>
</cputune>
<os>
<features>
<privnet/>
<capabilities policy='allow'>
</capabilities>
</features>
<type>exe</type>
<init>/sbin/init</init>
</os>
<devices>
<filesystem type="mount">
<source dir="/home/lxc-fedora"></source>
<target dir="/"></target>
</filesystem>
<console type='pty'/>
<interface type='bridge'>
<mac address='52:54:00:e8:96:88'/>
<source bridge='virbr0'/>
<target dev='vnet0'/>
<guest dev='eth0'/>
</interface>
</devices>
</domain>
version of libvirt:
Compiled against library: libvirt 1.2.9
Using library: libvirt 1.2.9
Using API: QEMU 1.2.9
Running hypervisor: QEMU 2.1.2
Is there any mistake?
Thanks,
John