[Lxc-users] Creating stand alone container

Daniel Lezcano daniel.lezcano at free.fr
Wed Feb 15 22:32:15 UTC 2012


On 02/15/2012 11:51 AM, bruce bushby wrote:
> Hi
>
> I've been following these two guides:
> https://access.redhat.com/kb/docs/DOC-67682
> http://berrange.com/posts/2011/09/27/getting-started-with-lxc-using-libvirt/
>
> and I finally have a container running (Happy Days)  I wanted to ask
> the list if anybody has experience with a "stand alone" container?
>
> My physical box is an HP running RHEL 6.2. I would like my container
> to have it's own rpmdb, root filesystem and OS commands etc. The
> container should be 100% separate from the physical BUT will run the
> exact same OS as the physical.
>
> I'm guessing I need to do something like:
> 1. create path for container ie "/virtuals/<container_name>"
> 2. Add filesystem path to container xml
> 2. copy entire OS from physical into "/virtuals/<container_name>"
> 3. Add network config to container xml
> 4. Start container?
>
> The above links give a busybox example, however I need the exact OS
> (development testing environment)
>
> As always, any help would be much appreciated!

Hi Bruce,

this mailing list is for the lxc-tools which are different from the 
libvirt-lxc which has implemented its own lxc driver.

I think you should ask at the libvirt@ mailing list. At the first 
glance, what you are describing is correct. It is the simpler way to 
create a system container. If you plan to run a lot of containers, there 
are some alternatives with btrfs or the ro-bind mounts to not duplicate 
the rootfs again and again.

Thanks
   -- Daniel




More information about the lxc-users mailing list