The VM's Agent is not ready

Shunrui Cao 46 Reputation points

How to fix this problem?

When I reboot the Azure linux vm , it can't be connected as agent is not ready.
so when I access to the serial console, I got the message as follow. And I cant use xfs_repair to repair the file because of the super block, also the command such as sudo, btrfs are not able to use too.

[FAILED] Failed to mount /sysroot.
See 'systemctl status sysroot.mount' for details.

and the futher infomation as the follow

:/# systemctl status sysroot.mount
● sysroot.mount - /sysroot
Loaded: loaded (/proc/cmdline; generated)
Active: failed (Result: exit-code) since Wed 2022-09-07 04:52:47 UTC; 22min >
Where: /sysroot
What: /dev/mapper/rootvg-rootlv
Docs: man:fstab(5)
Sep 07 04:52:47 CFlinux84 systemd[1]: Mounting /sysroot...
Sep 07 04:52:47 CFlinux84 mount[764]: mount: /sysroot: can't read superblock on>
Sep 07 04:52:47 CFlinux84 systemd[1]: sysroot.mount: Mount process exited, code>
Sep 07 04:52:47 CFlinux84 systemd[1]: sysroot.mount: Failed with result 'exit-c>
Sep 07 04:52:47 CFlinux84 systemd[1]: Failed to mount /sysroot.

Best rgards

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,254 questions
System Center Virtual Machine Manager
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. JimmySalian-2011 41,926 Reputation points


    It seems some sort of corruption in the Linux VM, you might have to repair the file system to get it back up and running. Was it shutdown abrutly?

    Check this troubleshooting steps: linux-recovery-cannot-start-file-system-errors

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    0 comments No comments

  2. srbhatta-MSFT 8,546 Reputation points Microsoft Employee

    Hello @Shunrui Cao ,
    From this error code, looks like your file system got corrupted. There are many reasons why a filesystem can get corrupted. Some of the reasons are:

    • The system was too busy and I/O intensive but not optimized for such environment
    • The restart procedure could not or did not check (and repair) the file system with inconsistencies before mouting it though found corrupted

    Depending on the extent of filesystem corruption (damage), the filesystem may or may not be repairable. BTRFS offers the ability to scrub and repair corrupt filesystems.

    [!Warning] Using '--repair' can further damage a filesystem instead of helping if it can't fix your particular issue. It is extremely important that you ensure a backup has been created before invoking '--repair'. Please create an snapshot before running the repair command.

    Create a rescue VM and try to mount the root fileystem in /rescue

    mount -o subvol=root /dev/sdc2 /rescue/  

    For this first try scrubbing with btrfs scrub. This will check for data integrity using checksums and will try to recover the damaged data.
    Scrubbing is considered safe and is usually the first thing to try.

    btrfs scrub start /rescue  
    btrfs scrub status /rescue  

    If the above steps do not fix the issue, then please reach back to me and let me know.

    If you find the above information helpful, please select on "Accept as Answer" to increase the relevancy of this post.

    0 comments No comments