The LXC tag is for questions relating to LinuX Containers and lightweight virtualization capabiliaties, issues, and troubleshooting.

learn more… | top users | synonyms

48
votes
1answer
13k views

How do I configure juju for local usage?

I'm too cheap to pay for EC2, and I don't have enough servers to set up my own openstack, how do I configure juju to use Linux Containers (LXC) on something like my laptop?
22
votes
3answers
21k views

What is LXC and how to get started?

I will appreciate if someone could introduce me to LXC and tell me how to get started with this technology? In which cases does it make sense to use, and in which should i stay away from it?
20
votes
1answer
5k views

Public IP Address for LXC container

Ok, so I want to know how to do networking on LXC containers. Not just the sort of vague information you get from the other websites, but a true beginner's guide to making them work.. Since most ...
12
votes
7answers
5k views

How do I get the IP address of an LXC container?

I've written a few scripts to manage LXC containers, and I can get their IP addresses via ifconfig, assuming I'm connected to the console. I now want to connect to these containers via ssh. How do I ...
12
votes
4answers
9k views

What should i choose? LXC vs OpenVZ [closed]

As an alternative to Virtualizing several Ubuntu Servers im looking into the possibility of using containers. But I am not sure if I should go for OpenVZ or LXC. Can anyone recommend one of them, or ...
8
votes
2answers
554 views

How do I “clean up” a machine after using the local provider?

I'm doing some testing and sometimes I have issues with containers and juju. How do I clean up a machine so that I can start using the local provider "from scratch" without reinstalling?
8
votes
1answer
904 views

AppArmor denying a mount operation

How do I convince apparmor to allow this operation? [28763.284171] type=1400 audit(1344273461.387:192): apparmor="DENIED" operation="mount" info="failed type match" error=-13 parent=7101 ...
7
votes
1answer
270 views

How can I relaunch juju daemons without stop/starting local LXC containers?

I'm using juju in local mode with LXC. I updated juju on the host with a classical: apt-get install juju And had a plentyful of python errors in juju debug-log probably because juju processes ...
6
votes
3answers
3k views

LXC Containers & Bridge Connection

                    I need Step by Step Configuration to make LXC Containers in Ubuntu right way to configure Lxc container's right way to config cgroup right way to config network in host & in ...
6
votes
1answer
1k views

Where are lxc containers security borderlines?

My question is around the security of an LXC container. If I am running multiple containers on my box, and give users a separate ssh access to their owned container, can any of those container hack ...
5
votes
1answer
1k views

lxc containers hangs after upgrade to 13.10

I have 3 lxc containers. They were all working fine on 12.10 and I upgraded the containers with do-release-upgrade on the containers to 13.04 and 13.10 and that worked great. Then I upgraded the ...
5
votes
1answer
2k views

Running X/Unity inside LXC container

I have already created a number of LXC containers in my 12.04 machine. I need to run GUI applications inside them (mostly Firefox). Is it correct to presume that it will work out of the box? If not, ...
5
votes
1answer
199 views

What are the absolutely bare minimum requirements for running local juju?

I have read the documentation on running local juju with lxc. However, the dependencies in the docs seem kind of extensive for that, eg. why would it need libvirt (except for maybe the bridge nic ), ...
4
votes
2answers
9k views

How do I setup an LXC guest so that it gets a dhcp address so I can access it on my network?

I setup LXC using: lxc-create -t ubuntu -n lxcguest1 But I can't access any services running on it from my LAN, it appears to be NATed. How do I set it up so that I can access it (it probably ...
4
votes
1answer
3k views

Why does upstart fail to start my juju service with Unknown job: juju-ubuntu-0?

I'm having issues launching juju on an lxc container through regular juju deploy commands: juju bootstrap juju deploy ubuntu The ubuntu juju status continually says pending. The LXC starts, and I ...
4
votes
2answers
442 views

How to manage Juju's LXC containers using virsh?

I use the lxc driver for juju and I have created a local environment; actually the well-known Wordpress from https://juju.ubuntu.com/docs/getting-started.html. I then tried export ...
4
votes
1answer
487 views

Can I use juju with LXC in a non-local configuration?

