«

»

Aug 22 2010

Call fails for “HostDatastoreSystem.QueryVmfsDatastore- CreateOptions” for object “ha-datastoresystem”

Recently I had to reinstall an existing Dell PowerEdge 2970 server.
This server was running SUSE Linux Enterprise Server 10 SP2 (32bit) with Xen 3.2.0 as virtualization software (host), but I decided to put VMWare ESXi 4.1.0 on this box.

This server has a single Dell PERC 5/I RAID Controller, with six 72GB SAS disks attached to it.
I started by destroying the existing two RAID sets, and created 2 new RAID sets. One for the OS (RAID1) and the other for the datastore (RAID10).
After the RAID sets where intialized I started the installation of VMWare ESXi and the server was up-and-running in less than 20 minutes.

As part of the post installation configuration of the VMWare ESXi server I tried to add a second (local) datastore by using the Add Storage wizard in the vSphere Client.
In the Add Storage Wizard, I specified Disk/LUN as Storage Type and selected the available disk (the RAID10 set).

After pressing Next, the Add Storage Wizard returned the following error:

An error occured during host configuration.
Call “HostDatastoreSystem.QueryVmfsDatastoreCreateOptions” for object “ha-datastoresystem” on ESXi “192.168.1.61” failed.

 

On a side note, if you close this error message and go a step backwards and continue forward it wil not give an error anymore.
This is not a solution or workaround, because when the Wizard gets at the Formatting property sheet, it wil give the following error:

 

  

"De objectverwijzing is niet op een exemplaar van een object ingesteld" is dutch for "Object reference not set to an instance of an object"

I couldn’t find more detailed information about this error in the eventlog of the vSphere client, located in the directory: %USERPROFILE%\Local Settings\Application Data\VMware\vpx.
And a search on the Internet didn’t gave a answer either.

So I was forced to troubleshoot on my own.

I was certain that the volume was consistent , because I had performed a full initialization and integrity check when the RAID10 disk was created.

As shown in the second screenshot of this post, the Add Storage wizard indicated that the disk was blank. I further noticed that there was no Available space on this disk.
Normally speaking it would show how much space is available on the disk, so I assumed that there was something wrong with the partition table of this disk.
I couldn’t find an option in the vSphere client to remove the existing partition info on this volume.

So I logged on to the ESXi server by using a SSH connection and issued the command fdisk -l.
The following output was shown:

 

The disk /dev/disks/naa.6001e4f023eb110013ffed36d40990cb is the disk on which I tried to create a datastore.
I directly knew which disk I should look for, but it can be easily identified through the Add Storage wizard of the vSphere client. (See the first screenshot in this post)

As you can see, this disk contains 3 partitions (p1, p2 and p3)!

How is this possible?
Probably a leftover of the previous installation, although I had destroyed the previous RAID set.
Fdisk also gave some warnings, indicating a non-consistent partition table on this disk.

I decided to remove the partitions manually and used the following commands to remove them:

  1. fdisk /dev/disks/naa.6001e4f023eb110013ffed364d40990cb.
    fdisk is started in the context of this disk.
  2. Press d and enter 1 for the partition number, partition 1 on this disk will be deleted
  3. Press d again and enter 2, which will delete partition 2
  4. Because partition 2 is an extended partition, partition 3 will be deleted as well. There is no need or even possible to delete the third partition.
  5. Press w, to write the changes to disk

To verify the deletion of the partitions on this disk, I issued the fdisk -l command again:

After this procedure, I was able to create a datastore on this disk through the Add Storage wizard!

 

62 comments

