Intel NUC As A ESXi Host (part 7)

Introduction

Now that ESXi has been installed, and you can manage it will the vCenter client, you will notice that your ESXi host is in maintenance mode, as it should be.  We set this at the end of the automatic script.

 

Table Of Contents

This will be a multi-part post, as it covers a lot of topics…

  1. NUC Specs, and build information,
  2. Building a custom ESX image that includes drivers for the NUC’s network card and SSD,
  3. DHCP, PXE booting and automatic installation scripts,
  4. Synology configuration for VMware datastores,
  5. Networking, VLANs and getting it to work,
  6. Installing ESXi,
  7. Any other configuration,
  8. Final (random) thoughts.

 

Other Configuration

You should also notice that the Storage and Network sections are also populated correctly with the settings you configured in the automated script.  You may need to rename your storage datastores if this is the first ESXi host.  The will have long “weird” names that are no use to anyone in a home lab.

Host Cache

Since I am using a 30Gb drive, and the ESXi installation only requires about 10Gb, I can use the remaining space as a host cache.  This is useful as it may help speed up your virtual machines.  To learn more about Host Caches, check out the official VMware documentation, and this great post by Duncan Epping at Yellow-Bricks.

Duncan’s Blog also gives the instructions for enabling the host cache, but I’ll give them here too, with screen shots of my system.

  1. Select your host (if you have more than one, you will need to do this on each one in turn),
  2. Select the Configuration tab along the top of the main section,
  3. Down the left hand menu, near the bottom, select Host Cache Configuration,
  4. You should see only one drive listed in the SSD Datastores list.  Notice my free space says 19.60GB,

HostCache-2

  1. Right click on the drive, and select Properties,
  2. In the next window, tick the box labeled “Allocate space for host cache“, and select the top radio button “Use maximum available space (19 GB)“.  Click OK when done.

HostCache-3

  1. The ESXi host will then create the host cache files required.  They are all 1Gb files, so in my case 19 of them will be created.  Once done, the host cache space and free space columns will change to show the correct values…

HostCache-4

If you then browse to the local datastore, you will see that there are indeed several files, all 1Gb in size…

HostCache-5

 

 

There will be more configuration settings coming soon.!

Synology Diskstation

Introduction

My home lab relies on having a fast reliable iSCSI storage for both the virtual machines disk and the ISO images that are used to build the VMs.  This storage is being housed in a Synology Diskstation DS1813+ NAS box.

 

For the iSCSI storage, I am using four old 1.5Tb Seagate spinning disks, all of which have a few bad sectors.  Ideally, I would replace them with solid state ones, and I may do at some point.  The speed increase would be a great boost for my VMs.

 

Disk Station Manager (DSM)

DiskStation Manager (DSM) is an intuitive web-based operating system found on every Synology NAS. It’s been designed to help you manage your data: documents, photos, music, videos and all other important forms of digital assets. With DiskStation Manager, it’s more than just storing data. DSM offers a various range of applications and services to bring more entertainment to your home life as well as better productivity at work.

Taken from https://www.synology.com/en-uk/dsm/5.1/features

 

Packages

Not only are the Synology NAS boxes very good at being storage devices, supporting a wide range of features, including iSCSI, IEEE 802.3ad and VAAI, They also have a large array of packages that can be used outside of a Home Lab. (not all models support all features)

 

There are currently (at time of writing) over 70 packages that can be installed and used on almost every Synology device.  These packages include…

  • Audio Station – allows you to access the music library on your Synology DiskStation,
  • Cloud Station – allows you to easily sync files between your Synology products, computers, and mobile devices,
  • Photo Station – an online photo album integrated with a blog for you to easily share photos and videos,
  • Surveillance Station – a web-based application that can manage IP cameras to safeguard your home or office environment,
  • Video Station – an ideal video organizer of your collection of movies, TV shows, home videos, and TV recordings, allowing you to watch videos on your computer and other devices.

Check out the full list of packages, some of which I am sure you will find useful.

 

Online Demo

If you are still not sure you want a Synology NAS, they have an online demo of their DSM, ready for anyone to login and use.  Go to the following page and login with the credentials below…

