Sunday, September 13, 2015

Mini VMware vSphere 6 Homelab on VSAN with Shuttle DS81

Finally I have a homelab to support my study on VCAP-DCA and my job. My current work often requiring me to test a complex upgrade or a complex setup. VMware Hands-on Lab and VMware Product Walkthrough are great to learn how to configure specific features. But not all products and features available and the lab does not provide walkthrough from scratch - for example installing ESXi host, vCenter Server, etc.

It was not easy for me because I need to submit and present to my CFO - my wife, WAF (Wife Acceptance Factor) is one of the design factors that need to be considered plus there are also some technical constraints. I can only submit a Purchase Order after the BoQ has been approved by CFO.
- Total budget is $2,000USD
- Low watt. Apartment's maximum watt is 1,300W, there are fridge, aircons, TV, lights, etc. We are looking at lab that draws up to 200W max 300W.
- Compact and small form factor. Apartment's size is only 33m2, there is not much free space left.

Looking at above lists, I was not sure if I can get a homelab that can meet above requirements and constraints so I look for a cloud that can provide a lab with bunch of VMs with nested ESXi. I found ravello systems but I'm not sure if I can rely online labs and still prefer physical labs.
I was visiting Jason Langer's blog and read his post on replacing homelab with ravello systems.
I'm interested in the Physical Design lab on Micro-ATX w/ Lian-Li Case and Intel NUC. The Micro-ATX based lab can provide 32GB RAM per host, but the power supply is 400W. So I need to go with Intel NUC w/ 16GB RAM.

I was planning to get a small 4-bays storage for SOHO/SMB like Synology DS415+ but it is quite expensive.  Alternative for 4-bays in Synology w/ lowest price is DS414slim. But again still quite expensive and I'm not sure if the total budget is sufficient. So I decided to go with VMware VSAN.

To build a VSAN with NUC, I will need NUC that support multiple disks (1 SSD and 1 HDD). Apparently there are a lot of model for NUCs and I wanted something that can run vSphere 6. Florian Grehl's has an article on ESXi 6.0 Image that works with NUC. Most of local electronic/IT shops here sell the complete set NUC and in the end the memory & disks will be useless since I will replace it to 16GB RAM and at least 120GB SSD + 1TB HDD. NUC with Intel vPro is cool because it provides a KVM Remote Control. I agree with Mike Tabor as he pointed on his article Intel NUC i5 5th Generation an ESXi lab improvement, the best suite would be NUC5i5MYHE - 5th Gen Processor, 2 internal disks, and Intel vPro. So I contacted a local Intel's distributor to ask for a BoQ on NUC5i5MYHE / D54250WYKH2 / NUC5i5RYH, they only sell Intel stuff so I need to buy memory, disks, etc from different shops and build my own. The total cost is above $2K and it is quite troublesome to purchase from different shops, one of the risk the warranty and support are separate and there could be compatibility issue if I'm not picking up the correct brand and model.

I was looking for alternatives for Intel NUC and Shuttle DS81 looks promising.
 
Below are some links that has Shuttle DS81 for homelabs
Ultrasmall computers for your VMware lab - Intel NUC and Shuttle DS81 preview: https://www.youtube.com/watch?v=ullzf3TqhoE
The Perfect vSphere 6 Home Lab | Ryan Birk – Virtual Insanity:
http://www.ryanbirk.com/the-perfect-vsphere-6-home-lab/
Build a new home lab VMGuru: https://www.vmguru.com/2015/02/build-new-home-lab/
Building a ESXi 5.5 Server with the Shuttle DS81: https://globalconfig.net/building-esxi-5-5-server-shuttle-ds81/

It can runs vSphere 6 only need to inject Realtek 8111G VIB drivers to ESXi 6 image with PowerCLI 6 or using v-Front ESXi-Customizer by Andreas Peetz. The drivers can be found from one of the above links on Shuttle DS81 for homelabs. Although it is slightly bigger than Intel NUC, the advantages of Shuttle DS81 are it comes with a dual-NIC GigabitEthernet and processor speed is higher than the NUCs. I decided to order 3xShuttle DS81 from local distributor with the following hardware specifications:
Intel® Core™ i3-4170 Processor (3M Cache, 3.70 GHz)
Kingston 8GB 1600MHz DDR3 (PC3-12800) SODIMM Memory
Samsung 850 EVO 120 GB mSATA 2-Inch SSD
HGST Travelstar 7K1000 2.5-Inch 1TB 7200 RPM SATA III 32MB Cache Internal Hard Drive SanDisk 16GB Class 4 SDHC Memory Card

For the switch, I start with TP-Link 8-Port Gigabit Easy Smart Switch TL-SG108E first. It support VLANs, IGMP Snooping, Link Aggregation, and its low watt. I also buy a small UPS/AVR CyberPower BU600E. I use an energy/watt meter to validate all of the above configurations as the CFO would very much like to validate herself. For all 3 nodes Shuttle DS81 + 8-Port GbE TP-Link switch + UPS, it turns out that the total wattage are only between ~65W up to 160W :)

