Convert hard disk to vhdx

broken image
broken image

First, you need to increase the disk’s size in your vSphere Client or through the CLI. CloudHealth now has automation capabilities for Azure which includes actions such as start, restart, stop and deallocate, and resize virtual machines. Normally for a physical machine with SAN or even SCSI disks, I’d go to /sys/class/scsi_host/ and figure out which adapter the disk I want to resize is sitting on. Then I checked the current disk sdb usage as the following: sfdisk –s | grep sdb /dev/sdb: 1048576. When disk space runs out I poweroff the virtual machine, then enlarge the partition, mount gparted ISO, boot from this ISO, resize the partition, and boot the vm again. Only the compatible shapes appear on the list and then click on change shape. For premium storage it will be field with 3 size options (128GB, 512GB, 1024GB). After some research, I found some great articles including this one on MSDN forums that address this issue with expanding the OS drive.

broken image

Select “Stop” from the VM’s Overview pane. However, if the current hardware hosting your VM does not support the requested new VM size then the operation of Azure resize vm without reboot On the right hand side, under Disk Provisioning increase the Provisioned Size then click OK.

broken image