| Summary: | Libvirt/LXC failed to start container | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Community] Virtualization Tools | Reporter: | Samuel Hassine <samuel.hassine> | ||||
| Component: | libvirt | Assignee: | Libvirt Maintainers <libvirt-maint> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | |||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | unspecified | CC: | crobinso, hahn, unicell, xen-maint | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | x86_64 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2016-03-23 21:06:04 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Attachments: |
|
||||||
Hi,
I confirmed again the result of this experience with a minimal rootfs container built with busybox.
# mkdir /rootfs
# cd /rootfs
# mkdir bin var sbin etc root usr
# cd bin
# cp /bin/busybox busybox
# cd /
# for i in ls cat rm find ps echo date kill sleep \
true false test pwd sh which grep head wget
do
ln -s busybox /rootfs/bin/$i
done
And add:
<filesystem type='mount'>
<source dir='/rootfs'/>
<target dir='/'/>
</filesystem>
To the XML file.
We have "Failed to mount /dev/pts in container: No such file or directory" error in Debian testing.
Best regards.
Sam
Created attachment 555734 [details]
Trace of strace -o libvirt.log -f -ff -s 1000 /usr/sbin/libvirtd
This is the complete trace files generated by the command:
strace -o libvirt.log -f -ff -s 1000 /usr/sbin/libvirtd
when the error occured.
Hi, I GOT IT! After one week of debug, finally, I successfully deal with this error! Maybe a small "warning" about that should be added to the documentation: It was a problem of symbolic link in the path of the filesystem set in the XML file. Explaination: /lxc/test/rootfs contain a full rootfs /var/lib/lxc => /lxc (symlink) If you put /var/lib/lxc/test/rootfs in your XML file, you will get the error I described above If you put /lxc/test/rootfs directly in the XML, no error at all, container successfully start. Best regards. Sam PS : You can easily workaround this by mount --bind of your partition. I had exactly the same problem and came to the same solution: Installing the "lxc" user space tools on Debian do ask you for the preferred location (/other/) for your containers and then created a symlink at /var/lib/lxc pointing there. Using /var/lib/lxc/$NAME as the root for your container from libvirt will fail, while using /other/$NAME succeeds. I just tried booting an lxc container with /tmp/rootlink -> /, and it worked (this is Fedora 23 host with libvirt 1.2.18), so it appears this is fixed. Sorry this didn't receive a timely response |
Description of problem: When I tried to start a new LXC container after successfully installed and configured libvirt, I have the following errors: root@PAR-SRV-01-003:/etc/libvirt/lxc# virsh --connect lxc:/// start instance-00000010 error: Failed to start domain instance-00000010 error: internal error guest failed to start: 2012-01-16 10:46:47.717+0000: 2343: info : libvirt version: 0.9.8 2012-01-16 10:46:47.717+0000: 2343: warning : lxcCapsInit:77 : Failed to get host power management capabilities PATH=/bin:/sbin TERM=linux LIBVIRT_LXC_UUID=bc6f23e6-193e-c4db-87c3-52b27bc7fe6d LIBVIRT_LXC_NAME=instance-00000010 /sbin/init 2012-01-16 10:46:47.739+0000: 1: info : libvirt version: 0.9.8 2012-01-16 10:46:47.739+0000: 1: error : lxcContainerMountDevFS:518 : Failed to mount /dev/pts in container: No such file or directory 2012-01-16 10:46:47.739+0000: 2344: info : libvirt version: 0.9.8 2012-01-16 10:46:47.739+0000: 2344: error : lxcControllerRun:1445 : error receiving signal from container: Input/output error Version number: root@PAR-SRV-01-001:~# dpkg -l | grep libvirt ii libvirt-bin 0.9.8-2 programs for the libvirt library ii libvirt0 0.9.8-2 library for interfacing with different virtualization systems ii python-libvirt 0.9.8-2 libvirt Python bindings root@PAR-SRV-01-001:/# uname -a Linux PAR-SRV-01-001 3.1.0-1-amd64 #1 SMP Tue Jan 10 05:01:58 UTC 2012 x86_64 GNU/Linux Steps to Reproduce: 1. Install LXC 2. Install libvirt 3. Create a new XML configuration (default) 4. Trying to start container Actual results: 2012-01-16 10:46:47.739+0000: 1: error : lxcContainerMountDevFS:518 : Failed to mount /dev/pts in container: No such file or directory Expected results: Starting container...