Category Archives: Home Lab

OpenVPN on CentOS 7

I’ve got OpenVPN installed on a CentOS 7 box. It’s configured as a routed IP tunnel (“tun”) as instead of an ethernet tunnel (“tap”).

It works great. Apart from one thing…

OpenVPN tries to start before the networking on the box is up…

This makes no sense to me. I’m not sure if it’s a systemd thing or something else.

In any case, if you have this problem, a restart of the OpenVPN service/daemon should do it:

systemctl stop openvpn@server.service
systemctl start openvpn@server.service

To speed things up I wrapped this up in a handy script.

Problem solved.

Upgrading ESXi – Latest Update

In November, ESXi 6.5 became available to users of the free vSphere Hypervisor.

As a user of ESXi 6.0 and having several failed upgrade attempts already, I was not optimistic about an attempt to upgrade to 6.5.

In addition, I was never able to determine why the upgrades were failing so no way of preventing it happening again!

My ESXi installation is on a USB drive so all I had to do was swap it for a new blank stick (allowing me to instantly go back if it all goes wrong).

After performing a new clean installation of ESXi 6.5, I was up and running within 10 mins. Then another 10 minutes of individually attaching the VMs to the new installation.

All finished and fully upgraded to 6.5.

Until the next upgrade anyway…

Upgrading ESXi

At the moment I have an Lenovo ThinkServer TS140 running VMware vSphere Hypervisor (ESXi).

It’s running the first released build of v6 – ESXi-6.0.0-2494585-standard.

Upgrading to the next version should be straightforward. Boot the installer disc and perform an upgrade to the new version.

esxiblog-confirmmsg

Unfortunately, it isn’t as easy as that – the installation fails each time with the same message:

esxiblog-installerror

Rebooting the server back into the old ESXi version works fine. Repeating the upgrade process unfortunately doesn’t work as the option to Upgrade is no longer available since the ESXi installation is no longer detected at all!

I’ve resolved this issue by logging onto the host via SSH and copying the content from /bootbank to /altbootbank.

This gets me the Upgrade option back in the installer but unfortunately it just fails again at the same point with the same error.

Looks like an full, clean ESXi reinstall is required. How can I do this and retain my settings though?

I applaud the decision to make a free ESXi edition for users such as myself but am astounded that there aren’t even the basic tools to administrate it!

The officially provided tools don’t support all the features of the free ESXi, so in order to do certain things you need the commercial Web Client, there is no VM backup support beyond a basic file backup of the VM data files and seemingly no way of backing up the server configuration at all.

It looks like an old fashioned “write down the settings” and manually restoring them after a clean install is going to be necessary. Hope that upgrading is worth it after all of this!

Self Teaching and Home Labs

The long awaited second post. Well here it is.

I’ve read a number of articles and opinion pieces over the years about the value of self teaching.

I’ve never been one of those people that has thought that you could sit down with a textbook (or a stack of textbooks), and learn an entire subject from scratch.

I was wrong… well, in part anyway…

While I still hold firmly onto my scepticism regarding sitting down and teaching yourself an entire subject. That doesn’t mean you can’t amass knowledge on your own. I know this because I’ve done it myself. I’ve done this by setting up a home lab.

It all started when I picked up a HP Microserver N40L back in 2012. I was attracted initially by the price and the low power consumption (for a 24/7 system at home, it was ideal).

It was a revelation.

I installed CentOS 6.2 on the included drive and got going. Slowly at first. Months would go by without any meaningful progress. By the end of the year I had set up an FTP, a Samba share with media files on it being used by an XBMC installation running off a MySQL database.

The following year (almost exactly 12 months after the first), I bought my second N40L, this time running Windows Server 2012 Foundation.

This was even more of a revelation. The ease of setting things up on Windows let me take great leaps ahead with a lot of services. A few months after getting the second server in, I had my own in-house DNS, DHCP, WINS and Active Directory services up and running. I also started looking at setting up a VPN into my network.

I can say I learnt more about networking than I ever did before in those few short months.

Since then I got a VM service running, using VirtualBox, running as a service on my first N40L. I later graduated this to a dedicated VSphere ESXi server (bare metal) on a new Lenovo ThinkServer.

Over 4 years later, I’ve got a bunch of virtual machines running, one is now dedicated to running the external VPN service, there is an in-house cloud storage server (OwnCloud), an NTP server for time synchronization and a source control server (Perforce) for any code I might write. On top of these I have several Windows 10 installations on the ESXi server for testing purposes. On top of this, the original Windows Server 2012 box lives on, with a small form-factor PC (an Intel NUC) running monitoring (PRTG) plus a few Windows based services/applications.

Over the last 4½ years I’ve probably spent about £1,500 on my lab. Do I regret that spending? In a word, no. It was worth every penny. I’ve learnt more than I ever expected I would ever learn, and I am still learning. My skill set has grown, and into areas I would never have had the opportunity to cover normally (or at least not in any detail), plus it’s all at my own pace.

My latest project? Remember the original N40L? It’s turning into my new NAS storage service (using FreeNAS)…

The most important thing I’ve learnt through all this is to invest in yourself and the rewards you reap will be all the sweeter. It all started for me with a server for £99 and a copy of downloaded CentOS…