Can’t Delete DataStore on New VMware ESXi Install even with embedded SDcard

Like many of you out there, when I am creating a VM, there are times I want a virtual hard drive larger than 256GB.  Unfortunately VMware defaults the DataStore block size to 1MB, which limits you to a virtual HDD of only that size.  In a previous post (here), I walked you through deleting and recreating the DataStore to get the larger block size needed for a VHDD of up to 2TB.  But what happens when you can’t delete the DataStore to recreate it.  This is the error I am talking about: “Error during the configuration of the host: DestroyVmfsDatastore: can’t delete partition 3 on lun vmhba1:0:0″

It is no surprise when you install VMware, it installs some other information on the drives for the OS, but I was surprised to see files on the local hard drives when I was installing VMware on the embedded SDcard we typically specify with our servers.  Despite installing the actual OS on a separate flash drive, the install actually wrote some data to one of the drives on the server.

Compare DataStore1 which has VMware ESXi installed on it to DataStore 2 which has nothing but VM’s on it.  You can see there are a lot more partitions, which is why the DataStore won’t delete.  If VMware was installed on an embedded flash drive you would see less partitions on DataStore1, but still a lot more than on DataStore2.

The easiest way to avoid this is if you are installing to an embedded SD card is to not attach your hard drives or configure your virtual disks if you are using a RAID card until after the ESXi installation.  If the drives aren’t there, then the installation can’t write files to them.

If, however you have already installed VMware ESXi to the flash drive and don’t want to reinstall it again with the drives disconnected, the easiest way it from inside the RAID card utility at startup, just re-initialize the offending drive, which will delete all data that has been written to it and then you will be able to create the DataStore with the larger block size.

If you do not have the option of installing to an embedded flash drive, then my recommendation would be to create a 1GB virtual disk in your RAID card first, install VMware there, and then create the remaining disks in the RAID utility after.  Then, when you are creating the DataStore in VMware, you can specify the block size then.

I hope this helps take away some of the confusion on why you cant delete a DataStore on a clean install with no VM’s even created.

One thought on “Can’t Delete DataStore on New VMware ESXi Install even with embedded SDcard

  1. My setup has the ESXi setup installed on a 1GB Disk and the datastore1 setup on another disk on the same RAID Array. I came across the same problem when i added more drives to the array and noticed that my datastore1 drive had a DOS partition and a VMFS partition. I was able to successfully add the addition space without having to rebuild my server by:
    – backing up all my VMs on the datastore1 drive
    – using fdisk (via SSH) to delete the VMFS partition for the datastore1 drive
    – recreate datastore1 from VI Client.
    – restore the VMs to the datastore which now has the additional space.

    I was tempted to delete the DOS partition also but for a gain of only 4GB i thought i would play it safe and not touch it.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s