Manually Create VMWare vSphere ESXi Datastore Partition 🌱

  1. Log into the ESXi web UI
  2. Enable the SSH service if it is not already enabled by selecting Actions > Services > Enable Secure Shell (SSH)
  3. Connect to the ESXi host via SSH
  4. Run the following commands
    # list connected disks
    ls /dev/disks/
    # using one of the partition ids from the above output
    # list the partition table
    partedUtil getptbl /dev/disks/<%partition id%>
    # add the new partition to the partition table
    partedUtil add /dev/disks/<%partition id%> gpt "<%partition number%> <%starting sector%> <%ending sector%> AA31E02A400F11DB9590000C2911D1B8 0"
    # create vmfs volume
    vmkfstools -C vmfs6 -S <%custom label%> /dev/disks/<%partition id%>:<%partition number%>
  5. Back in the ESXi web UI, select Storage from the left navigation menu
  6. The new Datastore should be listed and available for use