To install ESXi 6 on USB/SD Card, we can install it to USB/SD as a destination directly (with Workstation/Fusion) or have it as a source installer. You can read the details in Vladan's post here. To  create ESXi 6 bootable ISO along with automatically using a static IP Address when the custom ISO first boots up, we can use a ks.cfg, read more about it in William Lam's post here or you can also create kickstart for VSAN. I'm using SD card for the ESXi boot ISO but unfortunately VMware Fusion cannot detect Mac's Internal SD card reader. So I will need to create an ESXi installer on USB. Then install to SD card using USB. After the ESXi hosts are ready, I cannot install vCenter because there is no VMFS Datastore and we need a vCenter Server to configure a VSAN. There's an article on how to bootstrap a VCSA to a single VSAN node. Since I'm using Mac, I cannot use the Client Integration Plug-In to deploy VCSA and need to use the vcsa-cli-installer. To install using vcsa-cli, read Romain Decker's article here.

At the moment, I only install VCSA 6.0u1 with Windows 2003 as AD, DNS, DHCP. I used Win 2003 because of it small size and hardware specification/requirements. With 3 nodes of 120 GB SSD & 1TB HDD I get 2.7TB VSAN datastore in total as below screenshot.

I'm planning to continue to install NSX 6.2 by following Thomas Beaumont's blog post here.

Friday, March 20, 2015

NSX Host Preparation Not Ready

ShortURL to this blog post: http://vexpert.me/nsxhostpreptshoot

One of the steps required to install NSX-v is preparing clusters or hosts for NSX which will install three new VIBs to ESXi hosts (in the Kernel space) and the process will be done per cluster not per host.
The steps are quite straight forward, after you have your NSX Manager registered to your vCenter Server and get your NSX Controllers deployed, you just need to go to Host Preparation Tab > choose your desired cluster > hit Install


More about preparing clusters for NSX can be found from below links:
Getting Started Guide for NSX vSphere
NSX will send a request to EAM to calls vCenter Server to install the three VIBs.
ESXi downtime or reboot is not required for this but Upgrade or Uninstall requires a reboot, if you have DRS and vMotion networking setup, it will automatically set some of your hosts to maintenance and reboot it so there will be no downtime to your workload VMs.
Upon successful installation, the Installation Status column will display the NSX version and Firewall column Enabled.
But if not successful, the Installation Status column will display a red warning icon says Not Ready and Resolve.
Try clicking the resolve button to repush NSX request to install the VIBs, if nothing changed and still saying Not Ready you might need to check your setup and also check some logs.
Below are 2 log files that you can check:
  1. /var/log/esxupdate.log in ESXi host
  2. eam.log in vCenter Server. ProgramData/VMware/VMware VirtualCenter/Logs/ for Windows vCenter or /storage/log/vmware/vpx/eam.log for Linux vCenter
Below are the most common issues:
  1. DNS configuration on your vCenter Server, ESXi host, NSX Manager, and DNS forward + reverse records on your DNS servers
  2. Time Sync on ESXi Hosts and NSX Managers, use NTP server whenever possible
  3. TCP ports, check if any of required firewall ports are blocked. See the NSX Hardening Guide to check all required ports for NSX
  4. Verify if vCenter Server Managed IP is set and correct. See KB 1008030 on how to check this.
  5. Update Manager service is stopped or having issues if you have VUM installed. 
If you have error log under eam.log similar to below, you might have some issues on your Update Manager or connection to your Update Manager
“com.vmware.vim.vmomi.client.exception.ConnectionException: org.apache.http.conn.HttpHostConnectException: Connection to https://<vCenter_Server_Hostname>:8084 refused”
A workaround for this is to temporarily bypass VUM so EAM can continue to install the VIB. The steps are similar to KB 2053782 but instead of setting it to false, set it to true.

Below are the complete steps:
  1. Open a browser to the MOB at:
    https://vCenter_Server_IP/eam/mob/
  2. Log in with Administrator privileges.
  3. Select an agency from the agency list. This is usually agency-0. If not, select the appropriate agency.
  4. Click Config. This should be a URL where agency-0 is replaced by your local agency ID.
    For example:
    https://vCenter_Server_IP/eam/mob/?moid=agency-0&doPath=config
  5. Set the bypassVumEnabled flag to true:
  6. Using the agency ID identified in Step 3, change the browser URL:
    https://vCenter_Server_IP/eam/mob/?moid=agency-<0>&method=Update
  7. In the config field, change the value from false to true. Change the existing configuration options to match this:
    <config>
    <bypassVumEnabled>true</bypassVumEnabled>
    </config>

  8. Click Invoke Method and go back to the previous link to check if the value gets updated.
  9. Back to NSX Host Preparation Tab and click Resolve. You should be able to proceed with the VIBs installation now. Note: if you have multiple clusters, you would need to set the bypassVumEnabled flag to true per cluster since the agency-# will be created per cluster
Below are some related links that are helpful to understand NSX Host Preparation and help you further to troubleshoot:
 If you are still not able to resolve your issue, you can always contact VMware Support