Add Existing Data Disk to a VM in Azure

15 minutes
  • 2 Learning Objectives

About this Hands-on Lab

Your department needs to decommission a VM and retain the data on that VMs disk. You decide that the best option is to attach the disk to a different VM that is currently running. Attach the data disk to the VM and ensure that the disk is accessible by the operating system.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Decommission one VM and Attach Disk to Another
  1. Click on the Virtual Machines icon.

  2. Select the winVM2 link and click the Delete, along with Yes to remove this VM.

    Note: This process may take up to ten minutes. So, now is the time to stretch.

  3. Once completed, navigate back to the Virtual machines page.

  4. Select the only VM left, winVM1, and click Disks.

  5. Select Attach existing disks.

  6. Under Disk name, choose the winVM2 disk from the drop-down menu. (If you don’t see it in the list try refreshing the page.)

  7. Click on Save.

  8. Once the disk is saved to the VM, click Connect and RDP.

  9. Choose the Download RDP File, clicking thru the saved options from the prompts.

Connect and Recognize Disk in Windows

If you have a Windows laptop, this should already have a pre-installed RDP client.

  1. Open the RDP file using your native RDP client.
  2. When prompted, use the Winvm1 credentials located in our hands-on lab, and click Continue on the pop-up window.
  3. Once logged into VM, click on the File Explorer icon located at the bottom of the screen.
  4. Select This PC.
  5. Click on the Windows (G:) drive.
  6. You’ll notice all the files present in the winVM2 drive.

Follow these steps to RDP into the Windows VM using your Mac:

  1. To connect to a Windows VM from a Mac, you will need to install an RDP client such as Microsoft Remote Desktop
  2. Once downloaded open the application.
  3. In the Mircosoft Remote Desktop, click on the gear and choose the Import from RDP file and select the RDP file that was downloaded earlier.
  4. When prompted, use the Winvm1 credentials located in our hands-on lab, and click Continue on the pop-up window.
  5. Once logged into VM, click on the File Explorer icon located at the bottom of the screen.
  6. Select This PC.
  7. Click on the Windows (G:) drive.
  8. You’ll notice all the files present in the winVM2 drive.

Additional Resources

Log in to the Azure portal and decommission the VM named winVM2. Take the disk from winVM2 and add it to winVM1. Once the data disk has is added, connect to the winVM1 via the remote desktop protocol (RDP) and open the Windows Explorer. Verify that the disk contents are visible.

Log in to the VM Portal using the credentials provided and the Open Azure Portal button.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?