[libvirt] Regarding lxc driver for libvirt.
Kumar L Srikanth-B22348
B22348 at freescale.com
Fri Feb 5 10:31:34 UTC 2010
Hi,
I am new to libvirt.
I want to create a Domain using libvirt XML. In order to mount the
host's '/home/srikanth' directory to the new container's '/' directory,
my XML format is shown below:
<domain type='lxc' id='1'>
<name>container1_vm</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='/home/srikanth'/>
<target dir='/'/>
</filesystem>
<console type='pty' />
</devices>
</domain>
With the above libvirt XML, Domain is defining, but not starting. When I
issue the start command it's saying "Domain started", but showing "shut
off" status. If I changed the target directory(<traget dir='/'/>) from
'/' to '/home/container1'(<traget dir='/home/container1'/>), the domain
is starting normally and I am able to see the contents in the target
directory.
Can you please let me know, how can I set the target directory to '/'?
By the way, I am using libvirt version o.7.6.
Regards,
Srikanth.
More information about the libvir-list
mailing list