To setup the NUC and install ESXi, follow part one of this guide. The following is the process to bootstrap loading the vCenter Server Appliance onto a vSAN datastore. This process was replaced in vCenter 6.7 which provides this capability natively through the installer. If you are deploying vCenter 6.7+, skip through to part three.
vSAN Configuration
To install vCenter you need the datastore in place, which for my environment is vSAN. However to configure vSAN, this is done through vCenter. A classic chicken and egg scenario which thankfully VMware have the solution for. You can bootstrap the vSAN datastore which William Lam has documented over at virtuallyghetto.com and my configuration steps are below. On the first host, enable SSH and SSH into the host. Modify the default vSAN policy to enable force provisioning.
1 2 |
esxcli vsan policy setdefault -c vdisk -p "((\"hostFailuresToTolerate\" i1) (\"forceProvisioning\" i1))" esxcli vsan policy setdefault -c vmnamespace -p "((\"hostFailuresToTolerate\" i1) (\"forceProvisioning\" i1))" |
Confirm the changes were made successfully by running the getdefault command below to confirm the vSAN policy
1 2 3 4 5 6 7 |
~ # esxcli vsan policy getdefault Policy Class Policy Value ------------ -------------------------------------------------------- cluster (("hostFailuresToTolerate" i1)) vdisk (("hostFailuresToTolerate" i1) ("forceProvisioning" i1)) vmnamespace (("hostFailuresToTolerate" i1) ("forceProvisioning" i1)) vmswap (("hostFailuresToTolerate" i1) ("forceProvisioning" i1)) |
Next step is to work out which disks will be used by the vSAN datastore. Run the below command to get the output
1 |
vdq -q |
Once you have found the 500GB capacity tier SSD and the 256GB cache tier SSD, record the device name ready to be used later. The value will be in brackets under Display Name. For my environment the values are below
1 2 3 4 5 |
500GB Capacity Tier Device Name t10.ATA_____Samsung_SSD_860_EVO_500GB_______________S3Z2NB0K329187Z_____ 256GB Cache Tier Device Name t10.NVMe____Samsung_SSD_960_EVO_250GB_______________4301B18154382500 |
Create a new vSAN cluster with the command below
1 |
esxcli vsan cluster new |
Confirm the new vSAN cluster has been created successfully
1 |
esxcli vsan cluster get |
Set the 500GB SSD as a capacity tier drive by running the following command and substituting the device name for your environment as recorded earlier
1 |
esxcli vsan storage tag add -d t10.ATA_____Samsung_SSD_860_EVO_500GB_______________S3Z2NB0K329187Z_____ -t capacityFlash |
Finally the vSAN all flash disk group is created with the below command to add the two SSDs into the cluster
1 |
esxcli vsan storage add -s t10.NVMe____Samsung_SSD_960_EVO_250GB_______________4301B18154382500 -d t10.ATA_____Samsung_SSD_860_EVO_500GB_______________S3Z2NB0K329187Z_____ |
To verify the vSAN cluster has been created and the disks have been added, run the below command and check the output
1 |
esxcli vsan storage list |
Part 3 of this guide will cover the initial vCenter Server Configuration and is available here.
Note: If you get stuck with vSAN and need to remove all of the partitions, run the commands below to format all of your data and start your homelab from scratch!
1 2 3 4 5 6 7 8 |
esxcli vsan cluster leave reboot vdq -q partedUtil delete /dev/disks/t10.ATA_____Samsung_SSD_850_EVO_500GB_______________S2RBNX1JC25558T_____ 1 partedUtil delete /dev/disks/t10.ATA_____Samsung_SSD_850_EVO_500GB_______________S2RBNX1JC25558T_____ 2 partedUtil delete /dev/disks/t10.NVMe____Samsung_SSD_960_EVO_250GB_______________4901B18154382500 1 partedUtil delete /dev/disks/t10.NVMe____Samsung_SSD_960_EVO_250GB_______________4901B18154382500 2 |
One comment