last edited 2013/12/14 07:40 (*
I code nowadays (2012/11) on a bunch of laptops (with 2nd screens attached) which run on Windows 7 (Win7) mostly - with one keyboard and mouse controlling 2-4 machines using Synergy
Win7 is suitable for basic works, but in the moment serious programming is required, a real UNIX is required. I used to install Cygwin.com (UNIX framework for Windows) but switched now (2012/10) to VirtualBox.org (VB), which I virtualize an entire LINUX/Ubuntu Server Edition (12.10) box with.
Once it's running and up, I use PuTTY to ssh/login into the virtual machine, and I follow up and install LXC:
% sudo apt-get install lxc lxc-utils
% sudo lxc-create -t ubuntu -n ubu00
% sudo lxc-console -n ubu00
and you will see an actual login:
Ubuntu 12.10 ubu00 tty1
ubu00 login: |
LinuX Containers (LXC) is a lightweight LINUX virtualization approach with little demands on the CPU unlike other approaches such as Xen.org or KVM ; and therefore it is possible to run LXC containers within a VB-box:
- Windows 7 (e.g. 192.168.0.10)
- VirtualBox (with "Bridged Network")
- LXC Host (e.g. 192.168.0.32)
- LXC machine 1 (e.g. 10.0.3.12)
- LXC machine 2 (e.g. 10.0.3.20)
or Windows7(VirtualBox(LXC Host(LXC machine 1, LXC machine 2,..)))
The computational overhead of LXC containers to its host is minimal, as LXC is just process isolation, all using the same LINUX kernel.
As a sidenote, VirtualBox.org the Open Source Software (OSS) performs along the commercial competition like VMWare Player , only apprx. 6% difference, VMWare Player slightly faster.
LXC framework on Ubuntu 12.10 provides various templates:
- busybox: 2MB small functional LINUX system
- debian: works right away (apprx. 300MB)
- fedora: requires yum to be installed first (apprx. 485MB)
- opensuse: requires zypper to be installed, failed to compile due immature 'cmake' mess
- ubuntu: works flawlessly (apprx. 310MB)
- ubuntu-cloud: works flawlessly (apprx. 670MB)
Additionally you can clone existing LXC containers, e.g. I created
- ubu00 as default Ubuntu, and
- ubu01, ubu02 are cloned from ubu00,
- alike with deb00 Debian.org etc.
I personally prefer Ubuntu.com LINUX flavor due the solid package manager, and installing the usual components is done quickly, e.g.
% sudo apt-get install screen lighttpd mysql-server mysql-client mongodb samba
With a decent equipped laptop (e.g. 3GB RAM, 2 cores, 2GHz) a reasonable responsive LINUX box with LXC-based virtualized sub-machines is possible, ideal for development (e.g. CMS like Wordpress.org
) and testing configurations intensively.
Update 2012/11/30: I began to work with server hardware, where I was creating 40 LXC machines, and start and stop them in batch, and I noticed larger amount of LXC do not start and stop reliable as of Ubuntu 12.10, e.g. out of 40 about 1-7 machines fail to start or stop (lxc-stop hangs actually) every 2nd or 3rd time of starting or stopping. So, it's good for experimenting, but for production it seems not yet ready. A quick solution is to put a sleep of one second before starting the next container. I will issue a bug report addressing problem.
Update 2012/12/21: Nested LXC and juju cloud framework: LXC in Ubuntu 12.04 , useful overview and details.