Hi:I downloaded a cirros-0.3.0-x86_64-rootfs.img and mount it to /tmp/bak
then I edit a xml file ,here is the content:
<domain type='lxc'>
<name>vm1</name>
<memory>500000</memory>
<os>
<type>exe</type>
<init>/bin/sh</init>
</os>
<vcpu>1</vcpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/libexec/libvirt_lxc</emulator>
<filesystem type='mount'>
<source dir='/tmp/bak'/>
<target dir='/'/>
</filesystem>
<interface type='network'>
<source network='default'/>
</interface>
<console type='pty' />
</devices>
</domain>
I defined it and no error , but when I start it , it comes with
error: Failed to start domain vm1
error: internal error guest failed to start: 2012-10-24 13:08:14.684+0000: 16935: info :
libvirt version: 0.9.10, package: 21.el6_3.4 (CentOS BuildSystem
<
http://bugs.centos.org>, 2012-08-23-18:28:26,
c6b9.bsys.dev.centos.org)
2012-10-24 13:08:14.684+0000: 16935: error : lxcControllerRun:1484 : Failed to query file
context on /tmp/bak: No data available
here is the ls -al /tmp/bak
total 92
drwxr-xr-x 21 root root 4096 Oct 24 20:43 .
drwxrwxrwt. 5 root root 4096 Oct 24 21:08 ..
drwxr-xr-x 2 root root 4096 Oct 24 20:43 bin
drwxr-xr-x 3 root root 4096 Oct 24 20:43 boot
drwxr-xr-x 3 root root 4096 Oct 24 20:43 dev
drwxr-xr-x 7 root root 4096 Oct 24 20:43 etc
drwxr-xr-x 4 root root 4096 Oct 24 20:43 home
-rwxr-xr-x 1 root root 2785 Oct 24 20:43 init
lrwxrwxrwx 1 root root 32 Oct 24 20:43 initrd.img ->
boot/initrd.img-3.0.0-12-virtual
drwxr-xr-x 4 root root 4096 Oct 24 20:43 lib
lrwxrwxrwx 1 root root 11 Oct 24 20:43 linuxrc -> bin/busybox
drwx------ 2 root root 4096 Oct 24 20:43 lost+found
drwxr-xr-x 2 root root 4096 Oct 24 20:43 mnt
drwxr-xr-x 2 root root 4096 Oct 24 20:43 .oldroot
drwxr-xr-x 2 root root 4096 Oct 24 20:43 old-root
drwxr-xr-x 2 root root 4096 Oct 24 20:43 opt
drwxr-xr-x 2 root root 4096 Oct 24 20:43 proc
drwx------ 2 root root 4096 Oct 24 20:43 root
drwxr-xr-x 2 root root 4096 Oct 24 20:43 run
drwxr-xr-x 2 root root 4096 Oct 24 20:43 sbin
drwxr-xr-x 2 root root 4096 Oct 24 20:43 sys
drwxr-xr-t 3 root root 4096 Oct 24 20:43 tmp
drwxr-xr-x 6 root root 4096 Oct 24 20:43 usr
drwxr-xr-x 8 root root 4096 Oct 24 20:43 var
lrwxrwxrwx 1 root root 29 Oct 24 20:43 vmlinuz -> boot/vmlinuz-3.0.0-12-virtual
How can I solve this problem?
Thanks :-)