We needed to retask hardware for a project and found that re-installing vmware will not erase the physical hard drive. We have tried to un-mount and delete the partions and datastore but it reports that is can't change the host configuration or that the disk is in use.
We have installed vmware on an sd card and have a single 500gb drive.
We have tried everything that can be done from the web client and with no luck.
Any idea where to go from here? We running 6.5 update 1.
Thanks
Hello,
No, re-installing ESXi won't touch any partitions other than what you are installing it on (why would it?!).
Did you by any chance select this drive for logging/scratch or coredump partition or some such while installing? (IIRC this is an option at a point)
How have you tried to delete the existing partition on that device?
Try via the web client:
virtuallyghetto.com/2015/09/erasing-existing-disk-partitions-now-available-in-the-vsphere-web-client-vsphere-6-0-update-1.html
If not possible due to 'in-use' then check what is on it via CLI:
# cd /dev/disks
# partedUtil getptbl <naa/mount-point of device>
If it is one of the partitions mentioned above then reconfigure/remove that using the appropriate esxcli command.
Then try deleting it again via Web Client as per article linked above or delete it via CLI (this will also tell you if you cannot delete it):
# partedUtil delete "/vmfs/devices/disks/<naa/mount-point of device>" <PartitionNumber(s)>
kb.vmware.com/kb/1036609
(Note: to anyone reading this in future, it is your own responsibility alone to ensure that you know what you are deleting/formatting - use caution, triple-check before proceeding)
Bob
Hello,
No, re-installing ESXi won't touch any partitions other than what you are installing it on (why would it?!).
Did you by any chance select this drive for logging/scratch or coredump partition or some such while installing? (IIRC this is an option at a point)
How have you tried to delete the existing partition on that device?
Try via the web client:
virtuallyghetto.com/2015/09/erasing-existing-disk-partitions-now-available-in-the-vsphere-web-client-vsphere-6-0-update-1.html
If not possible due to 'in-use' then check what is on it via CLI:
# cd /dev/disks
# partedUtil getptbl <naa/mount-point of device>
If it is one of the partitions mentioned above then reconfigure/remove that using the appropriate esxcli command.
Then try deleting it again via Web Client as per article linked above or delete it via CLI (this will also tell you if you cannot delete it):
# partedUtil delete "/vmfs/devices/disks/<naa/mount-point of device>" <PartitionNumber(s)>
kb.vmware.com/kb/1036609
(Note: to anyone reading this in future, it is your own responsibility alone to ensure that you know what you are deleting/formatting - use caution, triple-check before proceeding)
Bob
All we did was create a vm, turn it off, unregister the vm, then tried to unmount the partition so we could delete it. It keeps saying its in use.
We reinstalled vmware esxi but did not touch the hard drives (we install vmware on a usb) and even with no machines in inventory the partitions could not be deleted due to being in use.
The only way we have found to fix it is to reinstall vmware and use a third party program to remove the partitions.
We have tried EVERYTHING that can be done related to the drives in the web client. Unmount, delete partition, clear partition table, and nothing works.
We will recreate it in the lab and try the cli command. We tried it before but I no longer remember the reason why it could not.
> and use a third party program to remove the partitions.
Yep - thats the way to go. Also wipe the disk with zeroes before you create a new VMFS-partition.
I don't understand... if the tools are in 6.5 why do I need to go to a third party program? Are the partition tools a beta feature?
Partitioning disks with VMFS is often a problem when the disk has already been used.
So it often is faster to do that with a third party tool like a Linux LiveCD because those tools can handle every situation.