I've looked at this post for setting up juju on a local environment with lxc. However, is there a way to use juju with lxc in a non-local environment? I am looking at a scenario where lxc containers ...
3
votes
1answer
2k views

Allow loop mounting files inside LXC containers?

I'm trying to set up a MaaS server inside an LXC container. When I import the PXE files, it needs to be able to mount loop devices. I have set the following options in the container config file to ...
3
votes
1answer
166 views

Juju and Openstack provisioning

I'm new to Juju and Openstack and currently deploying two- and three-node openstack test environment using Juju manual provider. At my first attempt I tried to deploy services to my hosts using --to ...
3
votes
2answers
195 views

what is a configuration to allow access to juju-gui in local provider

I want to install juju-gui using local provider (re lxc) on a cloud instance. However, the problem I have is that juju-gui will be installed into an lxc container itself and that container will be a ...
3
votes
2answers
3k views

Web Based Management For LXC Containers?

I need a way to manage LXC containers on Ubuntu Server 12.04 - similar to what Proxmox is. Googling indicates that openstack is one option - would this work?
3
votes
2answers
208 views

It is possible to hibernate an LXC container?

I know about lxc-freeze and lxc-unfreeze, but as I understand it, these simply pauses the container, similar to sending SIGSTOP and SIGCONT to a process. If I reboot the host, then the containers will ...
3
votes
3answers
998 views

Switching Juju lxc bridge

I've set up Juju running in LXC, and I'm attempting to expose it to the internal network. I'm generally following this question to point lxc to my existing bridge (eth-br0). I've edited ...
3
votes
0answers
216 views

Juju deployment fails due to “container failed to start” error

I had tried to deploy mysql and i had this error: agent-state-info: container failed to start Outputs from log as following: Line 47: machine-0: 2014-08-14 02:02:30 INFO juju.state.api ...
3
votes
0answers
266 views

apt-get in LXC container is very slow on Ubuntu Server 12.04

I haven't had much luck in finding out the source of the issue, whether this "issue" is simply a limitation of LXC or zfs, or whether this issue is specific to Ubuntu. The issue is quite simply that ...
3
votes
0answers
1k views

“Can not write log, openpty() failed (/dev/pts not mounted?)”

I used this post to install LXC. The installation is success and creating the container complain give this message: "Can not write log, openpty() failed (/dev/pts not mounted?)" but in the end ...
3
votes
0answers
210 views

How do I get the VT running X in my LXC container to my host?

I'm trying to run Lubuntu within an LXC container on my host already using a GUI. Is it possible to redirect the X output from the container to say; VT9 rather than VT7? If so where is the VT7 ...
3
votes
0answers
435 views

How to create dm-crypt device in LXC?

On one LXC container I need to put sensitive data, preferrably stored in dm-crypt encrypted filesystem. When I write sudo cryptsetup luksFormat --cipher aes-xts-plain --size 512 ...
3
votes
2answers
1k views

Video driver under lxc container?

Since LXC (Linux Containers) is a kernel level super-chroot, I've been wondering what sort of video driver the containers have: My host is Ubuntu 12.04 64-bit machine with ATI gpu. Will the LXC ...
2
votes
2answers
6k views

After starting a particular LXC container with a static IP, no default gateway route is configured

I've got one LXC container that works just fine, but a 2nd one now is mis-behaving. I've configured a static route for it, but it just won't define a gateway after sudo services networking restart or ...
2
votes
1answer
1k views

lxc-start: failed to spawn

I tried following the steps to create and start an lxc container from here: https://help.ubuntu.com/lts/serverguide/lxc.html My host is running an up to date 64-bit Precise (12.04), and I'm trying to ...
2
votes
1answer
155 views

bash doesn't think lxc is installed, apt thinks it is

This screenshot sums up my problem: I've run apt-get update, upgrade, purge, autoremove and then install again. No luck. Anyone know why this is happening?
2
votes
2answers
163 views

lxc-create hangs and finally fails

I was trying to place some juju charms on linux containers and the containers failed to start. To debug the issue I sshed into the node where this happened and tried creating an LXC container manually ...
2
votes
1answer
922 views

removing old lxc directory “operation not permitted”

I setup some lxc containers (raring) under a /data path to get them off my SSD and I thought they were corrupt so tried to just rm -rf /data/lxc/$name and it clears out all except the rootfs ...
2
votes
1answer
840 views

