ESXi adding datastore Error Stack Call “HostDatastoreSystem.QueryVmfsDatastoreCreateOptions”

Most of the datacenter has given the hosts which already used and properly not cleaned to the new customers. Please note this whenever you are going to dismantle any storage, make sure you properly cleaned before given to server providers. The following error we received while we create a datastore for the new ESXi host in vSphere client.

Error:Cannot change the host configuration. Error Stack Call “HostDatastoreSystem.QueryVmfsDatastoreCreateOptions” for object “ha-datastoresystem”

There are various situations which might lead to pre-existing info on the disk. It was an issue with pre-existing or incompatible information on the hard disks. when you try to re-purpose existing storage devices is ensuring that all data and existing partitions have been completely removed.

ESXi adding datastore errors

ESXi adding datastore Error

This issue has resolved in ESXi using partedUtil tool, you need to run the following command for each disk that you’re having issues.

NOTE: This will ERASE ALL DATA on the disk in question so be careful to select the right disks!

List all the existing devices

[root@localhost:~] /usr/lib/vmware/vm-support/bin/

To get each device information.

[root@localhost:~] esxcli storage core device smart get -d <device-id>

Run partedUtil command to fix Error:Cannot change the host configuration. Error Stack Call “HostDatastoreSystem.QueryVmfsDatastoreCreateOptions” for object “ha-datastoresystem”

[root@localhost:~] partedUtil mklabel /dev/disks/<disk id> msdos



[root@localhost:~] /usr/lib/vmware/vm-support/bin/
SMART Information for disks.

Device: t10.ATA_____WDC_WD1003FAYX2D01Y7B1________________________WD2DWCAE35326661
Parameter Value Threshold Worst
Health Status OK N/A N/A
Media Wearout Indicator N/A N/A N/A
Write Error Count N/A N/A N/A
Read Error Count 200 51 200
Power-on Hours 42 0 42
Power Cycle Count 100 0 100
Reallocated Sector Count 200 140 200
Raw Read Error Rate 200 51 200
Drive Temperature 114 0 107
Driver Rated Max Temperature N/A N/A N/A
Write Sectors TOT Count 200 0 200
Read Sectors TOT Count 200 0 200
Initial Bad Block Count N/A N/A N/A
[root@localhost:~] partedUtil mklabel /dev/disks/t10.ATA_____WDC_WD1003FAYX2D01Y7B1________________________WD2DWCAE35326661 msdos

You have done. Add new datastore via the vSphere Client or vCenter Storage -> Add Storage.

This is also can be done via the vSphere Web Client, vCenter has introduced in vSphere 6.0 Update 1 to help assist with this procedure.

You can find this new option (icon with disk and eraser) by clicking onto a specific ESXi host and then select the Manage->Storage Adapters and then be highlighting the specific storage device you wish to erase as seen in the screenshot below.

Before proceeding to erase any disk, review twice that is the correct disk.

Fix vCenter storage errors

vCenter storage errors

Once you have finished you can go back to the vSphere client and add the disks successfully, no reboots required.