Skip to comment form

  1. Blaine Helmick

    This is an awesome find! I had the exact same problem and found that I had an errant partition remaining on my volume as well.

    I wanted to add one more level of complexity here and that is when I removed the errant partition, it didn’t immediately solve the problem. I had the RAID volume initialized at a block size of 4096. I had to change the block size to 512. Once I did that and followed your advice it worked like a charm.

    Excellent work sir.

    1. Erwin

      Thank you Blaine for your comment!

  2. Michi Rauschert

    Hi,

    thanks for this great tips. My problem was, that the block size in the iSCSI volume was 4K. After changing it to 512B I could mount it.

    cu
    Michi

  3. Justin Perkins

    I tried all of these solutions and none of them worked. In my case, the disk had a GPT partition which esx’s fdisk wasn’t removing properly. I even tried booting the esx server off of a usb-pen-ubuntu and reformatting the entire disk as ext2, which didn’t change anything. There was left over LVM data on the disks from their past lives as well after this procedure. Eventually the only thing that made the drive cause esx to not throw this error was doing a raw-mapped disk into a ubuntu guest and doing a dd if=/dev/zero of=/dev/sdb (which was the raw mapped disk in question to the ubuntu guest) and then deleting the raw mapped disk and all was well. able to create a datastore on the disk now. I could have done this when I had the system booted up on the usb-pen but I didn’t think it was needed and later I was not physically close to the server and the raw mapping can be achieved from afar. Anyways. Figured someone else might run into this error due to having GPT partitions which esx 4.1 doesn’t seem to want to work with.

    1. UniMatrix

      I also had a GPT disk with no partition (it was a FC SAN disk that was previously connected to a Windows server) that ESX 4.1 could’t add.

      I re-attached to the Windows server and used diskpart to convert the disk to MBR after which I could add it just fine.

      1. Hans Aalders

        That was the solution for me too. I had a ReiserFS formatted disk from my unRAID box that couldn’t be used in ESXi until I used diskpart to clean all the partition info and then initialize in in Windows as MBR.

  4. cat

    Thanks a lot for showing me the ESXI 4.1 fdisk d1 trick!
    It works for my DAS SATA disk on a cheap x58 chipset board.

    An thanks visitors for yout explanmations about RAID block size and GPT problems.
    Sometimes I love the web 😉

  5. MartiniGuy

    In my case I could not issue the fdisk command using the naa number (fdisk /dev/disks/naa.xxxxxx) . It would give an error that it could not open the device.

    I had to issue the command:
    esxcfg-scsidevs -l

    to find the console device ( /dev/sba ) and then issue the command:

    fdisk -u /dev/sba

    From this point on it worked like a charm.

  6. Jay

    Yes that did the trick, i looked on vmware site and did not find anyhitng usefull.. U ROCK !!!

  7. Mohammed Khalid

    Hi,
    Thanks for this great tips
    my problem was i allocated 2TB, then i changed it to 2000GB, & it works for me.

    Thanks

  8. Gregory

    Excellent!

    I discovered that on my HP Proliant DL380 G4 server when you build logical drives using HP Array Configuration manager, the drives get built but need at least one write to finalize.

    I was able to use your commands to “fdisk (partionian Id) w(rite)” to create correct partion activation.

    Once the Array was activated I was able to add storage to my ESXi 4.1 VMhost

    Thanks,

    Gregory

  9. Robert Boyd

    I had the same issue with an HP BL680c full height blade with a pass-through connector to an SB40c storage blade. The HP Array Configuration Utility put a 128 MB partition on the logical drive. I wound up having to use gparted to wipe the partition out and then from a terminal window:

    # dd if=/dev/zero of=/dev/cciss/c1d0

    The 1st step got me farther into the storage add wizard. The 2nd step was required to get me all the way through. It may be possible that the HP SmartStart “Erase System” function would have wiped the storage correctly, but I was concerned that it would erase ALL of the storage.

    My question is: If it’s so easy to erase the ugly bits from the command line, couldn’t the “Add Storage” code do the same thing? Just ask the user to confirm writing over the existing “data” and just do it!

    Thanks for the helpful hints that got me through this.

  10. Stefan Jagger

    After creating volumes on an MSA 1500 and presenting to VMW I had the same issue… your guide helped me fix it. Thanks.

  11. Dag Lund

    Had this issue on a PL380G7 with ESXi installed on a SD card. Your post helped me fix it, thanks!!!!

  12. Siobhan

    Mohammed and anyone else trying to use 2TB++ LUNs or disks, see VMware’s KB entitled . Hope that helps.

  13. Marc

    Had the exact same problem too..!!!

    I read lots of Vmware Community forum articles about this subject but nowhere was a correct answer.

    I followed the steps and it solved my problem…

    THANKS…!!!!!!!!!!!!!

  14. Lukas

    I regrett your solution didn’t worked for me.

    But the official KB-article helped me: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1008886

    BR,
    Lukas

  15. Neal

    I had a similar issue in trying to add an ISCSI datastore using an existing FreeNAS drive with a previous GPT format. I wanted to change my drive so that I could present the complete 1TB drive as an ISCSI target.

    I tested the FreeNAS ISCSI connection with a WIN7 box so I knew that my connections were fine. After trying a bunch of partition manipulations I ended up using the diskpart clean command. After that, I had no problems in adding it into the datastore.

    Thanks for the help & info in this post!

  16. PCFreak

    The information was very useful for me.I had a HP Microserver running and the same problem. I tested the RAID functionality of the BIOS and configured a RAID with the 2 disks I wanted to use. Then I changed the controler back to normal mode but on the disk there remained some raid info. After “wiping” the disk everything worked fine, thanks to your info.

  17. Joe Bob Briggs

    Great article, worked with my PE2950, PERC6i, and ESXi 4.1!

  18. Mike

    Had the same problem after recofing of raid array on dell perc 6/i. Your solution fixed it. Saved a lot of time and headache now and in the future when I do it again.
    thanks a bunch.

  19. itsupport at lufbra

    Your article fixed my issue too.
    Freenas, VMware esxi, connected.

    Many thanks

  20. Brian Randall

    I was receiving the same error message, but in my case it wasn’t due to too many partitions, it was a total lack of them. In either case, fdisk on the ESXi host was the tool to fix it, so I still found this to be a greatly useful article.

    Thank you for sharing your discovery. 🙂

  21. relegated

    Thank you, this resolved my problem as well.

  22. Boris

    Local disks

    When deleting the partitions won’t solve your problem, simply add a partition table.
    Download the free Hiren CD.
    Start Mini Linux
    Start Gparted
    Select correct disk
    Add partition table MS DOS (ESXi needs a dos partition table)
    Reboot ESXi
    Add the datastore
    Problem solved.

    1. Carlos

      Was able to fix this with GParted following Boris’s steps. The steps outlined in this blog would work, I am sure, but I kept running into roadblock after roadbloack. Getting Hiren onto a CD, booting to it from the server, and using the Linux environment and GParted did the trick in less than 10 minutes.

  23. Douglas

    I had the same issue as poster. It said it had invalid flad 0x35 which would be fixed by a write. I just hit W in FDISK and was able to create a new drive fine!!

    THANKS!!!! This helped me and fixed my issue

  24. JP

    OMG, I was banging my head against the wall…don’t know why I never thought about that. Thank you!

  25. Andre

    Thanks, this solved my problem.

  26. Dan

    Followed your instructions exactly. The only think I had to add was to (o) create new empty dos partition table after deleting all the partitions.

    Thanks for your tip!

  27. Mike

    Thanks for documenting. Saved me some time troubleshooting. Brand new drive that gpartd did not see any partition. just put NTFS partition on it and vsphere 4.1 was able to nuke.

  28. Thomas

    Thanks, i had exactly the same problem.
    I have never seen this problem on another hardware!

  29. Sach

    Great doc – has exact same issue.

  30. John

    Thanks guys, this post had all the info I needed. I had the 2TB+ issue.
    Great post!

  31. AL

    I am not that great with Linux –please no bashing. 🙂 — so I used a WinPE USB drive I have to run DiskPart and rewrite the partition information. Then bang, VMWare saw the disk. The advantage to my method is that my pariticular VMWare instance is a test environment and I run VMWare off a USB drive so all I need to do was reboot and swap the USB drives, run a few commands, reboot and swap the USB drive and then I was in business.

    The the original author of this post, many thanks for taking the time to find the root cause of the issue.

  32. jveldhui

    Thanks!! This helped me out a lot! Perfect post.

  33. Gary

    Thanks! This helped me as well.

  34. Nisar

    I was getting the same error. In my case I had NetApp Vol/Lun set as UNIX format. I went back, changed the vol type to NTFS and error went away. Overall this web link provided me the required light to resolve my issue. Thanks!

  35. Florian

    Thanks for the great post
    Had a similar issue on a HP Proliant ML 350 G6 after creating new logical drive with HP ACU.
    Problem solved thanks to your tips.

  36. andy

    Brilliant. Many Thanks for this.

  37. Bruce LaVoie

    Thanks very much for the info. I had the same problem where esxi did not recognize one of my drives. I used gpedit to put a gpt partition on the drive and then tried to re-add the drive to the datastore and it worked perfectly.

    Thanks again,
    Bruce

  38. Ed Grigson

    Many thanks as this solved my problem too, although my issue was preexisting GPT partitions from an earlier Nexenta ZFS server install. Rather than jumping through hoops with Linux live CDs (fdisk won’t handle GPT partitions) I used partedUtil to overwrite a new msdos label on the affected disks;
    http://www.vexperienced.co.uk/?p=1662

  39. Lars Møller

    works perfectly thank you

  40. Andrew

    Bless you! It worked perfectly.
    Thanks for the post.
    Andrew

  41. Jonas Hofmann

    Thanks alot. Had the same problem and your guide was perfect!

  42. Rob D

    Awsome….This worked great for me….

  43. John Duggins

    I was coming up with the same error messages but had another problem going on. For my iSCSI LUNs, I had created virtual disks off of a SAN, each at 2048GB in size. I dropped the virtual disks and recreated them at 2037.7GB in size. After rescanning, I was able to add the devices with no problems. This was in a 4.1 environment.

  44. Dmitry

    Thanks! Thank helped me, i tried everything
    hoping that i wouldn’t need to reboot the server 🙂

  45. Wolfgang

    THANKS ! Worked fine with dell Poweredge 2900 an Perc 5/i!
    an old NTFS partition wasnt cleared before …

  46. teddy

    this is the answer that i want!!! Thanks….. You are really a man…….hahaha

  47. Eduardo Ramos

    Thank you so much. It help me a lot.

  48. Eduardo Ramos

    Thank you so much. It help me a lot

  49. Duane

    New install ESXi 5.0 on a new (5/2012) Dell R720, same problem, same solution

  50. Patric

    An exellent guide, I had the same probmlem with ESXi 5.0

  51. j@mes

    I resoved has follow on SUNFIRE X4150:

    1. from disk array utility format all disk that will be part of the array
    2. disk array utillity –> inicialize disks
    3. create the array
    4. reboot server
    5. add storage on vSphere

    Regards…

  52. Linus

    Thanks a lot dude, you saved me from blustering against Dell for selling this ‘broken’ server to my customer 🙂

    Cheers and keep on posting!

  53. Walter

    Thanks for this. Had the same issue with a Dell T420 that came with 4 disks in a raid 10, and vmware on SD cards. Would just lock up completely when trying to add the datastore. Once I cleared the partition table, everything was good.

  54. Jason

    Another thanks to add to your pile!!!

    Happened on an HP DL380G5 on an external array.

    THANKS!!!!!!!!!!!!!!!!

  55. Elise

    Thank you very much.
    I had the same pb adding a new disk to my server Esxi.
    Windows formatting didn(t delete the partition table.

    Now it works!

  56. Edgardo

    Thanks you!!!!

  57. Donny

    This works for ESXi 5.0 as well. Great article.

  58. thomas

    Thank you so much for taking the time to post this solution! It solved my problem!
    cheers, Thomas.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

* Copy This Password *

* Type Or Paste Password Here *