How do I bind a ZFS pool to a LXC container?

I'm using Ubuntu Server 11.10 Oneric, kernel 3.0.0-14-server. I installed ZFS from ppa and created zpool and mounted it at /zfstankdir. Then I installed LXC and created Ubuntu container. Now I want ...
2
votes
1answer
34 views

How to modify rootfs of an unprivileged LXC container?

I have configured for namespaces for unprivileged LXC containers using this docuement https://help.ubuntu.com/lts/serverguide/lxc.html#lxc-unpriv I can create and start containers using lxc-create ...
2
votes
1answer
134 views

Getting data from the outside into my linux container?

I'm trying to seperate my database and my PHP application by using LXC. I'm currently having some issues getting my code deployed to one of the containers - I don't understand how this should work. ...
2
votes
1answer
2k views

lxc container no outgoing traffic

I am trying to setup a lxc container on a ubuntu 13.04 on a linode VPS, but I can't ping anything outside my host. my container network config looks like this: lxc.network.type = veth ...
2
votes
1answer
216 views

How to change charm service IP from default 10.0.0.X if running juju on local?

I set up a private cloud on local following by https://juju.ubuntu.com/get-started/local/ and configured network followed by How do I run Juju on a local server? (The difference is the IP address in ...
2
votes
1answer
754 views

What is the difference between Ubuntu Server and Ubuntu Cloud under LXC?

I want to set up Ubuntu LXC containers. Is there a practical difference between the /usr/share/lxc/templates/lxc-ubuntu and /usr/share/lxc/templates/lxc-ubuntu-cloud? I only have a single physical ...
2
votes
1answer
3k views

How do I migrate a Virtualbox image to an LXC container?

Is there a way to migrate a Virtualbox image to a LXC containter environment? I can easly extract a tar of the Virtualbox VM's file system. I'm kind of hoping there's a way to create an 'empty' ...
2
votes
0answers
109 views

LXC bridging with two NICs

I am setting up a server to host a number of LXC containers, for now just isolating web and db services. The server I am using has two NICs and I'd like to use one for host traffic and one for ...
2
votes
2answers
459 views

Boot problems after installing package `android`. How do I fix it?

I was thinking to play with my android phone through usb, so I did an apt-get install android* on my laptop. This this broke my boot. I can not boot it normally, but if I go into recovery and then ...
2
votes
0answers
85 views

net_cls and ns subsystems not available in 12.04?

I'm playing around with cgroups and I noticed when I try to list all available subsystems that the network ones are not available ? Running the following command should list ALL available subsystems - ...
2
votes
0answers
639 views

Another LXC Puzzle

So my server is running... Distributor ID: Ubuntu Description: Ubuntu 13.04 Release: 13.04 Codename: raring I stumbled onto lxc when I trying to find something to replace vmware on a small ...
2
votes
0answers
50 views

How do I assign an IP address to an LXC container? [duplicate]

I'm trying to start lxc containers with their own public ip address on the network. This is what I've tried so far: On the host The host machine has an IP address of 192.168.255.254. I added a ...
2
votes
0answers
303 views

A Linux container can use an authorized_keys file outside my home directory, but ephemeral containers based on it can't. Why?

In Ubuntu 12.10, I've created an LXC of type 'ubuntu' using the lxc-create utility. I then create ephemeral containers based on this container using the lxc-start-ephemeral utility, and I need to ...
2
votes
1answer
171 views

per user lxc containers

I am sure I saw how to do this on a webpage around the intergoogle somewhere. But Is it possible to have your system setup so when you create a user on your machine they log into their own LXC ...
2
votes
0answers
134 views

How I can run Android 4.0.4 in chroot on Ubuntu 12.04 on the Pandaboard ES?

I want to run fully functional Android 4.0.4 on my Ubuntu 12.04 installation on the Pandaboard ES with the LXC containers.
1
vote
2answers
321 views

How to make the apt autocompletion work in minimal system (in LXC container)?

When I work inside thin LXC container on 12.04 I have only very basic system. In particular the /etc/bash_completion.d is missing the e.g. apt, that I find particularly useful. Is there any standard ...