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?
Ubuntu – Web Based Management For LXC Containers
lxcsoftware-recommendation
Related Solutions
The following answer repeats much of the information in the Links below
LXC
Containers are a lightweight virtualization technology. They are more akin to an enhanced chroot than to full virtualization like Qemu or VMware, both because they do not emulate hardware and because containers share the same operating system as the host. Therefore containers are better compared to Solaris zones or BSD jails. Linux-vserver and OpenVZ are two pre-existing, independently developed implementations of containers-like functionality for Linux. In fact, containers came about as a result of the work to upstream the vserver and OpenVZ functionality. Some vserver and OpenVZ functionality is still missing in containers, however containers can boot many Linux distributions and have the advantage that they can be used with an un-modified upstream kernel.
Making LXC easier
One of the main focus for 12.04 LTS was to make LXC dead easy to use, to achieve this, we’ve been working on a few different fronts fixing known bugs and improving LXC’s default configuration.
Creating a basic container and starting it on Ubuntu 12.04 LTS is now down to:
sudo apt-get install lxc
sudo lxc-create -t ubuntu -n my-container
sudo lxc-start -n my-container
This will default to using the same version and architecture as your machine, additional option are obviously available (–help will list them). Login/Password are ubuntu/ubuntu.
Another thing we worked on to make LXC easier to work with is reducing the number of hacks required to turn a regular system into a container down to zero. Starting with 12.04, we don’t do any modification to a standard Ubuntu system to get it running in a container. It’s now even possible to take a raw VM image and have it boot in a container!
The ubuntu-cloud template also lets you get one of our EC2/cloud images and have it start as a container instead of a cloud instance:
sudo apt-get install lxc cloud-utils
sudo lxc-create -t ubuntu-cloud -n my-cloud-container
sudo lxc-start -n my-cloud-container
And finally, if you want to test the new cool stuff, you can also use [juju][3]
with LXC
[ -f ~/.ssh/id_rsa.pub ] && ssh-keygen -t rsa
sudo apt-get install juju apt-cacher-ng zookeeper lxc libvirt-bin --no-install-recommends
sudo adduser $USER libvirtd
juju bootstrap
sed -i "s/ec2/local/" ~/.juju/environments.yaml
echo " data-dir: /tmp/juju" >> ~/ .juju/environments.yaml
juju bootstrap
juju deploy mysql
juju deploy wordpress
juju add-relation wordpress mysql
juju expose wordpress
# To tail the logs
juju debug-log
# To get the IPs and status
juju status
Making LXC safer
Another main focus for LXC in Ubuntu 12.04 was to make it safe. John Johansen did an amazing work of extending apparmor to let us implement per-container apparmor profiles and prevent most known dangerous behaviours from happening in a container.
NOTE: Until we have user namespaces implemented in the kernel and used by the LXC we will NOT say that LXC is root safe, however the default apparmor profile as shipped in Ubuntu 12.04 LTS is blocking any armful action that we are aware of.
This mostly means that write access to /proc and /sys are heavily restricted, mounting filesystems is also restricted, only allowing known-safe filesystems to be mounted by default. Capabilities are also restricted in the default LXC profile to prevent a container from loading kernel modules or control apparmor.
More details on this are available here:
http://www.stgraber.org/2012/05/04/lxc-in-ubuntu-12-04-lts/
https://help.ubuntu.com/12.04/serverguide/lxc.html
http://www.stgraber.org/2012/03/04/booting-an-ubuntu-12-04-virtual-machine-in-an-lxc-container/
Your lxc guest will need a desktop but whether or not a full ubuntu-desktop or not depends on your use.
Then you might wanta means to access a desktop in the container (VNC, xfreerdp/xrdp, x2go). In my lxc containers I install x2go server then use an x2go client (mac, pc, linux) to log into the lxc desktop. x2go clients support unity, gnome others so you can choose.
Also, you may need/want to modify ssh default port etc for the container (/etc/ssh/sshd_config) to something other than default but that may mean you may need to make a change on your router firewall also.
Best Answer
OpenStack can manage virtual machine instances, and LXC deployments on bare metal.
It might be overkill for your scenario though, it requires a database server, message qeueue server, and many components to be configured (nova, swift, keystone, horizon, etc.).
If you do decide to try OpenStack, I suggest you get started with the devstack scripts:
http://devstack.org/