Monthly Archives: September 2016

Vim Cheat Sheet

i = Insert mode
o = instert new line
h = left
j = Move down
k = Move up
l =right
r = replace current character
x = remove a current character
dd = delete line
dw = delete Word
wq = Write and Quit Vim
q! = Quit with out saving

To search
/searchterm and press enter and then press N to next occurrence,

Copy and Pasting lines in VIM

  1. Make sure you’re in the normal mode. Press Esc to be sure. Then copy the entire line by pressing yy (more info :help yy). Y stands for “yank“. Instead, you can also press Y (shift + y) but I find the former a bit more convenient.
  2. Paste the line by pressing p. That will put the yanked line right under your cursor (on the next line). You can also paste before your current line by pressing the capital letter P. Again, to get some help you can use :help p.

Copy and Pasting in VIM

  1. Position the cursor where you want to begin cutting.
  2. Press v to select characters (or uppercase V to select whole lines, or Ctrl-v to select rectangular blocks).
  3. Move the cursor to the end of what you want to cut.
  4. Press d to cut (or y to copy).
  5. Move to where you would like to paste.
  6. Press P to paste before the cursor, or p to paste after.


Unable to Start Docker Service on Windows 2016 TP5

So today i was playing with Docker and Containers on windows 2016 technical preview 5 with the following this guide:

I am running this a Virtual Machine in VMware 6 in my demo environment and was now planing ton use hyper-v containers just windows containers as i did not want to get involed with Nested Virtualization.

Every thing work until i try to start docker:


PS C:\Users\Administrator> Start-Service docker

Start-Service : Failed to start service 'Docker Engine (docker)'.
At line:1 char:1
+ Start-Service docker
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (System.ServiceProcess.ServiceController:ServiceController) [Start-Service],
+ FullyQualifiedErrorId : StartServiceFailed,Microsoft.PowerShell.Commands.StartServiceCommand

And in event viewer it display this:

Log Name: Application
Source: docker
Date: 23/09/2016 08:44:01
Event ID: 4
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: dockerwinhost
fatal: Error starting daemon: Error initializing network controller: Error creating default network: HNS failed with error : Failed to create network
Event Xml:
<Event xmlns="">
 <Provider Name="docker" />
 <EventID Qualifiers="0">4</EventID>
 <TimeCreated SystemTime="2016-09-23T07:44:01.595966100Z" />
 <Security />
 <Data>Error starting daemon: Error initializing network controller: Error creating default network: HNS failed with error : Failed to create network</Data>

When Dockers first starts it try to create a nat network on the network.  As my Demo Suite is on the Network this class with  the nat network and cause network not to be created. To fix this Open up two powershell windows (Remember to run as Administrator). In the first windows type:

dockerd -H npipe:// -b "none"

This start docker with no network.Switch to the other power shell windows And type the following command to create a network which is not the network

docker network create -d nat --subnet= --gateway= MyNatNetwork

Switch back to the other Powershell windows and close it. On the Powershell which is open type to start docker:

Start-Service docker

You should be able to carry on creating containers, The only problem is that i faced after that is that i could not access the containers using the nat mapping from a remote machone. Hopefully this a bug and fixed in RTM. I could access the container via the NAT IP address directly on the container host. To get the NAT IP address of the container type:

docker inspect "ID or Name of the container"

Again you will need to install firefox/chrome on the server if you trying acess to web application from the the container host.As edge does not seem to install by default in windows 2016 Server.

More info on these bugs see:


Admin Admin Podcast #046 – Show Notes – All About Docker and Containers

Al Been HPE event and learnt about Docker
Andy been having fun with Till Printers and Built Linux server running plex
Jerry has a new job!

VMs vs Docker


Docker Links:

Digital Ocean Status Twitter Account 

BBC Programme Jerry was talking about in EP45 – Thanks David


Admin Admin Podcast #045 – Show Notes – BSD is so cool!




  • Jerry is looking for another job! “Devops” means “sysadmin”, but you can ask for more money 🙂
  • Decoupling mysql from web+db+mail server for performance reasons
    • Set up the new server
    • Move the data over
    • Reconfigure sites to point to new DB location
  • Migrating gitlab to a new server – Upgrade to latest version first before dumping out backup *.tar file
  • Ansible galaxy – other peoples’ roles
  • Made a Debian package with checkinstall – it’s really easy!
  • Finally finished installing the Icinga POC (I think)