Migrating VMFS 5 datastore to VMFS 6 datastore
search cancel

Migrating VMFS 5 datastore to VMFS 6 datastore

book

Article ID: 316475

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

This article provides information on migrating existing VMFS 5 datastore to VMFS 6 datastore.

VMFS 6 is the new filesystem of vSphere 6.5. The new filesystem supports 512e advanced format drives and is 4098 sector (4K) aligned. It also supports automatic UNMAP, which asynchronously tracks freed blocks and sends UNMAPs to backend storage in background.

VMFS 5 and VMFS 6 can coexist. However, due to the changes done in VMFS 6 metadata structures to make it 4K aligned, inline/offline upgrade from VMFS5 to VMFS6 cannot be performed.

To leverage the new VMFS 6 capabilities by creating a new VMFS 6 datastore and provisioning new virtual machines to it or migrating the existing virtual machines from VMFS 5 datastore to VMFS 6 datastore.

For additional information on comparison, please refer to the below document.
* Versions of VMFS Datastores

 

Environment

VMware vSphere ESXi

Resolution

Note: PowerCLI cmdlet “Update-VmfsDatastore” can be used to update datastore from VMFS 5 to VMFS 6.

For more details and limitations on this cmdlet please refer to PowerCLI version 6.5.4 documentation. 

Pre-Requisites for Datastore Migration

In this KB, it is assumed that vSphere admins are upgrading their VMFS datastores one at a time. The below description applies mostly to these scenarios. Though the basic workflow will not change if someone wants to perform upgrade of multiple datastores in parallel.
Keep the following information handy when planning for a VMFS datastore upgrade:
  • Identify the VMFS datastore that must be upgraded to VMFS 6 file system type.

    For example, DS-1.

  • Identify the name of the vCenter Server and list of all ESXi hosts sharing the datastore with credentials.
  • All ESXi hosts and the vCenter Server must be upgraded to vSphere 6.5.

    Note: Do not proceed with datastore upgrade until all ESXi hosts which share the datastore are upgraded to vSphere 6.5. Without upgrading, older ESXi hosts will lose connectivity to the new VMFS 6 datastore after upgrading. This may impact the business continuity.
     
  • Spare datastore with equal or more capacity, which is shared with all ESXi hosts.

    For example, DS-2 in this KB. The DS-2 datastore is used to temporarily host all virtual machines from the DS-1 datastore.

Requirements when automating the process using Windows PowerShell scripts:
 
  • Windows 2008/2008 R2/2012 on 64bit in a domain environment. The windows host used for launching the utility.
  • PowerShell 2.0 or above, with all policies set. vSphere PowerShell plugins installed. Should be able to launch as Administrator. Execute in 64bit PowerShell environment.
 

Different deployment use cases and migration steps

Note: Directly migrate virtual machines from VMFS 5 datastores to VMFS 6 datastores using Storage vMotion. However, below is the recommended process for different deployment scenarios.
 
 
 
Use Case 1: One vCenter Server having inventory of registered virtual machines running from datastore DS-1.
 
The DS-1 datastore of VMFS 5 (or VMFS 3) must be upgraded to datastore with filesystem type VMFS 6. This datastore is shared with all the ESXi hosts in the inventory and has some virtual machines running from this datastore.
 
To Upgrade
  1. Perform version check for the vCenter Server and all ESXi hosts.

    Note: All ESXi hosts and vCenter Server must be of vSphere 6.5. Do not proceed if any one of ESXi hosts is not vSphere 6.5. Proceeding further means business continuity loss and the new datastore is not visible in old ESXi hosts.
     
  2. Perform all pre-checks for free space availability on datastore DS-2. Available space on DS-2 must be equal or more than the datastore DS-1 space.
  3. Ensure that the datastore DS-2 is VMFS 6 type.
  4. Prepare list of all virtual machines in the vCenter Server’s inventory that are hosted on datastore DS-1.
  5. Evacuate the datastore DS-1. For this, migrate all the virtual machines running from datastore DS-1 to datastore DS-2. Storage vMotion operations are performed on these virtual machines.

    Perform one migration at a time to avoid disrupting the performance of remaining datacenter entities. Keep track of any migration failures, if any, re-trigger the migration for those virtual machines.
     
  6. Ensure that datastore DS-1 is empty by listing files on this datastore.

    Note: Proceed further only if datastore DS-1 is empty.
     
  7. Unmount datastore DS-1 from all ESXi hosts.
  8. Delete datastore DS-1.
  9. Create a new datastore with the VMFS 6 filesystem using the same lun. For example, DS-1.
  10. Trigger a storage rescan operation on all hosts and wait for few minutes for this operation to complete.
  11. Move all virtual machines back to datastore DS-1 from datastore DS-2 by performing storage vMotion operation. It is suggested to migrate one virtual machine at a time. Keep track of any migration failures, if any, re-trigger migration for those virtual machines.
