Upgrading VMware ESXi 4.x to ESXi 5.x on a local disk fails with the error: Invalid argument when creating vfat file system
search cancel

Upgrading VMware ESXi 4.x to ESXi 5.x on a local disk fails with the error: Invalid argument when creating vfat file system

book

Article ID: 342946

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Symptoms:
  • VMware ESXi 4.x, 5.0, 5.1 is installed on local hard disk.
  • Attempting to upgrade from ESXi 4.x to ESXi 5.x or from ESXi 5.1 to ESXi 5.5 fails.
  • You see entries similar to:

    vmkfstools failed with message: Checking if remote hosts are using this device as a valid file system. This may take a few seconds...
    Creating vfat file system on "naa.XXXXXXXXXXXXXXXXXXXXXX:2" with blockSize 1234238 and volume label "none".
    Usage: vmkfstools -C [vmfs3lvmfs5] /vmfs/devices/disks/vml... or,
    vmkfstools -C [vmfs3lvmfs5] /vmfs/devices/disks/naa... or,
    vmkfstools -C [vmfs3lvmfs5] /mvfs/devices/disks/mpx.vmhbaA:T:L:P
    Error: Invalid argument


    Note: This error appears on the console of the ESXi host.

  • In the /var/log/vmkernel.log file, you see the error:

    WARNING: VFAT: 853: Partition bigger than 4GB FAT16 limit
  • Attempting to upgrade ESXi 5.0 or 5.1 to 5.5 results in these same errors.


Environment

VMware vSphere ESXi 5.0
VMware ESXi 4.0.x Installable
VMware vSphere ESXi 5.1
VMware vSphere ESXi 5.5
VMware ESXi 4.1.x Installable

Cause

This issue occurs if the ESXi 4.x or ESXi 5.0 or ESXi 5.1 host contains a VMFS on partition #2. Such a host typically contains a scratch partition on partition #2, with the VMFS partition on partition #3.

When you run the fdisk -l command, a host with an issue reports a partition layout similar to:

Disk /dev/disks/naa.600508e0000000003b4c480287e5f60c: 72.0 GB, 72000000512 bytes

64 heads, 32 sectors/track, 68664 cylinders Units = cylinders of 2048 * 512 = 1048576 bytes

Device Boot Start End Blocks Id System

/dev/disks/naa.600508e0000000003b4c480287e5f60cp1 5 900 917504 5 Extended

/dev/disks/naa.600508e0000000003b4c480287e5f60cp2 901 68664 69390336 fb VMFS

/dev/disks/naa.600508e0000000003b4c480287e5f60cp4 * 1 4 4080 4 FAT16 <32M</FONT>

/dev/disks/naa.600508e0000000003b4c480287e5f60cp5 5 254 255984 6 FAT16

/dev/disks/naa.600508e0000000003b4c480287e5f60cp6 255 504 255984 6 FAT16

/dev/disks/naa.600508e0000000003b4c480287e5f60cp7 505 614 112624 fc VMKcore

/dev/disks/naa.600508e0000000003b4c480287e5f60cp8 615 900 292848 6 FAT16
For more information on using fdisk, see Linux: how to delete a partition with fdisk.
Note: The preceding link was correct as of February 2, 2015. If you find the link is broken, provide feedback and a VMware employee will update the link.

The upgrade attempts to reformat the scratch partition (partition #2) with a VFAT filesystem. This mostly likely fails, as the maximum size allowed for VFAT is 4GB, and most VMFS datastores are larger than 4GB. A 4GB datastore may potentially be erased.

Resolution

To resolve this issue, remove the VMFS datastore that is preventing the upgrade.
To remove the VMFS datastore that is preventing the upgrade:
  1. If the local VMFS datastore is not empty, move the contents to a SAN datastore (or a datastore on another local disk) from the command line of the ESXi host.
  2. Delete the VMFS datastore from partition #2 (use fdisk on the console if the host is already stuck mid-upgrade) and reboot the ESXi host. To delete the VMFS file system for partition 2, run the command:

    #partedUtil delete /dev/disks/disk_dev_file partition_number
Example:

partedUtil delete /dev/disks/naa.600508e000000003b4c460287e5f40c 2

The upgrade is then restarted and continues from the point at which it failed and should complete successfully.

Notes: If the host is not upgraded, but examination of fdisk -l output shows that the host is upgraded, you must delete the disk partition.
To delete the disk partition:
  1. Evacuate the local datastore using storage migration.
  2. Delete the datastore using the vSphere GUI.


For an ESXi host that is already on version 5.x:

  1. Log in to the ESXi 5.x console as root or through SSH.
  2. Run the command esxcfg-scsidevs -c to identify device path or naa can be grabbed from log.
  3. Run the command partedUtil getptbl /vmfs/devices/disks/naa.xxxxxxxx. This is to list partitions and check if vmfs volume is on second parition.
  4. Run the command partedUtil delete /vmfs/devices/disks/naa.xxxxxxxx partition_number, where naa.xxxxxxxx is the disk in question, and partition is the partition returned by the previous gettbl command. This is to delete that vmfs volume after moving needed data out

    After deleting the offending VMFS datastore, proceed with the reboot of the ESXi host and re-attempt the upgrade.


Additional Information

To be alerted when this document is updated, click the Subscribe to Article link in the Actions box