Questions tagged [lxc]

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

From the Ubuntu wiki LXC summary:

LinuX Containers (LXC) provide lightweight virtualization that lets you isolate processes and resources without the need to provide instruction interpretation mechanisms and other complexities of full virtualization.

LXC home page

442 questions
53
votes
1 answer

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?
Jorge Castro
  • 73,717
38
votes
3 answers

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?
dhojgaard
  • 1,167
28
votes
3 answers

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 examples are basically setup for people to test with,…
24
votes
11 answers

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 get their IP address in such a way that I can…
22
votes
5 answers

Adding a shared host directory to an LXC/LXD Container

I have been experimenting with LXC/LXD on Ubuntu 14.04 and it's all working great. I just need to figure out how to get shared directories working between my host machine and a container so I can ditch Virtualbox once and for all. I have seen this…
user47227
  • 541
21
votes
5 answers

How do I share a directory between an LXC container and the host?

How can I share a folder between the host system (ubuntu 14.04) and an ubuntu lxc container? I tried mounting the folder on the host: sudo mount --bind /media/data/share /media/data/container/name/rootfs/share but I can't see any files. The same…
Max
  • 381
  • 1
  • 2
  • 7
17
votes
4 answers

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 maybe list pros and cons?
dhojgaard
  • 1,167
15
votes
6 answers

Change data directory of Docker

How can I change the data directory of Docker where docker save the container (or where lxc save the container)? I have in my server a ssd and a hard drive ant I want that the container will be save on the hard drive. Thanks
ssd_rider
  • 420
  • 2
  • 6
  • 16
15
votes
3 answers

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 needs to get it's dhcp address from my Linksys…
14
votes
2 answers

How do I install a kernel module in an LXC guest machine?

I am attempting to install OpenStack DevStack on an LXC guest machine. One of DevStack's packages requires a new kernel module, but when I try to run modprobe on the LXC guest I get an error: ubuntu@lxc$ sudo modprobe scsi_transport_iscsi FATAL:…
mars
  • 493
14
votes
1 answer

Can't remove core18 snap

I am cleaning up my fresh Ubuntu 20.04 install and I can't seem to remove core18 snap. $ snap list Name Version Rev Tracking Publisher Notes core18 20200427 1754 latest/stable canonical✓ base lxd 4.1 15359 …
12
votes
2 answers

What are root and Ubuntu password in LXC ubuntu:16.04 container?

I created a Ubuntu container lxc launch ubuntu images:ubuntu/xenial mycontainer I can access the container using lxc exec mycontainer bash I found mysel logged in as root without asking any password I see that there is a "ubuntu" user defined How…
12
votes
6 answers

How to let built-in DHCP assign a static IP to LXC container based on name, not MAC address

I know, that I can assign static IP manually, using /etc/network/interfaces. I also know, that I can read the MAC address of the LXC container (e.g. by looking for lxc.network.hwaddr entry in /var/lib/lxc//config and assign the IP…
12
votes
5 answers

How to log into lxc container?

I recently installed the 32 bit lxc container on a 64 bit Ubuntu 12.04 system. When I run the command sudo lxc-start -n my32bitbox I am greeted with a login prompt. I enter the default login and password which is: login= ubuntu ; password= ubuntu;…
Crelloc
  • 121
  • 1
  • 1
  • 3
11
votes
1 answer

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 allow loop mounting, but I'm missing…
Azendale
  • 12,021
1
2 3
29 30