Computer
Computer Diary
    RepRap


    "God is not external to anyone, but is present with all things, though they are ignorant that he is so."

    Plotinus
    204-270 AD

    Here my little rant and praise place, where the daily experiences of my programming work are expressed. I publish them with the idea that others might find it useful and benefit from it.

    2012/11/27
    UNIX Man on Windows 7: VirtualBox + Ubuntu + LXC
    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 package.

    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: |

    Virtual Machines (LXC) within a Virtual Machine (VirtualBox)

    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)
          • etc.

    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:

    • altlinux
    • archlinux
    • 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 / Typo3.org / Drupal.org or Mediawiki.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.



    All posts or individual posts:

  • MetaFS - Dealing With Metadata the Proper Way (2013/12/14 01:00)
  • My Cellphones & Smartphone (2010-2013) (2013/09/02 23:15)
  • KDE / Kubuntu 12.04: 10+ years terrible GUI, A Systemic Problem of OSS (2013/04/27 12:18)
  • UNIX Man on Windows 7: VirtualBox + Ubuntu + LXC (2012/11/27 19:24)
  • Metadata - The Unresolved Mess (2012/07/10 20:59)
  • Cellphone Networks: Thieves, Insanity & Crap (2010/01/26 13:57)
  • MacOS-X for a UNIX Man with a PC (2009/09/26 20:43)
  • Windows XP for a UNIX Man (2009/09/22 18:28)
  • Server Counting (2009/05/18 11:50)
  • Automatically Geotag Photos without GPS (2009/04/22 08:28)
  • Rebirth of FastCGI (2009/04/15 17:17)
  • Online Advertisement & Income for Web-Site Owners (2009/03/18 22:10)
  • iPhone JavaScript Frameworks (aka Avoiding Objective-C) (2009/03/14 22:08)
  • Google - The Almighty Tracker & Advertising Blocking (2009/03/12 22:09)
  • How To Save 300MB RAM (2009/03/07 22:07)
  • Verbosity of Programming Languages (2009/03/06 22:06)
  • Problems with MacOSX (2009/03/03 22:03)
  • MacOSX: My First Steps (2009/02/24 09:57)
  • Catch 22 with HDD/DVD Recorder Medion Life (2009/02/24 09:27)
  • Kubuntu 8.1 as guest on VirtualBox MacOSX host (2009/02/24 01:33)
  • VirtualBox vs VMWare Fusion on MacOSX (2009/02/24 01:19)
  • SQL vs GREP with 230K lines (12MB) GeoLite (2009/02/23 20:10)
  • Kubuntu 8.1: Eye-Candy & Memory Waste (2009/01/24 09:57)
  • Firefox 2.0.x / 3.0.x - Memory Waste (2009/01/22 19:34)


    [ post new entry ] (only for administators)

    Title:

    Text:

    Tags: (separated by commas)

    Date (optional):

    Password:
  •  


    .:.




    Copyright 2007-2016, 2020-2024 © by René K. Müller <spiritdude@gmail.com>
    Illustrations and graphics made with Inkscape, GIMP and Tgif