Migrating data from Azure CentOS VM to Azure RHEL new VM

Sahil Singla 0 Reputation points
2024-02-05T14:51:06.54+00:00

We have a requirement where our client wants to Upgrade OS from CentOS to Red Hat with data migration as this would be on parallel stack in Azure
New VM's will be create with RedHat OS and we need to migrate data from old to new including user and directory structure, setup and configure application stack, copy data from old VM to new VM . User's image

User's image

Looking for best possible way to perform this activity, your comments would be much appreciated.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,019 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Luis Arias 8,621 Reputation points Volunteer Moderator
    2024-02-05T15:20:42.18+00:00

    Hi Sahil,

    Here you have two options for migrating data from a CentOS VM to a new RHEL VM, depending if you can have downtime on this VM. In both cases create the new VM in the same Azure Virtual Network.

    Option 1: Online Migration with Zero Downtime Preparation:

    • Backup all data on the CentOS VM.
    • Document the current application stack and configurations. Creation of New RHEL VM:
    • Create a new VM with Red Hat OS. Setup and Configure Application Stack:
    • Install and configure the application stack on the new RHEL VM according to the documented configurations from CentOS VM. Data Migration:
    • Use a tool like rsync in combination with the --watch flag to continuously sync data from the old VM to the new VM. This allows for data changes to be copied over in real-time, achieving zero downtime. Switch Over:
    • Once you’ve confirmed that the data is synced and the applications are working as expected on the new VM, you can switch over to the new VM for production use.

    Option 2: Migration with Downtime (Disk Detach and Attach) Preparation:

    • Backup all data on the CentOS VM.
    • Document the current application stack and configurations. Shutdown Old VM:
    • Shut down the old CentOS VM. Detach Disk from Old VM:
    • Detach the disk from the old VM. Creation of New RHEL VM:
    • Create a new VM with Red Hat OS. Attach Old Disk to New VM:
    • Attach the old disk to the new RHEL VM. Setup and Configure Application Stack:
    • Install and configure the application stack on the new RHEL VM according to the documented configurations from CentOS VM. Testing:
    • Test to ensure that all applications are working as expected after migration. It's a good practice to backup all data and test the setup thoroughly before switching to the new VM for production use.

    Additionally some links that be helpful:

    Let me know if this is helpful, Luis


    If the information helped address your question, please Accept the answer.

    0 comments No comments

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

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.