If you want to create a new datastore for VMware ESXi, you sometimes have to delete existing partitions from the storage device. In this post, I introduce three ways to remove partitions in VMware ESXi 6 with a GUI.

If you try to create a new datastore, you might run into this error message: A specified parameter was not correct: Vim.Host.DiskPartitionInfo.spec - Call "HostDatastoreSystem.QueryVmfsDatastoreCreateOptions" for object "storageSystem…"

Error when creating a datastore in VMware ESXi

Error when creating a datastore in VMware ESXi

If existing partitions are present on the storage media, you will be unable to create a VMFS-formatted datastore.

Previous versions did not have an easy way to delete existing partitions. This wasn’t always simple, and one had to dig in via CLI and enter commands to clean the partitions. It wasn’t particularly difficult to delete existing partitions if you had just few hosts to do, but you still had to use a command line Putty session or install a vMA (VMware vSphere Management assistant).

The command that needs to be used looks like this:

partedUtil delete "/vmfs/devices/disks/DeviceName" PartitionNumber

And to give you a real example, the command was like this (not something easy to remember):

partedUtil delete "/vmfs/devices/disks/mpx.vmhba0:C0:T0:L0" 2

VMware newbies might not like to work on the command prompt. Additionally, there is another problem with these commands. There is no way back, so if you make a mistake and pick up the wrong volume, your data is lost.

However, there are three ways to more easily remove existing partitions through a GUI.

Option 1 – Via GParted ISO ^

Admins who want to use a quick workaround can use the Diskparted tool. By using IPMI (Intelligent Platform Management Interface) or a Dell Remote Access Card (DRAC) for remote management of your host, you can mount an ISO and boot the host out of the ISO in order to format the local disks before booting the ESXi hypervisor.

This works, but the downside of this method is that you have to reboot the host > delete the partitions > boot your host again. You can get a copy of Live CD Gparted at gparted.org.

Cleaning partitions via Gparted

Cleaning partitions via Gparted

Option 2 – Via the HTML 5 web client ^

Several months ago, VMware released a new web client, which is bundled with ESXi. This VMware Fling is called HTML 5 web client and is basically an HTML 5 client. Note that the HTML5 web client is still unfinished, which means that not all the features previously available through the Windows client or the vSphere web client (Flash-based client) are already implemented.

However, the particular feature we need here to remove partitions is already available. If you want to get the latest build of the HTML 5 client, you just have to download it from VMware Labs site. Then you have to uninstall the previous version and install the new one. You can access the ESXi machine via this URL: https://IP_of_ESXI/UI.

To remove partitions, you have to follow this procedure:

Select Storage > Devices > Actions button > Clean Partition Table

Remove partitions ESXi storage via the HTML5 client

Remove partitions ESXi storage via the HTML5 client

Option 3 – Via the vSphere web client ^

In vSphere 6.0 Update 1, there is a new way to clean partitions. Note that the vSphere web client is a part vCenter. You can get the vCenter and three ESXi host licenses through the vSphere Essentials bundle, which costs about $600 and includes one year of support.

In the vSphere web client, click and Select ESXi host > select Manage > Storage > Storage Adapters. Highlight the device where you want to remove the partitions and click the "erase icon" (see screenshot below).

Remove partitions from ESXi storage

Remove partitions from ESXi storage

Previously, you had to go to the CLI and execute a few commands via Putty in a SSH session. However, you can now do the same thing through the GUI.

Continue with the next window, where you have to click the OK button to erase the partitions.

Delete partitions with the storage wizard

Delete partitions with the storage wizard

You can now start a wizard to add a new datastore to your host.

Creating a datastore

Creating a datastore

Wrap-up ^

Removing partitions can now be done easily via the vSphere web client, which is particularly useful when configuring VMware VSAN, a VMware Hyper-Converged infrastructure offer. VMware VSAN needs to have blank disks with no partitions in order to be activated. Imagine that you have six to seven disks in each host and you have to clean the disks one by one on each host individually.

Subscribe to 4sysops newsletter!

Note that you may still need to know how to remove partitions in ESXi through the CLI because it is one of the certification requirements in case you’re working toward becoming a VCP6 (VMware Certified Professional) or VCAP (VMware Certified Advanced Professional).

0 Comments

Leave a reply

Please enclose code in pre tags

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

*

© 4sysops 2006 - 2022

CONTACT US

Please ask IT administration questions in the forums. Any other messages are welcome.

Sending

Log in with your credentials

or    

Forgot your details?

Create Account