Re: [libvirt] Bringing up LXC container from virsh command prompt.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



So, again I need to add one network interface in the libvirt XML?. It
will not take the interface which was created earlier while creating
container using lxc-tools?.
But, in the container which was created with lxc-tools(lxc-create,
lxc-start ..etc), I am not getting any such issues. 
Why I am getting these issues in virsh command prompt, when I am
mounting the same rootfs that was used while creating container using
lxc-tools.
Please clarify.

Regards,
Srikanth.

-----Original Message-----
From: Daniel P. Berrange [mailto:berrange@xxxxxxxxxx] 
Sent: Thursday, March 04, 2010 3:29 PM
To: Kumar L Srikanth-B22348
Cc: libvir-list@xxxxxxxxxx; Reddy B Veera-B22347
Subject: Re: Bringing up LXC container from virsh command prompt.

On Thu, Mar 04, 2010 at 03:25:18PM +0530, Kumar L Srikanth-B22348 wrote:
> Hi Daniel,
> I am able to get the 'ifconfig' details in any one of the following 2
> cases:
> 1. If I execute '/sbin/ifconfig'
> 2. If I include '/sbin' in the PATH environment variable.
> 
> But, the result of ifconfig is showing all the IP's available in the 
> host machine (The same result when I execute ifconfig in the host).


> > [vm1_fedora_container.xml]
> > <domain type='lxc' id='1'>
> >   <name>vm1_fedora</name>
> >     <memory>500000</memory>
> >       <os>
> >           <type>exe</type>
> >           <init>/bin/bash</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='/root/lxc/fedora12'/>    /*This is the rootfs
> > directory for my linux container(fedora12)*/
> >           <target dir='/'/>  /* I mounted it to '/' directory in the

> > Domain. */
> >         </filesystem>
> > <console type='pty' />
> >       </devices>
> > </domain>


You've not listed any network interface here. So the container is
inheriting the host network. If you add a network interface it'll work
as you expect


Daniel
-- 
|: Red Hat, Engineering, London    -o-
http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o-
http://deltacloud.org :|
|: http://autobuild.org        -o-
http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B
9505 :|


--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]