Sunday, February 09, 2014

VMware vSphere: Migration of RDM disk to VMDK

I have received following question from my customer ...
"We have business critical application with MS-SQL running in virtual machine on top of VMware vSphere. OS disk is vmdk but data disk is on RDM disk. We want to get rid of RDM and migrate it into normal vmdk disk. We know there are several methods but we would like to know the safest method. We cannot accept too long service downtime but we prefer certainty against shorter down time."
Let's write down customer requirements
  • migrate RDM into VMDK
  • migrate business critical application
  • service downtime as shorter as possible
  • guarantee seamless migration
So here are my recommended options ...

IMPORTANT: First of all you have to do backup before any migration.

Assumptions
  • RDM disk is in virtual mode (if not, you have to remove physical RDM from VM and connect RDM in virtual mode)
  • Latest system and data backup exist
  • At least two datastores exists. One where VM currently resides and second one where you will do migration.
  • Just for Option 1: Experience with VMware Cold Migration
  • Just for Option 2: Experience with VMware live Disk Migration (aka Storage vMotion)
  • Just for Option 2: Availability of VMware vSphere Storage vMotion licence
Option 1 - Cold Migration
Procedure
  1. Shutdown operating system
  2. Use VMware Migrate function and migrate VM in power off state to another datastore. You must select another virtual disk format (for example Lazy Zeroed) and another datastore than VM current datastore. It will convert RDM to VMDK during migration.
  3. Power On VM and validate system functionality
Option 2 - Live Migration without server downtime
Procedure
  1. Use VMware Migrate function and migrate VM in power on state to another datastore. You must select another virtual disk format (for example Lazy Zeroed) and different datastore than VM currently resides. It will convert RDM to VMDK during data migration.
  2. Validate system functionality
Options comparison

Option 1
Advantages
  • system is in power off so it is just disk conversion which is very safe method
Drawbacks
  • offline migration which means service downtime
Option 2
Advantages
  • No service downtime because of online disk migration without service disruption
  • Leveraging your investment into VMware enterprise capabilities 
Drawbacks
  • potential issues specially on disks with high load
  • if there is high disk load on RDM migration will generate another I/O which can lead into worse response times and overall service quality and availability
  • migration of system where all services are running so there is potential risk of data corruption but the risk is very low and mitigated by existing data backup
Dear Mr. customer. Final decision what method is better for your particular use case is up to you. Both methods are relatively safe but Option 1 is probably little bit safer and Option 2 is absolutely without downtime and totally transparent for running services inside VM.

There are even other methods how to convert RDM to VMDK but these two options are relatively easy, fast, save and doesn't require any special software. It simply leverage native vSphere capabilities.

Hope this helps.

2 comments:

Paris Wells said...

FYI Make sure you upgrade the Virtual Hardware to version 10 to support vRDM's over 2 TB ( and use the web client )

Paris Wells said...

Another point , converting to VMDK over 2 TB will mean you won't be able to HOT Extend a Server drive. It will need to be shutdown each time

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2058287&vmw_so_vex_rcava_1136

"You cannot hot-extend a virtual disk if the capacity after extending the disk is equal to or greater than 2 TB. Only offline extension of GPT-partitioned disks beyond 2 TB is possible."