Duplicate existing Azure VM to create a test environment

Tim 1 Reputation point

Duplicate existing Azure VM to create a test environment.

We want to use an existing production VM as template to create a test environment which mirrors the production VM as is.

We want to use this test VM to try the upgrade process for various systems before attempting upgrades on production.

Can we use an existing Azure VM to create a test environment without impacting on the main production env?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,401 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. kobulloc-MSFT 25,156 Reputation points Microsoft Employee

    Hello, @Tim !

    There are many ways to duplicate a VM but the requirement not to impact the production environment may be a difficult restriction as with most approaches you will want to shut down the source VM to clear out any processes that are in progress.

    Create a Snapshot
    This creates a full copy of the VHD. You'll create a snapshot using either the portal, PowerShell, or CLI, then deploy a VM from the snapshot using the new managed disk.

    To create a snapshot using the Azure portal, complete these steps.

    1. In the Azure portal, select Create a resource.
    2. Search for and select Snapshot.
    3. In the Snapshot window, select Create. The Create snapshot window appears.
    4. For Resource group, select an existing resource group or enter the name of a new one.
    5. Enter a Name, then select a Region and Snapshot type for the new snapshot. If you would like to store your snapshot in zone-resilient storage, you need to select a region that supports availability zones. For a list of supporting regions, see Azure regions with availability zones.
    6. For Source subscription, select the subscription that contains the managed disk to be backed up.
    7. For Source disk, select the managed disk to snapshot.
    8. For Storage type, select Standard HDD, unless you require zone-redundant storage or high-performance storage for your snapshot.
    9. If needed, configure settings on the Encryption, Networking, and Tags tabs. Otherwise, default settings are used for your snapshot.
    10. Select Review + create.

    Another option that won't create an exact copy but may be worth mentioning is a duplicate ARM deployment. This would allow you to deploy an identical VM that you could configure the same as your production environment. While not the mirror copy that you are looking for, it would have no impact on your production environment.


    0 comments No comments