- How to use VMware vSAN ReadyNode Configurator - Fri, Dec 17 2021
- VMware Tanzu Kubernetes Toolkit version 1.3 new features - Fri, Dec 10 2021
- Disaster recovery strategies for vCenter Server appliance VM - Fri, Nov 26 2021
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…"
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.
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
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).
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.
You can now start a wizard to add a new datastore to your host.
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).