Thursday
Jan232014

Can't format a VMFS-5 volume on an existing disk?

If you are cobbling together a home lab for ESXi, sometimes you’ll be reusing various disks that have been used in other computers with other operating systems. This can cause a problem for ESXi when you want to format a disk as a VMFS volume if there is an existing partition table and you want to format it using GPT for VMFS-5 and there is an existing MBR partition.

When you try to format the disk you’ll get an error like:

Error:A specified parameter was not correct.
Vim.Host.DiskPartitionInfo.spec
Error Stack
Call "HostStorageSystem.ComputeDiskPartitionInfo" for object "storageSystem" on ESXi "x.x.x.x" failed.

In my particular situation I am using a hosted Mac Mini so I can’t just grab the disk and wipe the partition table but it’s still possible from the command line. You’ll need to enable SSH and the ESXi Shell and use the partedUtil.

On my Mini I have a hard disk and an SSD which can be found under the /vmfs/devices/disks directory.

ls -lh /vmfs/devices/disks
total 1985717835
-rw-------    1 root     root        7.5G Jan 23 07:49 mpx.vmhba32:C0:T0:L0
-rw-------    1 root     root        4.0M Jan 23 07:49 mpx.vmhba32:C0:T0:L0:1
-rw-------    1 root     root      250.0M Jan 23 07:49 mpx.vmhba32:C0:T0:L0:5
-rw-------    1 root     root      250.0M Jan 23 07:49 mpx.vmhba32:C0:T0:L0:6
-rw-------    1 root     root      110.0M Jan 23 07:49 mpx.vmhba32:C0:T0:L0:7
-rw-------    1 root     root      286.0M Jan 23 07:49 mpx.vmhba32:C0:T0:L0:8
-rw-------    1 root     root      465.8G Jan 23 07:49 t10.ATA_____APPLE_HDD_HTS545050A7E362_____________________TEL51939JB8U1H
-rw-------    1 root     root      465.8G Jan 23 07:49 t10.ATA_____APPLE_HDD_HTS545050A7E362_____________________TEL51939JB8U1H:1
-rw-------    1 root     root      476.9G Jan 23 07:49 t10.ATA_____Samsung_SSD_840_PRO_Series______________S1AXNSADB12812X_____
-rw-------    1 root     root      476.9G Jan 23 07:49 t10.ATA_____Samsung_SSD_840_PRO_Series______________S1AXNSADB12812X_____:1
lrwxrwxrwx    1 root     root          20 Jan 23 07:49 vml.0000000000766d68626133323a303a30 -> mpx.vmhba32:C0:T0:L0
lrwxrwxrwx    1 root     root          22 Jan 23 07:49 vml.0000000000766d68626133323a303a30:1 -> mpx.vmhba32:C0:T0:L0:1
lrwxrwxrwx    1 root     root          22 Jan 23 07:49 vml.0000000000766d68626133323a303a30:5 -> mpx.vmhba32:C0:T0:L0:5
lrwxrwxrwx    1 root     root          22 Jan 23 07:49 vml.0000000000766d68626133323a303a30:6 -> mpx.vmhba32:C0:T0:L0:6
lrwxrwxrwx    1 root     root          22 Jan 23 07:49 vml.0000000000766d68626133323a303a30:7 -> mpx.vmhba32:C0:T0:L0:7
lrwxrwxrwx    1 root     root          22 Jan 23 07:49 vml.0000000000766d68626133323a303a30:8 -> mpx.vmhba32:C0:T0:L0:8
lrwxrwxrwx    1 root     root          72 Jan 23 07:49 vml.010000000020202020202054454c35313933394a42385531484150504c4520 -> t10.ATA_____APPLE_HDD_HTS545050A7E362_____________________TEL51939JB8U1H
lrwxrwxrwx    1 root     root          74 Jan 23 07:49 vml.010000000020202020202054454c35313933394a42385531484150504c4520:1 -> t10.ATA_____APPLE_HDD_HTS545050A7E362_____________________TEL51939JB8U1H:1
lrwxrwxrwx    1 root     root          72 Jan 23 07:49 vml.0100000000533141584e53414442313238313258202020202053616d73756e -> t10.ATA_____Samsung_SSD_840_PRO_Series______________S1AXNSADB12812X_____
lrwxrwxrwx    1 root     root          74 Jan 23 07:49 vml.0100000000533141584e53414442313238313258202020202053616d73756e:1 -> t10.ATA_____Samsung_SSD_840_PRO_Series______________S1AXNSADB12812X_____:1

So now I need to delete the existing partitions on the two internal drives with the following command:

/sbin/partedUtil delete /vmfs/devices/disks/t10.ATA_____APPLE_HDD_HTS545050A7E362_____________________TEL51939JB8U1H 1

Note the 1 at the end which identifies the partition to delete. If you have a disk with multiple partitions, you’ll need to delete each of them.

Once you’ve done that, you can go back into the VI-Client or the web interface and format the disk as a VMFS-5 volume.

PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments (10)

Hello Erik,
It works and much better and clear than VMware article!
Thanks a lot!
Alex.

April 5, 2014 | Unregistered CommenterAlex P.

One way around this is to just load with vmfs3 and then upgrade to vmfs5- worked for me when I got those errors.

April 24, 2014 | Unregistered Commenterjzed

Thanks Mate! Just ran the commands and worked like a charm!

April 28, 2014 | Unregistered CommenterEric

Following on from jzed's post - Create a VMFS3 datastore and then delete it. I was then able to create a VMFS5 datastore immediately.

Much easier!

May 23, 2014 | Unregistered CommenterBen

Thanks jzed. Created a VMFS3 and upgraded it!

November 25, 2014 | Unregistered CommenterBrian

Awesome, thanks for this info!

December 12, 2014 | Unregistered CommenterMegan

If you don't want to use the command line, it's probably best to follow Ben's adaptation rather than upgrading - I've read that upgrading VMFS 3 to VMFS 5 doesn't necessarily enable all of the new VMFS 5 features.

May 15, 2015 | Unregistered Commenterjehrich

Easy peasy! Thanks!

June 19, 2015 | Unregistered CommenterChristopher

works for me. Very useful post. Thanks!

August 28, 2015 | Unregistered CommenterAlan

Did the job. Thanks!

February 26, 2016 | Unregistered CommenterBobby in TN

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
« Awesome birthday present | Main | Mavericks NFS alert »