June 16, 2022

Migrating VMs with shared or multi-writer disks

VMs with shared or multi-writer disks cannot be storage vMotioned while the VM is powered on. Also, if you need to migrate a VM using these features there are a few steps you need to take to avoid possible data corruption.

Shared Disks Overview

467x296image 292image-20220616113035-1

Shared or multi-writer disks are used with clustering application that manage access to the shared data within the application itself. For instance, Microsoft WSFC and Oracle RAQ. When disks are set to shared or multi-writer, storage vMotion is not available while the VMs in the application cluster are powered on. Then the question arises, "How do you migrate a VM using shared or multi-writer flags"? It's similar to how I demoed migrating off RDMs to either clustered VMDK or vVols, but you're not changing the disk type.

 

Example of multi-writer setup:

image-20220616131902-1

 

Migrating VMs with shared disks.

It's not difficult, just requires a few extra steps and precautions. Always make sure you have a successful backup.

Detailed Process for migrating VMs with shared disks.

  1. The first requirement is all the VMs in the application cluster must be powered off. vSphere will not allow you to migrate a powered on VM using any form or shared disk.
  2. Once the VMs have been powered off, you will remove, NOT DELETE, the shared disks from all secondary nodes in the application cluster. This way when migrating the primary node, it is the only VM attached to the shared disks. You do not need to, and should not change, the shared disk option. IE Do not change the multi-writer to unshared or change SCSI bus sharing. 
  3. With the VMs still powered off, you migrate the VMs to the new datastore, primary node first. Make sure to keep the disk format the same during the migration. Multi-writer and clustered VMDKs disks must remain eager thick.
    1. image-20220616132355-2image-20220616152141-2image-20220616152130-1
  4. After all of the VMs have been migrated, you will re-attach the shared disks to all secondary nodes in the application cluster. Make sure to attach the disks the same way they were attached previously. IE. Same SCSI controller and channel or disk number.
  5. Once all shared disks are attached to all secondary nodes, you may power on the primary and secondary node in the application cluster.

 

Simple outline for migrating VMs with shared disks.

  1. Power off all VMs in application cluster.
  2. Removed shared disks from secondary nodes.
  3. Migrate VMs to new destination datastore.
  4. Re-attach shared disks to secondary nodes.
  5. Power on primary and secondary VMs in application cluster.

 

I have had a few requests for how to do this so it made sense to create a quick blog on the process. I've also provided several resource links for more details on multi-writer, shared disks, and application clusters.

Resources:

KB Articles:

 

Blogs:

 

@jbmassae

 

Filter Tags

Storage ESXi vSAN vSphere Storage vMotion Blog Utility Operational Tutorial Intermediate Manage Migrate