Ubuntu VM on Azure suddenly crashed

Manthan Bhavsar 0 Reputation points
2024-09-30T13:07:13.07+00:00

I have an Ubuntu VM that suddenly crashed on 23rd September after a reboot. Initially was having network issues on the same day, the app it was running wasn't receiving requests even though NSG was configured properly so I rebooted the VM from within the OS.

After the reboot, CPU usage was spiked to 100% for an hour, couldn't even SSH to it (Timeout Error) so I rebooted again. It hasn't come up since the first reboot.

When I connect to it using the serial connection the following error shows.

[    1.608320] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    1.611938] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.8.0-1014-azure #16~22.04.1-Ubuntu
[    1.615341] Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS Hyper-V UEFI Release v4.1 05/13/2024
[    1.620301] Call Trace:
[    1.621622]  
[    1.647727] Kernel Offset: 0x17000000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
[    1.674388] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---

I also cannot get to GRUB as serial connection takes too long to reconnect after a restart. I tried ESC and SPACE.

What can I do here to bring it back or at least find out what happened. I must report what caused this crash or corruption. No update command was run before reboot.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,899 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Mohammed Altamash Khan 2,161 Reputation points
    2024-09-30T16:04:24.18+00:00

    The error message indicates that the kernel is unable to find or mount the root filesystem. This can happen due to several reasons, such as a missing or corrupted initramfs, incorrect boot parameters, or issues with the root filesystem itself.

    Here are some steps you can take to troubleshoot and resolve this issue:

    1. Check Boot Parameters:
      • Ensure that the root= parameter in your bootloader configuration (GRUB) points to the correct root partition. You can edit the GRUB menu at boot time to verify this.
      • Example: root=/dev/sda1 or root=UUID=<UUID-of-root-partition>.
    2. Rebuild Initramfs:
      • The initramfs might be missing or corrupted. You can rebuild it using the following command:
        
             sudo update-initramfs -c -k $(uname -r)
        
        
      • This command creates a new initramfs for the currently running kernel.
    3. Check Filesystem:
      • Boot from a live CD/USB and run a filesystem check on the root partition:
        
             sudo fsck /dev/sda1
        
        
      • Replace /dev/sda1 with the appropriate device identifier for your root partition.
    4. Verify Kernel and Initramfs Files:
      • Ensure that the kernel and initramfs files are present in the /boot directory and are not corrupted.
    5. Review GRUB Configuration:
      • Check the /boot/grub/grub.cfg file to ensure that it has the correct entries for your kernel and initramfs.
    6. Kernel Update Issues:
      • If the issue started after a kernel update, you might want to try booting into an older kernel from the GRUB menu.

    These steps should help you diagnose and fix the issue. If the problem persists, you might need to provide more details or consider reaching out to Azure support for further assistance.

    --- If the answer was helpful and resolved your query , Kindly accept the answer ----


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.