Tuesday, April 15, 2025

resize OS disk for Azure VM

Wanted to resize one of our Azure VM OS disks. ChatGPT gave instructions including a manual rescan and expanding of filesystem - 

Rescan Disk: echo 1 | sudo tee /sys/class/block/sda/device/rescan

Expand Filesystem: sudo resize2fs /dev/sda1

But actually, just needed to stop the vm in azure portal, resize in azure portal, then start in azure portal - since it is the OS disk and we're rebooting, the changes are automatically noted.

Microsoft's documentation for Windows VM also notes this, lower down in this page.

No comments:

Post a Comment