On Wed, Jul 31, 2013 at 12:46:58PM +0530, Aarti Sawant wrote:
hello,
i am new to lxc, i have created a lxc container on fedora 19
i created a container rootfs of fedora 19 by using
yum --installroot=/containers/test1 --releasever=19 install openssh
test1.xml file for container test1
<domain type="lxc">
<name>test1</name>
<vcpu placement="static">1</vcpu>
<cputune>
<shares>1024</shares>
<period>1000000</period>
</cputune>
<memtune>
<hard_limit unit="M">1024</hard_limit>
<soft_limit unit="M">128</soft_limit>
<min_guarantee unit="M">64</min_guarantee>
</memtune>
<blkiotune>
<weight>800</weight>
</blkiotune>
<memory unit="KiB">102400</memory>
<os>
<type>exe</type>
<init>/bin/bash</init>
</os>
<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 accessmode="passthrough" type="mount">
<source dir="/containers/test1/"/>
<target dir="/"/>
</filesystem>
<filesystem accessmode="passthrough"
type="mount">
<source dir="/containers/test1/var"/>
<target dir="/var"/>
</filesystem>
....snip more <filesystem> elements...
Why are you adding all these sub-mounts for /var, /dev, etc, etc?
You installed the entire OS tree into /containers/test1, so it
should be sufficient to just have that first <filesystem>
entry for '/'. You'd only want to add extra mounts for
/var, etc if the directory on the host came from somewhere
outside the /containers/test1 location.
NB, also libvirt sets up /dev - you shouldn't try to
override it, or you'll loose access to the pre-populate
device nodes, which is probably what's causing your
failure.
<interface type="bridge">
<source bridge="br0"/>
</interface>
<console port="0" type="pty"/>
</devices>
</domain>
Daniel
--
|:
http://berrange.com -o-
http://www.flickr.com/photos/dberrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|:
http://entangle-photo.org -o-
http://live.gnome.org/gtk-vnc :|