[Lxc-users] Regarding lxc tools and libvirt (virsh).
Daniel Lezcano
dlezcano at fr.ibm.com
Fri Feb 5 10:16:50 UTC 2010
Kumar L Srikanth-B22348 wrote:
> Thanks for the reply Daniel.
> I have another issue.
> I am creating 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.
I won't be able to answer as I don't know libvirt, it's better you ask
to the libvirt mailing list. This mailing list is for the lxc container
tools.
> -----Original Message-----
> From: Daniel Lezcano [mailto:daniel.lezcano at free.fr]
> Sent: Friday, February 05, 2010 2:25 PM
> To: Kumar L Srikanth-B22348
> Cc: lxc-users at lists.sourceforge.net
> Subject: Re: [Lxc-users] Regarding lxc tools and libvirt (virsh).
>
> Kumar L Srikanth-B22348 wrote:
>> Hi,
>> I am new to Linux Containers and Libvirt.
>> Recently, I installed Linux Container tools on my Fedora Core 12 (64
>> bit) machine and able to create/start/destroy my own containers using
>> the following commands:
>> lxc-create
>> lxc-sshd
>> lxc-start
>> lxc-destroy
>>
>> And I also installed libvirtd on my machine, and able to
>> create/start/destroy my own domains using the following commands:
>> virsh -c lxc:/// define /path/to/domain/xml/configuration/file
>> virsh -c lxc:/// start [Domain Name]
>> virsh -c lxc:/// shutdown [Domain Name] virsh -c lxc:/// undefine
>> [Domain Name]
>>
>> I just wonder is there any relation between the domains created with
>> 'virsh' and containers created with 'lxc-tools' [like lxc-create,
>> lxc-start ..etc]?
>> Can I start a container created using 'lxc-create' command with virsh
>> [virsh -c lxc:/// start [Container Name] ...something like that]?
>>
>> Please let me know.
>>
> No, these are 2 separate projects. But a driver could be implemented to
> plug the lxc tools with the libvirt.
More information about the lxc-users
mailing list