Friday, November 15, 2013

systemd enabled lightweight NameSpace Containers ~ QuickStart Guide

systemd (for some time now) provides a powerful chroot alternative to linux users for creating quick and lightweight system containers using power of cgroups and socket activation.

There is a lot more to "systemd" than this, but that's for some other post. Until then can explore it, starting here.

There is a utility "systemd-nspawn" provided by systemd which acts as container manager. This is what can be used to easily spawn a new linux container and manage it. It has been updated with (the systemd's amazing trademark feature) Socket Activation.

This enables any container to make parent/host's systemd instance to listen at different service ports for itself. Only when those service ports receive a connection, these container will spawn and act to it. Voila, resource utilization and scalability concepts.
More of this can read in detail at:

Here we'll see some way to quickly start using it via some custom made commands.
All the script commands used here can referred from as well.

Just download and source the linked script in your shell, and the commands told here will be available...
And yes, your system also need to be running systemd already.

Currently this just lets you create archlinux containers, will soon create different containers and make the script mature.

In case you don't have any created container already, or wanna create a new one...
$ nspawn-arch
To list names of all created containers...
$ nspawn-ls
To stop a running container...
$ nspawn-stop
To start an already created conatiner
$ nspawn-start




  1. it's systemd. no letter capitalized!!!

  2. Do you understand there is a 12 word phrase you can communicate to your man... that will induce deep feelings of love and impulsive attractiveness for you buried inside his chest?

    That's because deep inside these 12 words is a "secret signal" that triggers a man's instinct to love, idolize and care for you with his entire heart...

    12 Words That Trigger A Man's Desire Instinct

    This instinct is so built-in to a man's genetics that it will drive him to work harder than before to make your relationship the best part of both of your lives.

    Matter of fact, fueling this mighty instinct is absolutely important to achieving the best possible relationship with your man that the moment you send your man one of these "Secret Signals"...

    ...You'll soon notice him expose his soul and mind for you in such a way he never expressed before and he'll see you as the only woman in the universe who has ever truly understood him.