Step-by-step guide for Restoring a Removed Virtual Machine with Its OS Disk

Step-by-step guide for Restoring a Removed Virtual Machine with Its OS Disk

This guide outlines the steps to reclaim a virtual machine that has been deleted by utilizing its operating system disk. The OS disk, which contains the system’s files, can be reattached to a new VM instance to recover the original environment.

It is important to know that there is a difference between an (operating system) OS disk, temporary disk and a data disk.

OS DISK
Every Virtual Machine comes equipped with an associated operating system disk. This disk is already set up with the selected operating system at the time of the virtual machine’s creation and contains a boot volume. It’s typically advised to use the OS disk solely for operating system files, while applications and data should be stored on separate data disks. Nevertheless, if budget considerations are a priority, you may opt to utilize the operating system disk for your applications and data instead of adding a data disk.

DATA DISK A data disk refers to a managed disk linked to a virtual machine, it purpose is for storing application data or any other important data. These data disks are recognized as SCSI drives and can work well with your preference. The capacity to attach data disks and the kind of storage that can be used for these disks are determined by the virtual machine’s size.

It’s essential to understand that neither the OS disk nor the data disk sizes can be decreased. Azure does not support the reduction of disk sizes to safeguard against the potential loss of data.

To increase the size of the OS disk , it has to unattached from the Virtual machine .

RESTORING YOUR VIRTUAL MACHINE
To begin creating your virtual machine, refer to the guide on my blog. Here’s how to start:

a) In the Azure portal homepage, select the Virtual Machine option to proceed.

b) click on delete to delete your VM

c) unselect the associated resource type and click on delete.

D) Go to your resource group and click on the one associated to the deleted VM.

E) Search for the OS disk of your deleted virtual machine.

f) click on create VM

g) Give your virtual machine a name.
h) Select your subscription and resource group
You cannot make changes to region

I) Select your virtual machine size
j) Inbound port rules ; select RDP(3389) and click on next .

k) On the disk configuration page, as you navigate to the section for the OS disk, you’ll observe that the disk type is fixed and unmodifiable due to it being a pre-existing OS disk.

l) Proceed to the section for the data disk. Here, you have the option to set up and connect a fresh data disk or link one that’s already in use. For this guide , I will be creating a new data disk.

m) give your data disk a name

n) You can change the size of your data disk by clicking “change size” and clicking the “OK” button.

o) And there it is, your freshly set up data disk, marked within a red rectangle
p) Click on next to networking

q) Leave the networking page in its default state. Go to the management page.

r) for this guide, I will leave the management page on its default state .
r i) click on review and create

s) Once validation is passed, click on the “Create” button.

t) click on go to resource

u i) Your virtual machine has been successfully restored

With the virtual machine back in action, it’s time to inspect our disk configurations.

OS Disk and Data Disk

u ii) To view your disks, select the “Disk” option located towards the centre-left of the screen.

u iii) There are different sections for the OS disk and the data disk, each serving its specific purpose within the virtual machine.

U iv) Additionally, you can verify the disk’s status by looking at the overview, which confirms that the disk is attached to the Virtual Machine.

  • I hope this step-by-step tutorial helped understand how to restore your virtual machine and the method for creating and attaching a data disk. Thank you