Error inside a LXC container: bash: fork: retry: No child processes

LXC Logo
Image source:

I’ve started to migrate all my OpenVZ Containers to the LXC container virtualisation. This is because of several reasons which I don’t want to write down in this post. This time I just want to give you a fix for a problem which has bumped up for several containers after their migration on my system.

The error in summary

This error is not a problem of LXC. SystemD is causing this and it’s causing this for a good reason. SystemD wants to protect your system that one or multiple processes are able to spawn other processes without limitation. Now, if you use LXC you will get of course a enormous amount of processes which are started by your container. The container itself is a process on your host system. And this is where the problems of the limitation begins.

The Fix

The fix is rather easy and doesn’t even require a restart of your system or of your containers. As root open the file /etc/systemd/system.conf and enable / set the following value:


after you’ve done this, simply let the SystemD reload itself:

root@system:~# systemctl daemon-reload

That’s it. Your containers should now run as expected without the bash: fork error.

Have fun with your containers šŸ™‚

OpenVPN Error: Linux route add command failed

OpenVPN Logo

Image source:Ā

Everbody knows OpenVPN. A powerful and easy to configure VPN client, which is cross-platform available for BSD, Linux, MAC and Windows.
A lot of my Linux boxes are OpenVPN clients, starting with Virtual Machines as well as physical boxes. If I use my OpenVPN server as aĀ default gateway, some machines having trouble to create the necessarily route. The output in the most cases is something like this:

Sun Jun 19 14:03:20 2016 /bin/ip route add via
RTNETLINK answers: No such device
Sun Jun 19 14:03:20 2016 ERROR: Linux route add command failed: external program exited with error status: 2

So this means that the OpenVPN tried to create a new route with the help of the ipĀ command which failed (error code 2). ButĀ how to fix this?

Add the route by your own

I’ve searched around the internet and nobody really had an answer to this. Well, the solution is rather simple. Directly after the successful connection to your OpenVPN server, add the route by your own. The following example would do this for the shown error above:

sudo route add -host dev enp4s0

As you can see, there is no gateway address to reach the host. It’s simply the Ethernet device which is stated here (enp4s0 is the name of the first wired Ethernet device under openSUSE when using Network Manager (formerly known as eth0)).

This error also occurs, if you want to use a OpenVZ container as a OpenVPN client. By default, the firstĀ virtual network device of a OpenVZ container is calledĀ venet0. So you would have to enter the following command to get this error fixed:

sudo route add -host dev venet0

After you added the host to your routing table with the correct outgoing network device, you’re ready to go to use the VPN as your default gateway.

Permanent Fix

To be honest, until now I wasn’t able to find a permanent fix for this. So this also means that you have to redo theĀ route add command every time, when you have connected to your VPN.
If you know a permanent fix for this problem, just let me know in the comments below. Your help is appreciated šŸ™‚

Convert IMG (raw) to QCOW2

KVM Logo

Most of you will know theĀ Kernel-based virtual machine. It’s already included with the latest Linux kernels and it gives you full virtualization under Linux which provides the capability to run almost every x86 OS you want inside a virtual machine.

Some versions ago, if you created a new virtual machine in KVM, the virtual hard disk was a RAW .img container. The new container type is QCOW2 and one of it’s main features is toĀ enable the snapshot functionality of KVM.
So this means, if you have virtual machines which have a IMG HDD attached, than you will not be able to create snapshots of this virtual machine. Luckily the KVM developers are providing tools, which helps you to convert existing IMG HDDs to QCOW2 HDDs.

The convert process

First of all, this will take some time and it depends of course on the size of the HDD. Also, you should shutdown the virtual machine so that the convert process has the standalone access on the HDD while converting. The following example would convert a .img HDD to a .qcow2 HDD:

qemu-img convert -f raw -O qcow2 /path/to/your/hdd/vm01.img /path/to/your/hdd/vm01.qcow2

