Tuesday 8 September 2015

VirtualBox slow on installation of Guest OS

I use VirtualBox for testing in many environments. Normally the defaults are fine for installing Linux but on one environment it was really slow to just install. Installing Debian Jessie from an ISO would normally take 15 minutes but in this environment after an hour it was still only at 35%. The host OS was not over taxed and has lots of spare CPU + RAM resources free.

After some testing I found the issue was resolved by :

1. Open Settings
2. Navigate to System->Motherboard
3. Change the Chipset to ICH9 (see below)
4. Press OK

Now the installation will be fast.




Monday 7 September 2015

Change docker default storage location




One of the first tasks I wanted to do after installing Docker on Arch Linux was to be change the default partition storage location. The default location is /var/lib/docker which is the path docker uses as the root of the docker runtime.

Looking at the man pages for docker its not amazingly obvious at first which option needs to be configured but after some research I found it is :

-g, --graph=""

And the service status shows this option is not set by default

$ sudo systemctl status docker
* docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2015-09-07 13:07:10 PDT; 2h 0min ago
     Docs: https://docs.docker.com
 Main PID: 420 (docker)
   CGroup: /system.slice/docker.service
           `-420 /usr/bin/docker daemon -H fd://

Its possible to define --graph within the /usr/lib/systemd/system/docker.service file but this will be overwritten with every new release of docker.

The solution is first create a directory:

$ sudo mkdir /etc/systemd/system/docker.service.d

Then create a file similar to the following

$ cat /etc/systemd/system/docker.service.d/dockerruntimeroot.conf
[Service]
ExecStart=
ExecStart=/usr/bin/docker daemon -H fd:// --graph /mnt/docker-data


Then

$ sudo systemctl daemon-reload
$ sudo systemctl restart docker


Now the new path will be shown in the service status

$ systemctl status docker
* docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/docker.service.d
           `-dockerruntimeroot.conf
   Active: active (running) since Mon 2015-09-07 15:52:28 PDT; 1min 49s ago
     Docs: https://docs.docker.com
 Main PID: 8981 (docker)
   CGroup: /system.slice/docker.service
           `-8981 /usr/bin/docker daemon -H fd:// --graph /mnt/docker-data