Note: If Storage DRS is configured in the environment and SDC is in use, datastore maintenance mode feature to aid in the above steps may be used. See Usecase 5 for more information.
 
Use Case 2: One vCenter Server having inventory of registered virtual machines running from datastore DS-1. Datastore DS-1 also has some orphaned data which is not registered in the vCenter Server’s inventory.
 
 
To Upgrade
  1. Perform version check for vCenter Server and all ESXi hosts.

    Note: All ESXi hosts and vCenter Server must be of vSphere 6.5. Do not proceed if any one of ESXi hosts is not vSphere 6.5. Proceeding further means business continuity loss and the new datastore is not visible in old ESXi hosts.
     
  2. Perform all pre checks for free space availability on datastore DS-2. Available space on DS-2 must be equal or more than the datastore DS-1 space.
  3. Ensure that the datastore DS-2 is VMFS 6 type.
  4. Prepare list of all virtual machines in the vCenter Server’s inventory that are hosted on datastore DS-1.
  5. Evacuate the datastore DS-1. For this, migrate all the virtual machines running from datastore DS-1 to datastore DS-2. Storage vMotion operations are performed on these virtual machines.

    Perform one migration at a time to avoid disrupting the performance of remaining datacenter entities. Keep track of any migration failures, if any, re-trigger the migration for those virtual machines.
     
  6. Prepare the list of files (orphaned files, not registered to the vCenter Server’s inventory) present on datastore DS-1.
  7. Start moving these files to datastore DS-2 one at a time. It is suggested to use one of the recommended ways to move files on VMFS datastores.

    For example, vmkfstools utility on ESXi commandline, powershell cmdlets.
     
  8. Ensure that datastore DS-1 is empty by listing files on this datastore. Proceed further only if datastore DS-1 is empty.
  9. Unmount datastore DS-1 from all the ESXi hosts.
  10. Delete datastore DS-1.
  11. Create a new datastore with the VMFS 6 filesystem using the same lun. For example, DS-1.
  12. Trigger a storage rescan operation on all hosts and wait for few minutes for this operation to complete.
  13. Move all virtual machines back to datastore DS-1 from datastore DS-2 by performing storage vMotion operation. It is suggested to migrate one virtual machine at a time. Keep track of any migration failures, if any, re-trigger migration for those virtual machines.
  14. Move orphaned data files back to datastore DS-2 one at a time. It is suggested to use one of the recommended ways to move files on VMFS datastores.

    For example, vmkfstools utility on ESXi commandline, powershell cmdlets.
Note: Storage DRS and SDC cannot be used reliably in this case because datastore maintenance operation evacuates a datastore with known virtual machine objects only. For example, virtual machines that are registered to the vCenter Server’s inventory. Any other data on the datastore is left behind.
 
Use Case 3: One vCenter Server having inventory of registered virtual machines running from datastore DS-1. Datastore DS-1 has some virtual machines configured with virtual disk affinity rules.
 
