1 minute read

Nested ESXi’s are part of the gear that we all have around for labs/study purposes.

At this time stumbled in an error that was a bit a surprise, however in your troubleshooting process you end up checking logs and then going to your blogs of reference searching for answers.

And for me, virtuallyGhetto comes as one of the first places to look for answers for Nested Virtualization issues. Link to the original post How to run Nested ESXi on top of a VSAN datastore? from William Lam.

Back to the problem and solution.

Installing some ESXi 6.5 Nested Hypervisors that are running on top of a vSAN datastore, the installation process was bombing out complaining that it was unable to format the disks.

Nested Hypervisor VSAN problem

In summary, vSAN do not support SCSI-2 Reservations and since VMware internal development teams use heavily Nested Virtualization the vSAN team added a “workaround” to allow vSAN to fake SCSI Reservations. This workaround is enabled by setting up an advanced property in each ESXi part of the vSAN cluster:

esxcli system settings advanced set -o /VSAN/FakeSCSIReservations -i 1

Now that we have the answer and we have a couple of ESXi to setup this up, lets powershell it to make it quicker.

To check the current status:

get-cluster -Name "{cluster name}" | Get-VMHost | `
  Sort-Object Name | `
  Select-Object Name, `
    @{N="FakeSCSIResevations"; `
      E={$_ | Get-AdvancedSetting -Name "VSAN.FakeSCSIReservations"}} | `
  Format-Table -AutoSize

To set it up:

get-cluster -Name "{cluster name}" | Get-VMHost | `
  Get-AdvancedSetting -Name "VSAN.FakeSCSIReservations" | `
  Set-AdvancedSetting -Value 1