[Lxc-users] how to use system container
allen
allen303allen at gmail.com
Tue Feb 21 13:46:11 UTC 2012
2012/2/20 Serge Hallyn <serge.hallyn at canonical.com>:
> Quoting allen (allen303allen at gmail.com):
>> HI ALL:
>> My aim is to run a Graphical application in a container, then an
>> user connect to the container with a GUI interface, so that he can see
>> and operate the application.
>> As I want to separate all resources, I think I'll need a system
>> container. Now I already use "lxc-create -n maverick-lxc-template -t
>> maverick -f /tmp/maverick-template-network.conf" to create an Ubuntu
>> template, start it and use lxc-console to get a console of it.
>> Now my question is:
>> 1. If I want to run an application, do I have to install it in the
>> system container first?
>
> no.
Then how can I run that application, could you show me some examples?
I mean, in a system container.
>
>> 2. How can I connect to the container with a GUI interface?
>
> It depends on how you've set up the container's network and where the
> guest will connect from.
>
> If your container were using a veth connected to libvirt's virbr0, and
> the application is available on port 9999, then your guest could simply
>
> ssh -L 9999:container_ip_addr:9999
>
> and then connect to port 9999 on his local host. For instance, if you
> were opening up vnc on :1 in the container, the container is
Dose this mean I have to start vncserver in my system container?
Then I have some troubles on that, my template is a minimum system,
the lack of a lot of library files make the job difficult.
Do I need a more powerful template? How can I get that?
Thank you.
> 192.168.122.89, and your host is 10.0.1.1, then he would do
>
> ssh -L 5951:192.168.122.89:5901 10.0.1.1
>
> and then
>
> vncviewer :51
>
> You can also put the container straight onto your local network, but
> the above works with how containers creation is usually shown.
>
> -serge
More information about the lxc-users
mailing list