To Upgrade
  1. Perform version check for vCenter Server and all ESXi hosts.

    Note: All ESXi hosts and vCenter Server must be of vSphere 6.5. Do not proceed if any one of ESXi hosts is not vSphere 6.5. Proceeding further means business continuity loss and the new datastore is not visible in old ESXi hosts.
     
  2. Perform all pre checks for free space availability on datastore DS-2. Available space on DS-2 must be equal or more than the datastore DS-1 space.
  3. Ensure that the datastore DS-2 is VMFS 6 type.
  4. Prepare list of all virtual machines in the vCenter Server’s inventory that are hosted on datastore DS-1.
  5. Identify virtual machines and virtual disks that are configured for disk affinity rules and are hosted from datastore DS-1. If automatic storage load balancing is configured in the cluster, change it to manual setting. Make a note of all the storage affinity rules currently configured.
  6. Evacuate the datastore DS-1. For this, migrate all the virtual machines running from datastore DS-1 to datastore DS-2. Storage vMotion operations are performed on these virtual machines.

    Perform one migration at a time to avoid disrupting the performance of remaining datacenter entities. Keep track of any migration failures, if any, re-trigger the migration for those virtual machines.
     
  7. Ensure that datastore DS-1 is empty by listing files on this datastore. Proceed further only if datastore DS-1 is empty.
  8. Unmount the datastore DS-1 from all ESXi hosts.
  9. Delete the datastore DS-1.
  10. Create a new datastore with the VMFS 6 filesystem using the same lun. For example, DS-1.
  11. Trigger a storage rescan operation on all hosts and wait for few minutes for this operation to complete.
  12. Add this datastore back to datastore cluster as earlier.
  13. Move all virtual machines back to datastore DS-1 from datastore DS-2 by performing storage vMotion operation. It is suggested to migrate one virtual machine at a time. Keep track of any migration failures, if any, re-trigger migration for those virtual machines.
  14. Add all the storage affinity rules back as earlier (from step #5). If automatic storage load balancing is configured in the cluster, change it back to the original setting (automatic mode).

Note: IfStorage DRS is configured in this environment and SDC is in use, the datastore maintenance mode feature to aid in the above steps may be used. See Use Case 5 below for more detailed description on this.

Use Case 4: One vCenter Server having inventory of registered virtual machines running from datastore DS-1. Datastore DS-1 has some virtual machines with multiple virtual disks attached. At least one of these virtual disks for these virtual machines is hosted from datastore DS-1.
 
To Upgrade
  1. Perform version check for vCenter Server and all ESXi hosts.

    Note: All ESXi hosts and vCenter Server must be of vSphere 6.5. Do not proceed if any one of ESXi hosts is not vSphere 6.5. Proceeding further means business continuity loss and the new datastore is not visible in old ESXi hosts.
     
  2. Perform all pre checks for free space availability on datastore DS-2. Available space on DS-2 must be equal or more than the datastore DS-1 space.
  3. Ensure that the datastore DS-2 is VMFS 6 type.
  4. Prepare list of all virtual machines in the vCenter Server’s inventory that are hosted on datastore DS-1.
  5. Evacuate the datastore DS-1. For this, migrate all the virtual machines running from datastore DS-1 to datastore DS-2. Storage vMotion operations are performed on these virtual machines.

    Perform one migration at a time to avoid disrupting the performance of remaining datacenter entities. Keep track of any migration failures, if any, re-trigger the migration for those virtual machines.
     
  6. In virtual machines with multiple virtual disks, in which atleast one disk hosted from datastore DS-1. Migrate only these particular virtual disks to datastore DS-2. Keep a list of such virtual machines and virtual disks.
  7. Ensure that datastore DS-1 is empty by listing files on this datastore. Proceed further only if datastore DS-1 is empty.
  8. Unmount datastore DS-1 from all ESXi hosts.
  9. Delete datastore DS-1.
  10. Create a new datastore with the VMFS 6 filesystem using the same lun. For example, DS-1.
  11. Trigger a storage rescan operation on all hosts and wait for few minutes for this operation to complete.
  12. Move all virtual machines back to datastore DS-1 from datastore DS-2 by performing storage vMotion operation. It is suggested to migrate one virtual machine at a time. Keep track of any migration failures, if any, re-trigger migration for those virtual machines.
  13. Migrate virtual disks identified in step # 6 back to datastore DS-1.

 

Use Case 5: One vCenter Server having inventory of registered virtual machines running from datastore DS-1. Storage DRS is being used and datastore DS-1 is part of Storage Datastore Cluster (SDC). Automatic load balancing features are turned ON for space and IO load balancing in this SDC.
 
This is the usecase with one vCenter Server in the environment. The datastore DS-1 is of type VMFS 5 (or VMFS 3) and must be upgraded to datastore with filesystem type VMFS 6. The vCenter Server is also configured with Storage DRS. There is a Storage Datastore Cluster (SDC) created and datastore DS-1 is part of this datastore cluster. This datastore cluster is also configured to have storage space and IO load balancing in fully automatic mode.
 
 
To Upgrade
  1. Perform version check for vCenter Server and all ESXi hosts.

    Note: All ESXi hosts and vCenter Server must be of vSphere 6.5. Do not proceed if any one of ESXi hosts is not vSphere 6.5. Proceeding further means business continuity loss and the new datastore is not visible in old ESXi hosts.
     
  2. Perform all pre checks for free space availability on datastore DS-2. Available space on DS-2 must be equal or more than the datastore DS-1 space.
  3. Ensure that the datastore DS-2 is VMFS 6 type and is empty.
  4. Add datastore DS-2 to this datastore cluster.
  5. Put datastore DS-1 into maintenance mode. This should start evacuating datastore DS-1 with storage vMotion operations on the virtual machines. Some of the virtual machines may move towards datastore DS-2.
  6. Ensure that datastore DS-1 is empty by listing files on this datastore. Proceed further only if datastore DS-1 is empty.
  7. Unmount datastore DS-1 from all ESXi hosts.
  8. Delete datastore DS-1.
  9. Create a new datastore with the VMFS 6 filesystem using the same lun. For example, DS-1.
  10. Trigger a storage rescan operation on all hosts and wait for few minutes for this operation to complete.
  11. Add datastore DS-1 back to the Storage Datastore Cluster.
  12. Put datastore DS-2 into maintenance mode. This starts evacuating datastore DS-2 with Storage vMotion operations on the virtual machines.
  13. Move the datastore DS-2 out of the datastore cluster.
  14. Exit maintenance mode for datastore DS-2.

 

Use Case 6: The vCenter Server is having inventory of registered virtual machines running from datastore DS-1. At least one ESXi server which also has inventory of registered virtual machines running from the same datastore DS-1. This ESXi server is not added to any vCenter Server’s inventory.
 
One vCenter Server in the environment. The datastore DS-1 is of type VMFS 5 (or VMFS 3) and must to be upgraded to datastore with filesystem type VMFS 6. This datastore is shared with all the ESXi hosts in the vCenter inventory and has some virtual machines running from this datastore. Additionally, this datastore is also shared with at least one ESXi host. This ESXi host is not added to vCenter Server inventory. There are some virtual machines running from this ESXi host and datastore DS-1. Let us call this ESXi host as ESXi-1 in below steps.
 
To Upgrade
  1. Perform version check for vCenter Server and all ESXi hosts.

    Note: All ESXi hosts and vCenter Server must be of vSphere 6.5. Do not proceed if any one of ESXi hosts is not vSphere 6.5. Proceeding further means business continuity loss and the new datastore is not visible in old ESXi hosts.
     
  2. Perform version check for ESXi server EWSX-1. This ESXi host must be vSphere 6.5.

    Note: Do not proceed if any one of ESXi hosts is not vSphere 6.5.
     
  3. Perform all pre checks for free space availability on datastore DS-2. Available space on DS-2 must be equal or more than the datastore DS-1 space.
  4. Ensure that the datastore DS-2 is of VMFS 6 type.
  5. Ensure that the datastore DS-2 is visible from host ESXi-1.
  6. Add ESXi-1 to the vCenter Server inventory.
  7. Prepare the list of virtual machines in the vCenter Server’s inventory that are hosted on datastore DS-1.
  8. Prepare list of virtual machines running from ESXi server ESXi-1 and hosted on datastore DS-1.
  9. Evacuate the datastore DS-1. For this, migrate all the virtual machines running from datastore DS-1 to datastore DS-2 by performing storage vMotion operations on these virtual machines.

    Perform one migration at a time to avoid disrupting the performance of remaining datacenter entities. Keep track of any migration failures, if any, re-trigger the migration for those virtual machines.
     
  10. Ensure that datastore DS-1 is empty by listing files on this datastore. Proceed further only if datastore DS-1 is empty.
  11. Unmount datastore DS-1 from all ESXi hosts.
  12. Delete datastore DS-1.
Note: There may be other deployment situations which may require taking some extra precautions while doing this migration. Attached to this article is the 2147824_SampleMigrationVMFS5ToVMFS6.ps1 script. Ensure understanding of the environment and perform migration steps accordingly.

Attached is a sample script name “2147824_SampleMigrationVMFS5ToVMFS6.ps1".



Additional Information

Attachments

2147824_SampleMigrationVMFS5ToVMFS6.zip get_app