How to Create VMFS Datastore on Vmware OS bootdrive
Normally a vmfs partition is already created by ESXi on the boot drive. You can verify by going logging into the ESX Web GUI and navigating to Storage --> Devices --> Boot disk (Figure 1).
Figure 1
Clicking on the drive will show the Partition diagram of the boot drive and the vmfs partition is usually partition 3. Make a note of the UUID of the device and the partition number (Figure 2).
Figure 2
Login to the ESXi SSH shell and run the following command:
esxcli storage nmp device list
This will output all the drives in your system similar to the output below:
t10.ATA_____HGST_HUS724040ALA640__________________________PN1334PEGU9TMX
Device Display Name: Local ATA Disk (t10.ATA_____HGST_HUS724040ALA640________ __________________PN1334PEGU9TMX)
Storage Array Type: VMW_SATP_LOCAL
Storage Array Type Device Config: SATP VMW_SATP_LOCAL does not support device configuration.
Path Selection Policy: VMW_PSP_FIXED
Path Selection Policy Device Config: {preferred=vmhba0:C0:T2:L0;current=vmhba 0:C0:T2:L0}
Path Selection Policy Device Custom Config:
Working Paths: vmhba0:C0:T2:L0
Is USB: false
t10.ATA_____HGST_HUS724040ALA640__________________________PN2331PAKJD02T
Device Display Name: Local ATA Disk (t10.ATA_____HGST_HUS724040ALA640________ __________________PN2331PAKJD02T)
Storage Array Type: VMW_SATP_LOCAL
Storage Array Type Device Config: SATP VMW_SATP_LOCAL does not support device configuration.
Path Selection Policy: VMW_PSP_FIXED
Path Selection Policy Device Config: {preferred=vmhba0:C0:T1:L0;current=vmhba 0:C0:T1:L0}
Path Selection Policy Device Custom Config:
Working Paths: vmhba0:C0:T1:L0
Is USB: false
t10.ATA_____HGST_HUS726T4TALA6L1____________________V6JEEXLS____________
Device Display Name: Local ATA Disk (t10.ATA_____HGST_HUS726T4TALA6L1________ ____________V6JEEXLS____________)
Storage Array Type: VMW_SATP_LOCAL
Storage Array Type Device Config: SATP VMW_SATP_LOCAL does not support device configuration.
Path Selection Policy: VMW_PSP_FIXED
Path Selection Policy Device Config: {preferred=vmhba0:C0:T3:L0;current=vmhba 0:C0:T3:L0}
Path Selection Policy Device Custom Config:
Working Paths: vmhba0:C0:T3:L0
Is USB: false
t10.ATA_____HGST_HUS724040ALA640__________________________PN1334PCGY2DLS
Device Display Name: Local ATA Disk (t10.ATA_____HGST_HUS724040ALA640________ __________________PN1334PCGY2DLS)
Storage Array Type: VMW_SATP_LOCAL
Storage Array Type Device Config: SATP VMW_SATP_LOCAL does not support device configuration.
Path Selection Policy: VMW_PSP_FIXED
Path Selection Policy Device Config: {preferred=vmhba0:C0:T0:L0;current=vmhba 0:C0:T0:L0}
Path Selection Policy Device Custom Config:
Working Paths: vmhba0:C0:T0:L0
Is USB: false
t10.NVMe____WDC_CL_SN720_SDAQNTW2D512G2D2000__________E50F1F444A441B00
Device Display Name: Local NVMe Disk (t10.NVMe____WDC_CL_SN720_SDAQNTW2D512G2 D2000__________E50F1F444A441B00)
Storage Array Type: VMW_SATP_LOCAL
Storage Array Type Device Config: SATP VMW_SATP_LOCAL does not support device configuration.
Path Selection Policy: VMW_PSP_FIXED
Path Selection Policy Device Config: {preferred=vmhba1:C0:T0:L0;current=vmhba 1:C0:T0:L0}
Path Selection Policy Device Custom Config:
Working Paths: vmhba1:C0:T0:L0
Is USB: false
Create a vmfs datastore named datastore-ssd on the partition 3 of the boot device using the commndUUID and the partition number you noted above using the command below (Don'tDevice useformat theis values/vmfs/devices/disks/ below)vm1.<UUID>:3):
vmkfstools --createfs vmfs6 -S datastore-ssd /vmfs/devices/disks/vml.0100000000453530465f314634345f344134345f314230300057444320434c:3
If successful, you should get an output similar to below:
create fs deviceName:'/vmfs/devices/disks/vml.0100000000453530465f314634345f344134345f314230300057444320434c:3', fsShortName:'vmfs6', fsName:'datastore-ssd'
deviceFullPath:/dev/disks/t10.NVMe____WDC_CL_SN720_SDAQNTW2D512G2D2000__________E50F1F444A441B00:3 deviceFile:t10.NVMe____WDC_CL_SN720_SDAQNTW2D512G2D2000__________E50F1F444A441B00:3
ATS on device /dev/disks/t10.NVMe____WDC_CL_SN720_SDAQNTW2D512G2D2000__________E50F1F444A441B00:3: not supported
.
Checking if remote hosts are using this device as a valid file system. This may take a few seconds...
Scanning for VMFS-6 host activity (4096 bytes/HB, 1024 HBs).
Creating vmfs6 file system on "t10.NVMe____WDC_CL_SN720_SDAQNTW2D512G2D2000__________E50F1F444A441B00:3" with blockSize 1048576, unmapGranularity 1048576, unmapPriority default and volume label "datastore-ssd".
Successfully created new volume: 5fc102ac-257939bc-7e5b-0cc47ac8166c
Additionally, the datastore you created should appear under Storage --> Datastores in your ESXi Web Gui (Figure 3).
Figure 3