How to migrate unmanaged disks to managed on production SQL cluster

Peter 20 Reputation points
2024-09-30T09:40:44.68+00:00

Hello,

I have to perform migration of azure disks from unmanaged to managed on our production SQL servers, which are in availability set with the sql firewall windows server in it as well. This is still in planning process, but i think i need some clearance with it.

Both SQL servers are in a windows cluster, using separated disks in azure. (for an example the SQL-01 is using SQL-01-DATA(1-2 disks) and SQL-02 is using SQL-02-DATA(1-2 disks). In this case, the disks should be separated for every vm on its own.

https://learn.microsoft.com/en-us/azure/virtual-machines/windows/convert-unmanaged-to-managed-disks#troubleshooting

I would like to ask for some assistance here as:

  1. I started reading about the migration from unmanaged to managed disks, and noticed that firstly I have to convert the availability set to Managed disks. Is this going to change something for the virtual servers while they are working? (the convert of the availability set to impact the VMs ? )
  2. Continued reading and noticed that there is written a script to convert the availability set, and power off all the VMs ,convert the disks and in the instruction is written "start the vm" (but the script does not seem to have "StartAz-VM" on it? Is it some kind of background process with the migration process once the disks are converted to start the server?) Could the script perform the migration to the managed disks without service disruption?
  3. Can it be implemented with manual labor, as written above in the documentation and perform this manually? Which should be better? My though led me to firstly to convert the Availability set (if it does not power off or effect the servers on it and there is no impact), then power off SQL-01, migrating it to managed disks, starting it, migration the database roles to it, and then proceeding with SQL-02 as we do not want to lose the connectivity with the SQL servers ? Is there any dependency of the Availability set and all the servers inside to be powered off once the availability set is configured for Managed disks? Are there any concerns that i need to consider before the implementation of this requirement from Microsoft for the managed disks? As I do not want both SQL production servers to be down for some amount of time (as by reading, depending of the size of the disks the migration might take up to hours?) I will be grateful for any assistance and guidance how this to be implemented by the best way without disrupting the applications using this sql bases on this particular cluster. P.S: I'm new in Azure, apologies if the question has been asked before, i just want to double check before doing something that will create me headaches lately. Thank you for your time and assistance. Have a good one. Regards, Peter
Azure Disk Storage
Azure Disk Storage
A high-performance, durable block storage designed to be used with Azure Virtual Machines and Azure VMware Solution.
647 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
13,254 questions
Windows Server Clustering
Windows Server Clustering
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Clustering: The grouping of multiple servers in a way that allows them to appear to be a single unit to client computers on a network. Clustering is a means of increasing network capacity, providing live backup in case one of the servers fails, and improving data security.
1,010 questions
{count} votes

Accepted answer
  1. Vinod Kumar Reddy Chilupuri 660 Reputation points Microsoft Vendor
    2024-10-01T09:57:55.02+00:00

    Hi petur borisov,
    Welcome to Microsoft Q&A, thanks for posting your query.

    Migrating Unmanaged disk to managed disk for the SQL servers with in the availability set, required careful preparation to reduce the server interruption. Here are some points based on your query.
     

    1. Converting an availability set to managed disks shouldn't effect on the virtual machines while they are running. It's is best to do this process during the maintenance window to avoid the unexpected issues. When you convert availability set to managed disk, the virtual machine will continue to running on the current unmanaged disk without any issues. The conversion wont effect the VM's. After the conversion, you can start migrating each virtual machine to managed disks individually. This should not impact on the other VM's in the availability sets during the process.
    2. The script provided in the documentation is designed to reduce the interruption to the services during the migration. It stops the VMs, converts the disks to the managed disks and then restart the VMs automatically. The script does not explicitly include a Start-AzVM command, but it does start the VMs as part of the migration process.
    3. Yes, you can perform the migration manually. This involves first converting the availability set, then shutting down SQL-01, migrating its disk to the managed disk and restarting it, and moving the data base roles before doing the same process with the SQL-02. In this process ensures that the connectivity to your SQL servers remains throughout the process.
    4. You don't need to shut down all the servers in the availability set to convert it to managed disks. This conversion can be done without effecting the servers as long as no direct impact on them.

     

    Concerns and considerations:

     

    1. Make sure to perform a complete backup for your SQL servers before the migration starts. In this way you can restore your data if any issue occurs during the process.
    2. Ensure that data remains consistent throughout the migration to prevent the data loss or information. Minimize the downtime for both SQL production servers during the migration, you have to plan migration carefully.
    3. Perform comprehensive testing in a non-production environment to identify potential issues and ensure the migration process goes smoothly.

    Reference:

    Migrate Azure VMs to Managed Disks - Azure Virtual Machines | Microsoft Learn

    Backup and disaster recovery for unmanaged disks on Azure VMs - Azure Virtual Machines | Microsoft Learn

    Please let us know if you have any further queries. I’m happy to assist you further. 


    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.


1 additional answer

Sort by: Most helpful
  1. Peter 20 Reputation points
    2024-10-08T08:57:59.76+00:00

    Hello,

    Reading down the documentations i've noticed something interesting.

    As the servers are in availability set, by following Q&A:

    https://learn.microsoft.com/en-us/azure/virtual-machines/faq-for-disks?tabs=azure-portal

    Can VMs in an availability set consist of a combination of managed and unmanaged disks?

    No. The VMs in an availability set must use either all managed disks or all unmanaged disks. When you create an availability set, you can choose which type of disks you want to use.

    This led me thinking to:

    Well, as the servers are in availability set, before implementation of the migration, firstly the availability set should be migrated to managed disks, this is okay, fine.

    Following the logic, after the availability set is ready, how should I migrate the servers one by one to managed disks and use the Microsoft cluster, and one of the respective VMs to be up and working (with unmanaged disks) and taking all the workload, while the availability set is configured to Managed disks, and the respective Q&A topic mentioned that all the VMs should be using Managed disks?

    In this scenario, could this prevent my plan to migrate the availability set, then one of the VMs, then the other one, while one of them is using managed disks, the other - unmanaged, and the availability set is migrated as well to managed disks?

    This is kind of strange and confusing for me.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.