VSAN ROBO home lab without Witness
Hello everyone!! In this blog can to use for create you own vsan home lab. For me this lab is one of the bests tools for my work. I use it for practically all, for example, install a vCenter Server, create scripts and demos, broke and recreate.What can I say?? This lab is very important and the better is I do it with just two Virtual ESXI.
So, what do we need for made it happens? First of all, i will describe my hardware.
I have for processor an Intel i7, 16GB of RAM and 512 SSD. For Software I use VMware Workstation 15.5 Pro. In there run two esxi host version 6.7.u3 one of this has 12GB of RAM and the second has 10GB RM, but both has 3 VMDKs 4GB(SO), 40(Cache) and 400(capacity).
And the magic I took from these two blogs.
First, Create the vmkernel of vSan. For that I use the web clients on each esxi host.
you know, the webclient access doesn´t allow enable vSAN option. So, you have to use
SSH access to set it that
Configuring the vmk1 for VSAN Services with this command.
esxcli vsan network ip add -i vmk1
Then set the vmk0 for witness services with this command
esxcli vsan network ip add -i vmk0 -T=witness
After made that configuration. We must create the cluster. Go to the ssh access of the first host, and run the next command
esxcli vsan cluster new.
And for check if that is ok, we have to run the command.
esxcli vsan cluster get
Excelent!! We go it!! Now, must join the second host, and for this we need the sub-cluster UUID, in this case is "5d1391a6-7118-e763-5894-000c29b3917a"
With the ssh access of the second host, put the command
Esxcli vsan cluster new -- For enable vSan Services
Esxcli vsan cluster leave - For leave the new cluster
esxcli vsan cluster join -u 5d1391a6-7118-e763-5894-000c29b3917a --- For this case
However you can check use the same command: "esxcli vsan cluster get". However, you can check the information about the cluster with both hosts.
In the next point, we going to claim the disks for each host.
First need to list all disk
esxcli vdq -q
So, we are going to identify the disk we will use, for cache and capacity, and use the next command for reclaiming
In my case I have SSD in my hardware, so my vsan cluster is all-flash. Then we got set a tag our capacity disk like flash, and this configuration do with this command
esxcli vsan storage tag add -t capacityFlash -d mpx.vmhba0:C0:T2:L0
Then we can claim the disk with the next command
esxcli vsan storage add -s mpx.vmhba0:C0:T1:L0 -d mpx.vmhba0:C0:T2:L0
After this we will back to the webclient to check the datastore was created
The datastore is ready, now for finish, we must set the polices for can create VMs
esxcli vsan policy setdefault -c cluster -p "((\"hostFailuresToTolerate\" i0) (\"forceProvisioning\" i1))"
esxcli vsan policy setdefault -c vdisk -p "((\"hostFailuresToTolerate\" i0) (\"forceProvisioning\" i1))"
esxcli vsan policy setdefault -c vmnamespace -p "((\"hostFailuresToTolerate\" i0) (\"forceProvisioning\" i1))"
esxcli vsan policy setdefault -c vmswap -p "((\"hostFailuresToTolerate\" i0) (\"forceProvisioning\" i1))"
esxcli vsan policy setdefault -c vmem -p "((\"hostFailuresToTolerate\" i0) (\"forceProvisioning\" i1))"
I hope this blog will help you and if you have something you want to tell me or recommend me, please let me know.