Demo Site : https://demo.synology.com:5001
Username : admin
Password : synology

Take your time, have a play and see what you think.

It would be silly of me to try and list everything that the Synology devices can do, it’s just so much.  Instead, I would redirect you to the Synology site where their marketing people can convince you buy one.

PRTG Network Monitor

Paessler PRTG Network MonitorIntroduction

If you want to monitor your home lab, and the devices connected to it, printers, switches, routers, etc, you can’t go wrong with the monitoring solution from Paessler, called PRTG Network Monitor.

 

Monitoring

The PRTG software has a few licencing levels, one of which is a free 3o sensor licence.  Not a free time limited demo, a free forever licence.

30 sensors might sound like a small amount when you find out what a sesnor is…

The licensing options are based on the number of sensors (not on the number of devices or IPs). We define one (1) sensor as any particular, individual monitoring entity. One sensor monitors one network service, one URL, one network connection, one port of a switch, one NetFlow export stream, one CPU load, one disk drive, etc. Please have a look at the list of supported sensor types. Monitoring one item from this list counts as one sensor.

Taken From http://www.paessler.com/support/faqs#e1913

…however, I find that 30 is enough for what I want to monitor on my network.  There are some sensors that “bundle” more that one metric into them.  I could use more if I had them though  🙂

Network Port Monitoring

For example: monitoring a single network port counts as one sensor, but that port could return several metrics.  The HP switch I use returns the following information: Downtime, Transmitted, Packets, Broadcast Packets, Multicast Packets, CRC Errors, Undersize Packets, Oversize Packets, Fragments, Jabbers, Collisions, Packets <= 64 Byte, Packets 65 – 127 Bytes, Packets 128 – 255 Bytes, Packets 256 – 511 Bytes, Packets 512 – 1023 Bytes, Packets 1024 – 1518 Bytes, Drop Events.

That’s a lot of information from one sensor, but expected for a network port.

ESX Performance Monitoring

Another type of “bundled” sensor is the ESX Performance Monitoring one.  This gives much more useful and varied information: CPU usage, Datastore total ReadLatency, Datastore total WriteLatency, Disk read, Disk usage, Disk write, disk.deviceLatency, disk.kernelLatency, Downtime, Memory active, Memory consumed, Memory consumed, Memory swap used, Network received, Network transmitted, Network usage, Power

This is a varied collection of useful information, all collected in one sensor.  It covers the four main metrics: CPU, Memory, Disk, Network.  All of these metrics are available in graph form too, so you can see the history of this information over various time periods, from as little as the last two hours, up to a year ago.

You don’t even need to see all these metrics either.  If you are not interested in the “Power” metric for example, a few clicks later and it’s gone from all your graphs.  The data is still being collected, just not shown to you.

 

My Home Network Monitoring

I use it on my home network to monitor and graph the throughput of my internet router, my wireless router, and my Synology Diskstation 1813+ NAS.  I also have monitors for my three NUC ESXi hosts.

With all the data, this tool collects, you might think it’s hard to find what you are looking for, or just want a way of displaying the data to make it easier to look at.  For this, PRTG has Network Maps.  Below is my network map for my home network…

PRTGNetworkMap

The data shown in the graphs are updated every 30 seconds or so (depending on your settings).  You can see that one of my ESXi hosts is offline at the moment, and that some of my critical virtual machines are listed.

The network map layout can be in almost any layout you can think of.  It doesn’t have to be as pretty as mine.

 

Intel NUC As A ESXi Host (part 8)

Introduction

We are all done, ESXi has been installed and is ready for you to create as many virtual machines as the little NUC powerhouse can handle.

 

Table Of Contents

This will be a multi-part post, as it covers a lot of topics…

  1. NUC Specs, and build information,
  2. Building a custom ESX image that includes drivers for the NUC’s network card and SSD,
  3. DHCP, PXE booting and automatic installation scripts,
  4. Synology configuration for VMware datastores,
  5. Networking, VLANs and getting it to work,
  6. Installing ESXi
  7. Any other configuration,
  8. Final (random) thoughts.

 

