Building a virtualized NAS & DVR with ESXi 6.0 / Part 3: Installing ESXi

Introduction

It’s time for installing ESXi 6.0 on my VMware ESXi whitebox build. VMware ESXi, as you most likely already know, is a hypervisor which runs multiple virtual machines in a single physical computer. In my case I’m going to use it to run FreeNAS and MythTV, among other things.

If you haven’t read the previous parts in this series, be sure to check them out.

Creating a customized installation ISO

In order to install VMware ESXi, I needed an installation ISO package. It can be downloaded from VMware’s site, but the problem is that ESXi has very limited hardware support out-of-the-box. Without a supported NIC (which the one on my consumer-grade ASRock motherboard isn’t), ESXi can’t be installed.

As I mentioned in part 1, the H97M Anniversary motherboard’s Realtek NIC and the ASM1061 SATA controller can be made to work with ESXi. This is done by creating a customized installation ISO which is injected with community-supported drivers (see here and here).

Creating the ISO is made easy with the excellent ESXi-Customizer-PS script. However, the script requires installing Microsoft PowerShell and VMware PowerCLI first.

A further thing to note is that PowerCLI requires the PowerShell execution policy to be RemoteSigned.

powercli-install-exec-policy

If the execution policy is not set, ESXi-Customizer-PS results in the following error:

File ESXi-Customizer-PS-v2.4.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at http://go.microsoft.com/fwlink/?LinkID=135170

The execution policy can be set by running the following command in PowerShell:

PS S:\ESXi> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process

Execution Policy Change
The execution policy helps protect you from scripts that you do not trust. Changing the execution policy might expose
you to the security risks described in the about_Execution_Policies help topic at
http://go.microsoft.com/fwlink/?LinkID=135170. Do you want to change the execution policy?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "N"): y

After this, ESXi-Customizer-PS can be run without problems. Note the net55-r8168 and sata-xahci parameters which add those packages to the new ISO.

PS S:\ESXi> .\ESXi-Customizer-PS-v2.4.ps1 -v60 -vft -load net55-r8168,sata-xahci -log 'S:\ESXi\ESXi-Customizer-PS.log'

Script to build a customized ESXi installation ISO or Offline bundle using the VMware PowerCLI ImageBuilder snapin
(Call with -help for instructions)

Logging to S:\ESXi\ESXi-Customizer-PS.log ...

Running with PowerShell version 4.0 and VMware vSphere PowerCLI 6.0 Release 3 build 3205540

Connecting the VMware ESXi Online depot ... [OK]

Connecting the V-Front Online depot ... [OK]

Getting Imageprofiles, please wait ... [OK]

Using Imageprofile ESXi-6.0.0-20160204001-standard ...
(dated 02/20/2016 01:45:53, AcceptanceLevel: PartnerSupported,
For more information, see http://kb.vmware.com/kb/2132154.)

Load additional VIBs from Online depots ...
   Add VIB net55-r8168 8.039.01-napi [New AcceptanceLevel: CommunitySupported] [OK, added]
   Add VIB sata-xahci 1.34-1 [OK, added]

Exporting the Imageprofile to 'S:\ESXi\ESXi-6.0.0-20160204001-standard-customized.iso'.
 Please be patient ...

All done

Now the customized ISO was ready to be used.

Creating a bootable USB drive

The next step was to create a bootable installation drive. The idea is to boot from a USB drive and install ESXi onto the same drive.

There are several tools available for creating bootable USB drives from ISOs but Rufus seems to work best with UEFI systems.

format-usb-drive-for-esxi

After Rufus was finished, I was able to boot the soon-to-be ESXi box with the newly formatted USB drive.

Installing and configuring ESXi

The actual ESXi installation went smoothly.

After ESXi was up and running, I could connect to it with the vSphere software.

empty-esxi

First I installed the free license (you can get it from VMware’s website). Then I set up the SSD as a datastore.

esxi-add-storageAfter that I set up the host cache on the SSD. Host caching means that memory-constrained servers can use a fast SSD for swapping. I chose to use 30 GB for the cache; don’t ask me why, it just felt like a good number. To be honest I don’t actually know if I need host caching since I have lots of memory and my one and only datastore is an SSD (so there will be no swapping to slower HDDs anyway). I just wanted to try the feature out.

esxi-host-cacheI also went through the other settings, including time configuration where I set up NTP to make sure the server stays on time.

Finally I wanted to make sure the server starts up without problems with just the power and LAN cables connected. It did. The ESXi box ran fine and was ready for some VMs, the first being FreeNAS.

Leave a Reply

Your email address will not be published. Required fields are marked *