Fix datastore error “HostDatastoreSystem.Query VmfsDatastore CreateOptions” in ESXi

by | Jan 13, 2015 | ESXi

At home Lab I came across this error while adding a previously used Windows disk to ESXi. It appears half way while adding the disk via “Add Storage Wizard”. The error can be resolved by formatting the disk in DOS format using Parted utility inbuilt into Esxi. You need to SSH into the Esxi hosts for fixing.

First would need to list the faulty disk for ID so that it can be used while formatting. 

# fdisk -l (First to find culprit)

 (OR)

# /dev/disks/ (Press TAB) -- To find the Disk_id

Output:

***
*** The fdisk command is deprecated: fdisk does not handle GPT partitions.  Please use partedUtil
***
Found valid GPT with protective MBR; using GPT
Disk /dev/disks/mpx.vmhba32:C0:T0:L0: 31481856 sectors, 30.0M
Logical sector size: 512
Disk identifier (GUID): adff11cb-235c-470c-b834-f42c4a956911
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 31481822
Number  Start (sector)    End (sector)  Size       Code  Name
   1              64            8191        8128   0700
   5            8224          520191        499K   0700
   6          520224         1032191        499K   0700
   7         1032224         1257471        219K   0700
   8         1257504         1843199        571K   0700
Found valid GPT with protective MBR; using GPT
Disk /dev/disks/t10.ATA_____WDC_WD10EZEX2D08M2NA0_________________________WD2DWCC3F5328878: 1953525168 sectors, 1863M
Logical sector size: 512
Disk identifier (GUID): 00548aec-b27e-4e5c-bec8-ce333913c6b7
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1953525134
Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048      1953523711       1863M   0700
Found valid GPT with protective MBR; using GPT

NOTE: Before the next steps I WOULD STRONGLY RECOMMEND to BACKUP the data on the disk if its critical.

In my scenario it was the Western Digital Disk which was showing the error i.e. “WDC_WD10EZEX2D08M2NA0” from the above. You might get 2 instances of the disk,  format both of them

Run this command to format the above partition.

# partedUtil mklabel /dev/disks/t10.ATA_____WDC_WD10EZEX2D08M2NA0_______________________________WD2DWCC3F5328878____________:1 msdos
# partedUtil mklabel /dev/disks/t10.ATA_____WDC_WD10EZEX2D08M2NA0_______________________________WD2DWCC3F5328878____________ msdos

Now again try to add the disk via “Add Storage Wizard” and it should work.

If you encounter any errors during the process, let us know via Contact Us and will get it resolved promptly.

Related Articles….