Final (random) thoughts

If you have more than one NUC, and want to setup a vCenter server to learn about clustering, I suggest you follow the amazing blog series by Derek Seaman here.  It has a huge amount of information on installing every single aspect of vCenter in such depth that even novices can follow.

 

If you are into scripting, and want to learn how to script your way around ESXi and vCenter, check out William Lam’s excellent blog.

Intel NUC As A ESXi Host (part 6)

Introduction

We are almost done, and now ready to finally install ESXi on our NUCs

 

Table Of Contents

This will be a multi-part post, as it covers a lot of topics…

  1. NUC Specs, and build information,
  2. Building a custom ESX image that includes drivers for the NUC’s network card and SSD,
  3. DHCP, PXE booting and automatic installation scripts,
  4. Synology configuration for VMware datastores,
  5. Networking, VLANs and getting it to work,
  6. Installing ESXi,
  7. Any other configuration,
  8. Final (random) thoughts.

 

ESXi Installation

Now that you have everything setup:

  • NUCs built,
  • DHCP ready,
  • TFTP and web server configured,
  • iSCSI targets provisioned,
  • Automatic installation script tweaked,

…you are ready to turn on your NUCs

This should be the easy bit, just power on your NUCs, and let the technology do the hard work.  It should boot up and immediately look for a DHCP address and server to boot from.

esx-install-1

 After a quick menu option, the installer will take over.  Don’t press anything – it’s all automatic remember  🙂

esx-install-2

 The installer will take about 10-20 minutes, depending on the model of NUC, network speeds, angle of the sun…

esx-install-3

 The installer will then change screens and start processing it’s various modules.  Below it’s loading the e1000 network driver.

esx-install-4

After loading all it’s modules, it will then run though part of the automatic script we created.

Various text messages will appear, including…

  • Preliminary checks,
  • Partitioning disk for ESXi,
  • Writing syslinux bootloader,
  • Writing binary to boot partition,
  • Writing GUIDs to the bootbanks,
  • Caching the required files for ESXi,
  • Configuring network settings,
  • Writing the first-boot scripts.

Once complete, the following reboot message will appear.  It will automatically reboot in about 10 seconds or so…

esx-install-5

ESXi will then load up and run the rest of the configuration script, rebooting again at the end…

esx-install-6

After the reboot, it will load all its modules.  Mine pauses for a while when loading the software iSCSI adapter.  This is because it will scan the adapter bus looking for available storage.  Once done though, you will be presented with a screen similar to below.  ESXi is now ready to be used…

esx-install-7

 

vSphere Client

Now that ESXi has been successfully installed, we can finish any other configuration that needs to be done.  If you don’t have the vSphere client installed, you can get it from your newly installed ESXi host.

Open your favourite web browser and go to the IP address (or host name) you gave your host.

esx-getting-started

Click the link middle-left to Download vSphere Client, and install it.  Once installed, open it and connect to your new host.  When the certificate warning appears, tick the checkbox, and click Ignore.

Congratulations, you have your first (or another) ESXi host.!

Intel NUC As A ESXi Host (part 5)

Introduction

Networking is an essential part of setting up your homelab.  Unfortunately, the NUCs only have one network card.  We can get around this limitation though with the use of VLANs.

 

Table Of Contents

This will be a multi-part post, as it covers a lot of topics…

  1. NUC Specs, and build information,
  2. Building a custom ESX image that includes drivers for the NUC’s network card and SSD,
  3. DHCP, PXE booting and automatic installation scripts,
  4. Synology configuration for VMware datastores,
  5. Networking, VLANs and getting it to work,
  6. Installing ESXi
  7. Any other configuration,
  8. Final (random) thoughts.

 

Networking and VLANs

With the NUCs only having one network card, things can get a little tricky, especially since I wanted separate live and private networks.  However, it can be done, and it works well enough for me and in a home lab environment.  One network card should never be used in a production environment.

My automatic configuration script creates the networks for me, however the basic layout is as below…

VMware Networking

