How to resize an OS disk (Linux or Windows) on ARM

How to resize an OS Disk (Linux or Windows) on ARM

In this article, we will look at how to resize the both the Linux OS Disk and the Windows OS Disk through the Azure Resource Management (ARM). Please download the resizeosdisk.ps1(resizeosdisk) PowerShell script.

Let’s start with the Linux OS Disk resizing steps.

1. Create a new Linux machine on the azure portal or through PowerShell.

If you look at the assigned OS disk size, Azure Linux machine’s default OS disk size is 30GB (/dev/sda1)

l1

2. Run the resizosdisk.ps1 and type your resource group name, VM name and size then wait for the following screen. You will be asked “The VM will be restarted. Are you ready? yes or no:” If you type yes, you can see following login window and type your azure subscription account and password.

l3

l2

3. Check Linux OSdisk size again after ran script

l4

This is how we resize the Linux OS disk.

 

 

Next, let’s look at resizing the Windows OS disk.

1. Identify default OS disk size from created Windows VM.

w1

2. Run the resizosdisk.ps1 which downloaded and type your resource group name, VM name and size then wait for the following screen.  You will be asked “The VM will be restarted. Are you ready? yes or no:”  If you type yes, you can see following login window and type your azure subscription account and password.

l3

w2

3. Check the OS disk size. There is still 127GB from explorer but you can see the extended space which unallocated yet.(run Computer Management )

w3

4. extend volume wizard to extend the OS disk. After extended the disk, you can see OS disk is extended to 512GB which you had applied.

w4

One Response

  1. Sean June 28, 2016 Reply

Leave a Reply