Hi Ahmad Ibrahim,
Thanks for reaching out to Microsoft Q&A.
I suspect may be due to the partition table changes not being properly recognized, or a misconfiguration that occurred when you restarted your vm before resizing the filesystem. The easiest way is to attach the OS disk to another vm, resize it and then reattach to the original vm to check if you are able to boot.
- Azure provides a serial console that can help you troubleshoot VMs that are not accessible through SSH
- Go to the Azure portal
- Navigate to your vm and select Serial Console from the Support + Troubleshooting section
- If the VM boots, you can use the serial console to log in and complete the resize operation
- Stop the affected vm & detach the OS disk from the vm
- Attach the OS disk to another healthy Linux vm as a data disk
- SSH into the healthy vm & verify the disk is attached (e.g.,
/dev/sdc
) - Use
fdisk -l
to list the partitions andlsblk
to confirm the new disk is attached - Mount the partition to a directory & resize the filesystem
- Unmount the disk & detach the disk from the healthy VM
- Reattach the disk to the original vm as the OS disk
- Now start the original vm
Please 'Upvote'(Thumbs-up) and 'Accept' as an answer if the reply was helpful. This will benefit other community members who face the same issue.