To explain the command a litte bit more:

  • qemu-img is the command which should be executed
  • convert says qemu-img that we want to convert an existing HDD
  • the switchĀ -f raw lets qemu-img know, that the existing format of the HDD is RAW (in this case with .img filename ending)
  • theĀ -O qcow2 switch tells the qemu-img command that the destination HDD should be QCOW2
  • the first file is the exisiting raw HDD, the second one is the filename of the new QCOW2 type HDD

So, let us say we want to convert a raw HDD which is located in /var/lib/libvirt/imagesĀ (standard path for new KVM machines) to a QCOW2 HDD:

qemu-img convert -f raw -O qcow2 /var/lib/libvirt/images/machine01.img /var/lib/libvirt/images/machine01.qcow2

After you have done this, you just have to change the path from your HDD in your virtual machine from the raw .img to the .qcow2 file.Ā NOTE:Ā The .img file is not deleted after the successful convert process. You have to do this on your own.

At the end, you should be able to create snapshots for your virtual machine. One of the best features while using virtual machines at all šŸ˜‰

VMWare Workstation 9 is out … and it doesn’t work for me!

Greetings everbody,
if you are a more frequent visitor of my blog, you will have read, that I’ve tested VMWare Workstation 8 with some games and posted the results here. Well, recently after the release of VMWare Workstation 9, I upgraded my licence downloaded this version and tried to get this new bunch of software running at my Ubuntu 12.04 installation.

Somebody of you will know, that I have a newer machine, an ASUS N56VZ to be exact. Well, this machine has NVidia Optimus support and some other stuff (for e. g. LED backlight), which only works with an 3.5 kernel version for me. Because of this, I’ve downloaded the kernel packages for the latest Ubuntu 12.10 development release and installed it.
Well, now I’m able to use my Fn keys and even my NVidia graphic card without any problems. But now, while I’m useing a 3.5 kernel, VMWare Workstation 9 refuses to starting up. I’m able to install, compile the modules and enter the licence key, but shortly after trying to work or to start a VM, I get a “stack trace flood” which causes my X Server to freeze.

Willy Sudiarto Raharjo wrote something at his blog to that problem which you can read here:
He actually is describeing the same problem. He already found out how to fix that “stack trace flood” with a Workstation 8, but the (nearly) same procedure does not work with Workstation 9 as it seems. I’ve tested the new submitted patch for kernel 3.5 and Workstation 9 on myself, but it doesn’t help for me, too. I always get the “stack trace flood” recently, after I started a virtual machine.

Well, Willy Raharjo has the same problems and he will post it on his blog as soon as their a new informations due to that error out there (VMWare itself knows about the problem (listed at the release notes from Workstation 9 under “Known Issues”)).

At the end, I have to say, that I just read some informations from VMWare to this new version which are something like “amazingly new 3D graphics and performances, especially for CAD and games” and I said to myself “Ok, I have to test this”, especially after I have seen some screens from VMWare, running Skyrim at a Windows 7 VM! But well, looks like I have to wait until I can test this and can tell more about this here …

Amazing 3D performance in VMWare Workstation 8

Yesterday I’ve downloaded the new test version of VMWare Workstation 8 for Linux. After a short installation I was able to create a Windows 7 32-Bit VM with 4 Cores and 3GB Ram.

After this, I played a little bit around and was suprised at the very good performance while using more than only onre core in the VM. I can remember, that in VMWare Workstation 7 the VM was getting slower when I was using more than one core at all.
Because of the new problems with WINE and League of Legends (actually it is possible to get LoL running with WINE again, but the performance now is horrible) I’ve started to test LoL under this Virtual Machine … and I was totally blown away from the performance.
As in VMWare Workstation 7 I had only like 30 FPS when I was on low details, in VMWare Workstation 8 I get automatically the highest possible settings (expect from shadows) and get a stable 60 FPS Framerate. Even in teamfights my FPS never drop under the 30 FPS sum.

For me it is amazing what VMWare has done here! These days, I will test some more games and will come back here if I have some new informations … stay tuned šŸ˜‰