My Private network is using the VLAN 42, my Live network has no VLAN.  The Management Network is on the IP address we gave to the NUC earlier in Part 3.  Check out the configuration script if you want your own settings.

Intel NUC As A ESXi Host (part 4)

Introduction

My home lab uses a Synology Diskstation DS1813+ for its iSCSI storage.  It’s used for both the virtual machine storage and any ISO files that I need for the VMs.

 

Table Of Contents

This will be a multi-part post, as it covers a lot of topics…

  1. NUC Specs, and build information,
  2. Building a custom ESX image that includes drivers for the NUC’s network card and SSD,
  3. DHCP, PXE booting and automatic installation scripts,
  4. Synology configuration for VMware datastores,
  5. Networking, VLANs and getting it to work,
  6. Installing ESXi
  7. Any other configuration,
  8. Final (random) thoughts.

 

Synology Configuration

Within the Synology DSM, open Storage Manager, and select iSCSI LUN. Click Create and follow the wizard to create a new LUN and iSCSI Target for your VMware datastore.

Syno-iSCSI-1   Syno-iSCSI-2   Syno-iSCSI-3   Syno-iSCSI-4

 I have two LUNs and Targerts configured…

  • Data – 2Tb for all the virtual machines,
  • ISOs – 690Gb for any ISO images

 storage

 

 

 

Intel NUC As A ESXi Host (part 3)

Introduction

In this part, we’ll look at the settings need to get your NUCs to automatically install and configure.

 

Table Of Contents

This will be a multi-part post, as it covers a lot of topics…

  1. NUC Specs, and build information,
  2. Building a custom ESX image that includes drivers for the NUC’s network card and SSD,
  3. DHCP, PXE booting and automatic installation scripts,
  4. Synology configuration for VMware datastores,
  5. Networking, VLANs and getting it to work,
  6. Installing ESXi
  7. Any other configuration,
  8. Final (random) thoughts.

 

Requirements

You will need a server that can handle TFTP and Web requests.  Since I am using a Synology Diskstation for my iSCSI storage needs, this can also handle both TFTP and Web.  If you don’t have a TFTP server, you can use the free TFTP tool from SolarWinds.

 

DHCP Settings

In order for PXE booting to work, you need to create an entry in your DHCP server for the NUCs, and make sure the PXE settings are correct.  I already have a Windows 2008 R2 server running DHCP for my home network, so these steps will reflect this.  Most home routers should allow you to add the two required setings.

In your DHCP Scope Options window, add the following two options…

  • Option 66 : Boot Server Host Name – Add the name of IP of your TFTP server
  • Option 67 : Bootfile Name – enter “pxelinux.0

While you are in your DHCP settings, add an IP reservation for your NUCs.  This will help with the auto configuration later.  To do this, you will need IP addresses that is not being used, and should ideally be outside your DHCP Scope.  You will also need the MAC addresses from the bottom of your NUCs.

You will also need to give your NUCs a name.  I have gone for the simple route of calling them ESX1, ESX2 and ESX3.

 

TFTP Server / PXE Booting

Now that your have your DHCP setup, we can extract the files from the ISO image we created in Part 2.   Extract them to a know location, and setup your TFTP server to point to these files.

Once extracted, you should have two folders called efi and upgrade.  There should also be about 90 files in the root.   Create a new folder called pxelinux.cfg and create a plain text file called default (no file extension)

Copy and paste the following into the default file…

DEFAULT menu.c32
MENU TITLE ESXi-5.5 Boot Menu
NOHALT 1
PROMPT 0
TIMEOUT 20
LABEL install
KERNEL mboot.c32
APPEND -c boot.cfg
APPEND ks=http://[enter-web-server-here]/esx-auto-build.cfg
MENU LABEL ESXi-5.5 ^Installer
LABEL hddboot
LOCALBOOT 0x80
MENU LABEL ^Boot from local disk

Make sure you enter the name or IP address of your web server in the correct place.  Don’t change anything else, unless you really have to.

The last remaining file is called pxelinux.0.  To be honest, I can’t remember where I got this from, but it’s required and important.  To download file file, unzip it and copy it to the same TFTP folder as the ISO files.

 

