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, you cannot inline/offline upgrade from VMFS5 to VMFS6.

You can 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 - https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.storage.doc/GUID-7552DAD4-1809-4687-B46E-ED9BB42CE277.html


Environment

VMware ESXi 4.1.x Installable
VMware ESXi 3.5.x Installable
VMware vSphere ESXi 6.5
VMware vSphere ESXi 6.0
VMware ESXi 4.0.x Embedded
VMware ESXi 4.1.x Embedded
VMware vSphere ESXi 5.5
VMware vSphere ESXi 5.0
VMware vSphere ESXi 5.1
VMware ESXi 3.5.x Embedded
VMware ESXi 4.0.x Installable

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. 

Prerequisites for datastore migration

In this KB we are assuming 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 info handy while you plan for your 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 ESX hosts sharing the datastore with credentials.
  • All ESX hosts and the vCenter server must be upgraded to vSphere 6.5.

    Note: Do not proceed with datastore upgrade until all ESX hosts which share the datastore are upgraded to vSphere 6.5. If you do not upgrade, older ESX hosts 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 ESX 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 you are 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: You can directly migrate your virtual machines from VMFS 5 datastores to VMFS 6 datastores using Storage vMotion. However, below is the recommended process for different deployment scenarios.
 
 
 
Usecase 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 ESX 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 ESX 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 ESX 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 ESX 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 you have Storage DRS configured in this environment and you are using SDC, you can also use datastore maintenance mode feature to aid in the above steps. See Usecase 5 for more information.
 
Usecase 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 ESX 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 ESX 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 ESX 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 ESX 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 ESX commandline, powershell cmdlets.
Note: You cannot use Storage DRS and SDC 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.
 
Usecase 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 ESX 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 ESX 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 ESX 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: If you have Storage DRS configured in this environment and you are using SDC, you can also use datastore maintenance mode feature to aid in the above steps. See Usecase 5 below for more detailed description on this.

Usecase 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 ESX 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 ESX 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 ESX 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.

 

Usecase 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 ESX 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 ESX 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. You also observe some of virtual machine moving 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 ESX 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.

 

Usecase 6: The vCenter Server is having inventory of registered virtual machines running from datastore DS-1. At least one ESX server which also has inventory of registered virtual machines running from the same datastore DS-1. This ESX 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 ESX hosts in the vCenter inventory and has some virtual machines running from this datastore. Additionally, this datastore is also shared with at least one ESX host. This ESX host is not added to vCenter Server inventory. There are some virtual machines running from this ESX host and datastore DS-1. Let us call this ESX host as ESX-1 in below steps.
 
 
To upgrade:
 
  1. Perform version check for vCenter Server and all ESX 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 ESX hosts.
     
  2. Perform version check for ESX server EWSX-1. This ESX 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 ESX-1.
  6. Add ESX-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 ESX server ESX-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 ESX hosts.
  12. Delete datastore DS-1.
Note: You may have other deployment situations which may require you to take some extra precautions while doing this migration. Attached to this article is the 2147824_SampleMigrationVMFS5ToVMFS6.ps1 script. Ensure that you understand your environment and perform migration steps accordingly.
 
Attached is a sample script name2147824_SampleMigrationVMFS5ToVMFS6.ps1".


Additional Information

将 VMFS 5 数据存储迁移到 VMFS 6 数据存储
VMFS 6 データストアへの VMFS 5 データストアの移行

Attachments

2147824_SampleMigrationVMFS5ToVMFS6.zip get_app