Sunday, May 13, 2018

vSphere: Unable to add Datastore error

This is a short blog post regarding an issue I faced in VMware ESXi 6.0. I installed the ESXi after creating array from the array controller settings but local datastore was not present. When trying to add the datastore, an error was thrown: 

Call "HostDatastoreSystem.QueryVmfsDatastoreCreateOptions" for object "ha-datastore ...."

After quickly googling the issue, I found out the issue was caused due to existing information on the disk that had been previously used. Even after creating new array this information was not deleted and the vSphere was unable to understand it. So, the datastore was not allowed to be created. 

So to delete the partition and extra data present, I could connect through SSH to the host and use partedUtil utility for this purpose. So, first I enable SSH from the host Configuration tab and Security Profile settings under Software.  




We login to the host and go to the following location and list the partitions.

 [root@localhost:~] cd /vmfs/devices/disks  
 [root@localhost:/dev/disks] pwd  
 /vmfs/devices/disks  

 [root@localhost:/dev/disks] ls  
 naa.600508b1001c17376aeda14dd3174f90  
 naa.600508b1001c17376aeda14dd3174f90:1  
 naa.600508b1001c17376aeda14dd3174f90:2  
 naa.600508b1001c17376aeda14dd3174f90:3  
 vml.0200010000600508b1001c17376aeda14dd3174f904c4f47494341  
 vml.0200010000600508b1001c17376aeda14dd3174f904c4f47494341:1  
 vml.0200010000600508b1001c17376aeda14dd3174f904c4f47494341:2  
 vml.0200010000600508b1001c17376aeda14dd3174f904c4f47494341:3  

We need to change label as msdos.

 [root@localhost:/dev/disks] partedUtil mklabel "/vmfs/devices/disks/naa.600508b1001c17376aeda14dd3174f90" msdos  

Now, we can add the datastore normally and no errors will be thrown. And do not forget to disable SSH after completing your job !

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.