Moving Logs & Enabling SSH on ESXi 6

Moving Logs & Enabling SSH on ESXi 6

I’ve recently decided to migrate my home lab from Virtualbox on Xubuntu onto ESXi 6.0, to try and speed things up slightly.  Due to the slightly ancient Microserver I am running (N54L with 16GB RAM and tweaked BIOS) there is no way to get decent RAID running without adding in a replacement RAID controller.  Lots of people decide to plump for the P410 and they can be found pretty cheap on Ebay.

This quick article is primarily to serve as a reminder for me on the post install tweaks I needed, and hopefully it will answer the hordes of commenters on various tutorial blogs too.

The risk of running ESXi exclusively off a USB drive is that the scratch data and log files can accrue quickly, as well as changing frequently.  Over time this can result in excessive IO on the USB drive and might hasten it failing.  I had a spare 256GB spinning disc drive lying around so installed that and added it to the datastores.

This link from VMware says to simply change the syslog and scratch directories in HOST -> Configuration -> Software Settings -> Advanced Settings however no matter what I tried I could not get the Datastore name to be accepted by the VMware client.  It looked like it needed the datastore UUID rather than the ‘display name’.  It was a LONG string and copy paste wasn’t working!

Look at Location field.  No chance of writing that down!

Solution

Allow SSH to the HOST and then ls -alt the /vmfs directory.

This then allowed me to paste it into the Scratch and syslog settings as mentioned previously. If you change the scratch location to your desired location, you can also delete the syslog.global.logDir value and it will default to a subfolder of your scratch location.

To enable SSH:

HOST -> Configuration -> Security Profile -> Properties -> SSH --> Options.

Set it to as shown below and click Start:

You can also tweak the firewall in Remote Access options to restrict SSH to certain IPs (eg your management VLAN).

Find datastore UUID

SSH to your server in the normal fashion and list the contents of your vmfs directory.  This value can then be pasted easily into your VMware settings.

Paste the relevant UUID into your scratch directory location.

If SSH access is not required past this step, make sure to disable it once you have configured the syslog & scratch locations.  VMware will also prompt you if you leave it running.  I found that the HOST needed a restart after changing the scratch location, before I was able to alter the syslog path.

Comments are closed.