Automatic Installation Script

The installation script is a large file that automates the configuration of ESXi once it has been installed.  I have separated this script out to another blog post as it would make this page very long indeed.

Intel NUC As A ESXi Host (part 2)

Introduction

This is part two is the continuing saga of my home lab build.

 

Table Of Contents

This will be a multi-part post, as it covers a lot of topics…

  1. NUC Specs, and build information,
  2. Building a custom ESX image that includes drivers for the NUC’s network card and SSD,
  3. DHCP, PXE booting and automatic installation scripts,
  4. Synology configuration for VMware datastores,
  5. Networking, VLANs and getting it to work,
  6. Installing ESXi
  7. Any other configuration,
  8. Final (random) thoughts.

 

Building A Custom ESXi Installation Image

This is actually the easy part.  I use the fantastic ESXi-Customizer-PS PowerShell script from Andreas Peetz at the v-front blog.  This script does all the hard work of downloading the latest version of ESXi and saving it as a ZIP file.  You can then run the script again to convert the ZIP file into an ISO and inject the required drivers.

Before you start, make sure you have installed the latest version of the VMware PowerCLI software on a Windows XP or better PC, and have downloaded Andreas script.

Steps Required

  1. Open the VMware vSphere PowerCLI window (there should be an icon on your desktop),
  2. Change to the folder you copied ESXi-Customizer-PS.ps1 script,
  3. Run the following command…
.\ESXi-Customizer-PS.ps1 -v55 -ozip

ESXi-Customizer-PS-1

  1.  When complete, run this command…
.\ESXi-Customizer-PS.ps1 -vft -load sata-xahci,net-e1000e -izip [filename-downloaded-above]

ESXi-Customizer-PS-2

  1.  When complete, you will have a single ISO image and the downloaded ZIP file, called something like this…

ESXi-Customizer-PS-3

This process will take a few minutes, depending on the speed of your internet link and the computer you are running this on.  The ISO should contain the two drivers required for the NUCs, and will be ready to go to install on your NUCs

 

There are a few ways to install ESXi on to your NUCs, the way I do it is to use PXE booting.  This allows me to plug in a new NUC and switch it on.  Almost everything else is automated.

Intel NUC As A ESXi Host (part 1)

Introduction

D54250WYKWhen deciding on my home lab, I wanted something small, quiet and powerful.  Fortunately, the Intel NUC fits that bill for me.  It’s not a perfect option, as they only have one network port and are limited to 16Gb RAM.

The configuration I am using here may not be the best, it may not even be right for you – but it works for me and I am happy with it.  If you like to add your thoughts or comments, please do.

 

Table Of Contents

This will be a multi-part post, as it covers a lot of topics…

  1. NUC Specs, and build information,
  2. Building a custom ESX image that includes drivers for the NUC’s network card and SSD,
  3. DHCP, PXE booting and automatic installation scripts,
  4. Synology configuration for VMware datastores,
  5. Networking, VLANs and getting it to work,
  6. Installing ESXi
  7. Any other configuration,
  8. Final (random) thoughts.

 

NUC Specs

The following list shows the components I have for each of my three NUCs…

  • Intel Wilson Canyon NUC D54250WYK – Link
  • Crucial 8GB DDR3 PC12800-1600MHz SoDimm
  • Intel 30GB 525 Series SATA 6GB/s 25nm mSATA SSD

 

The install of VMware ESXi doesn’t take up much space, so a 30Gb SSD is fine for my needs.  If you want to install Windows or Linux on it at a later date, you might want to invest in a larger drive.  Some models of NUC are built to hold a 2.5inch drive at the bottom, so this may be another option for you.

 

Since the NUC will take a maximum of 16Gb of RAM, we might as well take it all.  Male sure you use the correct RAM for the model you are buying.  For the one I am using, the RAM has to be the 1.35 volts type.

 

Once your NUC is built, we need to create an installation image to put on it.

Don’t forget however, make sure you download and install the very latest BIOS update for your particular NUC model.  For the three NUCs I have, the download page is here.