Posted on Leave a comment

Azure Linux virtual machine not booting – disk issue

There could be cases that you have not configured the disk correctly inside a Linux azure virtual machine , or the disk mount point to change because of a disk increase. This circumstance will make your virtual machine fail and boot into emergency mode. In order to fix this issue you should first get a terminal windows on the Azure virtual machine as you cannot ssh. This can be done by selecting Help -> Serial Console

By checking the boot logs you can find the issue which in my case is the mounting of the data disk. The data disk is added as an entry on /etc/fstab but the mount point changed and Linux filesystem cannot locate it.

In order to resolve this issue you should mount the disk using the UUID to be 100% sure for the mount point. First locate the disk by using

fdisk -l

After locating the mount point run blkid command to find the UUID of the disk.

blkid

When you find the UUID use it in your /etc/fstab file instead of the mount point as shown below.