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

learn more… | top users | synonyms

45
votes
1answer
11k 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?
17
votes
3answers
13k 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?
17
votes
1answer
3k 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 ...
10
votes
2answers
6k views

What should i choose? LXC vs OpenVZ

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 ...
9
votes
5answers
4k 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 ...
8
votes
2answers
187 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
715 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
186 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 ...
5
votes
1answer
983 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
177 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
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
1answer
774 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 ...
4
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, ...
4
votes
2answers
402 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
385 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
5k 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 ...
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
161 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
315 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
796 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
1answer
784 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 ...
2
votes
2answers
89 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
1answer
621 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
657 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
75 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
596 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 ...
2
votes
1answer
145 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
591 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
2k 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
2answers
2k 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?
2
votes
0answers
480 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
46 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
209 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
0answers
312 views

Problem while deploying MysQL through Juju in LXC [closed]

I'm trying to follow the Juju tutorial do deploy MySQL and Wordpress, but I found a problem in MySQL deploy process. The error appears right after mysql-server installation, when the service is ...
2
votes
1answer
124 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
130 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
3k 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 ...
1
vote
1answer
904 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 ...
1
vote
1answer
97 views

lxc-create says container already exists

I'm trying to create a container on a non-standard location, but lxc-create complains the roots already exists, when, in fact, it seems it doesn't. What am I doing wrong? ...
1
vote
2answers
171 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 ...
1
vote
1answer
601 views

Creating volume group in nova-volume Juju charm

Is it required to setup a volume group before deploying the nova-volume Juju charm? I am trying to install Openstack locally on my Ubuntu VM running in local (lxc) mode and get an error that either ...
1
vote
1answer
17 views

Juju local shared folder

I'm using juju local and I want to create a shared folder between the host and one of the juju machines. How can I accomplish this? I attempted these instructions with no success : ...
1
vote
1answer
37 views

juju error executing lxc-clone local-provider

I'm trying to use juju with local-provider to setup juju-gui (and owncloud eventually). After "juju deploy juju-gui", juju status shows the error: agent-state-info: '(error: error executing ...
1
vote
1answer
280 views

Forward port to LXC guest using UFW

I am trying to forward port 2222 on my host 192.168.2.252 to a LXC guest on 10.0.3.11. How do I do it using the UFW-framework? In other words I want to do this but with the ufw-framework. iptables ...
1
vote
1answer
98 views

Running a database in LXC

If you need to run your databases in lxc, what happen to your data files? Do you have access to the data file on the host os? I guess the processes show up in the gust os process but who about the the ...
1
vote
2answers
135 views

Practical number of concurrent LXC limit on one node

Is there any practical limit on the number of concurrent LXC containers to run on one box. Obviously, this depend on the node spec (cpu, ram,..) but really what I am wondering is the cost of running ...
1
vote
1answer
1k 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 ...
1
vote
2answers
430 views

juju wordpress deploy using lxc

Since I use LXC alot, I've been waiting for the new go version of juju to support LXC again for sometime now! I just reinstalled juju .7 I am running Ubuntu 13.04 my environment.yaml has - type: ...
1
vote
1answer
274 views

Dual-use guest for LXC and KVM?

Would it be possible to install (and maintain by simple means, such as apt-get dist-upgrade) a "dual-use" setup? I.e. install an guest instance in a way which allows me to run it either as LXC or as ...