Azure / repair-script-library

Organize and archive known repair scripts to enable anyone to easily fix their machines. The scripts are made primarily to repair VMs on the cloud.
MIT License
36 stars 37 forks source link

--run-id linux-alar-fki --parameters kernel not working in Ubuntu 18.04 #29

Open divargas-msft opened 2 years ago

divargas-msft commented 2 years ago

I tried to use the linux-alar-fki script with kernel parameter in an ubuntu 18.04 VM and I am getting the following message (this was tested on a freshly created VM from the Portal):

Script returned with error: [Error 02/09/2022 18:00:43] Your OS can not be determined. The OS distros supported are [Error 02/09/2022 18:00:43] CentOS/Redhat 6.8 - 8.2 [Error 02/09/2022 18:00:43] Ubuntu 16.4 LTS and Ubuntu 18.4 LTS [Error 02/09/2022 18:00:43] Suse 12 and 15 [Error 02/09/2022 18:00:43] Debain 9 and 10 [Error 02/09/2022 18:00:43] ALAR will stop! [Error 02/09/2022 18:00:43] If your OS is in the above list please report this issue at https://github.com/azure/repair-script-library/issues [Error 02/09/2022 18:00:43]

malachma commented 2 years ago

Instead of "linux-alar-fki" could you please try out with the new alar2 version please --> linux-alar2 the new version contains a couple of fixes.

divargas-msft commented 2 years ago

Thanks, I just tested this one using linux-alar2 Ubuntu 18.04 and RHEL 7.9. It didn't give me the above error anymore but this other one:

Script returned with error:
[Error 02/09/2022 19:02:46]E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?

I tried again, and I didn't get that error, but I executed the restore option and the VM booted using the same kernel, not the previous one (in both cases)

Output of the execution in Ubuntu 18.04:

 az vm repair run -g myRG -n 3rdbreakUbuntu1804 --run-id linux-alar2 --parameters kernel --run-on-repair --verbose
Searching for repair-vm within subscription...
Found repair VM: /subscriptions/xxxxxxxx/resourceGroups/repair-3rdbreakUbuntu1804-20220209191630/providers/Microsoft.Compute/virtualMachines/repair-3rdbrea_

Running script on repair VM: repair-3rdbrea_
Log file is too large and has been cutoff at the start of file. Please locate the log file within the repair VM using the logFullpath to check full logs.

Script returned with output:
[Output 02/09/2022 19:19:46]Starting the recovery [Info 2022-02-09 19:19:46.972639205 UTC] We have the following partitions determined: ["1 227328 62916574 29.9 GiB 8300 ", "14 2048 10239 4.0 MiB EF02 ", "15 10240 227327 106.0 MiB EF00 "] [Info 2022-02-09 19:19:46.976966139 UTC] Ade is enabled : false [Info 2022-02-09 19:19:46.976991639 UTC] This could be a recent Ubuntu 16.x or 18.x image.Or a RedHat with RAW partitions [Info 2022-02-09 19:19:47.130318117 UTC] /dev/sdc1 [Info 2022-02-09 19:19:47.130358617 UTC] fsck for ext4 cloudimg-rootfs: recovering journal cloudimg-rootfs: clean, 113649/3870720 files, 747402/7836155 blocks [Info 2022-02-09 19:19:47.491845884 UTC] File system check finished [Info 2022-02-09 19:19:47.666074918 UTC] fsck for vfat fsck.fat 4.1 (2017-01-24) 0x41: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt. Automatically removing dirty bit. Performing changes. /dev/sdc15: 11 files, 8921/213716 clusters [Info 2022-02-09 19:19:47.747419241 UTC] File system check finished [Info 2022-02-09 19:19:47.863666931 UTC] mounted /dev/sdc1 to /tmp/assert [Info 2022-02-09 19:19:47.941770129 UTC] Pretty Name is : "Ubuntu 18.04.6LTS" [Info 2022-02-09 19:19:48.033067624 UTC] mounted /dev/sdc1 to /tmp/assert [Info 2022-02-09 19:19:48.104868563 UTC] Pretty Name is : "Ubuntu 18.04.6 LTS" [Info 2022-02-09 19:19:48.104905263 UTC] Pretty Name is : "Ubuntu 18.04.6 LTS" [Info 2022-02-09 19:19:48.174984390 UTC] mounted /dev/sdc1 to /srv/rescue-root/ [Info 2022-02-09 19:19:48.247004531 UTC] mounted /dev/sdc15 to /srv/rescue-root/boot/efi Directory /tmp/action_implementation can not be removed : 'No such file or directory (os error 2)' The current dir is : /var/lib/waagent/run-command/download/1/repair-files-20220209191931/repair-script-library/Azure-repair-script-library-cae6187/src/linux/common/helpers/alar2 [Info 2022-02-09 19:19:48.268209291 UTC] ----- Start action ----- [Info 2022-02-09 19:19:49.865765676 UTC] ----- Action stopped -----
[Output 02/09/2022 19:19:49]Recovery script finished

{
  "log_full_path": "/var/lib/waagent/run-command/download/1/repair-files-20220209191931/logs-20220209191931.txt",
  "logs": "ected package libllvm6.0:amd64.\r Preparing to unpack .../04-libllvm6.0_1%3a6.0-1ubuntu2_amd64.deb ...\r Unpacking libllvm6.0:amd64 (1:6.0-1ubuntu2) ...\r Selecting previously unselected package libclang1-6.0:amd64.\r Preparing to unpack .../05-libclang1-6.0_1%3a6.0-1ubuntu2_amd64.deb ...\r Unpacking libclang1-6.0:amd64 (1:6.0-1ubuntu2) ...\r Selecting previously unselected package lib32gcc1.\r Preparing to unpack .../06-lib32gcc1_1%3a8.4.0-1ubuntu1~18.04_amd64.deb ...\r Unpacking lib32gcc1 (1:8.4.0-1ubuntu1~18.04) ...\r Selecting previously unselected package lib32stdc++6.\r Preparing to unpack .../07-lib32stdc++6_8.4.0-1ubuntu1~18.04_amd64.deb ...\r Unpacking lib32stdc++6 (8.4.0-1ubuntu1~18.04) ...\r Selecting previously unselected package libclang-common-6.0-dev.\r Preparing to unpack .../08-libclang-common-6.0-dev_1%3a6.0-1ubuntu2_amd64.deb ...\r Unpacking libclang-common-6.0-dev (1:6.0-1ubuntu2) ...\r Selecting previously unselected package libclang-6.0-dev.\r Preparing to unpack .../09-libclang-6.0-dev_1%3a6.0-1ubuntu2_amd64.deb ...\r Unpacking libclang-6.0-dev (1:6.0-1ubuntu2) ...\r Selecting previously unselected package libclang-dev.\r Preparing to unpack .../10-libclang-dev_1%3a6.0-41~exp5~ubuntu1_amd64.deb ...\r Unpacking libclang-dev (1:6.0-41~exp5~ubuntu1) ...\r Setting up libllvm6.0:amd64 (1:6.0-1ubuntu2) ...\r Setting up libgc1c2:amd64 (1:7.4.2-8ubuntu1) ...\r Setting up libclang1-6.0:amd64 (1:6.0-1ubuntu2) ...\r Setting up libc6-i386 (2.27-3ubuntu1.4) ...\r Setting up lib32gcc1 (1:8.4.0-1ubuntu1~18.04) ...\r Setting up libobjc4:amd64 (8.4.0-1ubuntu1~18.04) ...\r Setting up libobjc-7-dev:amd64 (7.5.0-3ubuntu1~18.04) ...\r Setting up lib32stdc++6 (8.4.0-1ubuntu1~18.04) ...\r Setting up libclang-common-6.0-dev (1:6.0-1ubuntu2) ...\r Setting up libclang-6.0-dev (1:6.0-1ubuntu2) ...\r Setting up libclang-dev (1:6.0-41~exp5~ubuntu1) ...\r Processing triggers for libc-bin (2.27-3ubuntu1.4) ...\r [Output 02/09/2022 19:19:46]Starting the recovery [Info 2022-02-09 19:19:46.972639205 UTC] We have the following partitions determined: [\"1 227328 62916574 29.9 GiB 8300 \", \"14 2048 10239 4.0 MiB EF02 \", \"15 10240 227327 106.0 MiB EF00 \"] [Info 2022-02-09 19:19:46.976966139 UTC] Ade is enabled : false [Info 2022-02-09 19:19:46.976991639 UTC] This could be a recent Ubuntu 16.x or 18.x image. Or a RedHat with RAW partitions [Info 2022-02-09 19:19:47.130318117 UTC] /dev/sdc1 [Info 2022-02-09 19:19:47.130358617 UTC] fsck for ext4 cloudimg-rootfs: recovering journal cloudimg-rootfs: clean, 113649/3870720 files, 747402/7836155 blocks [Info 2022-02-09 19:19:47.491845884 UTC] File system check finished [Info 2022-02-09 19:19:47.666074918 UTC] fsck for vfat fsck.fat 4.1 (2017-01-24) 0x41: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt. Automatically removing dirty bit. Performing changes. /dev/sdc15: 11 files, 8921/213716 clusters [Info 2022-02-09 19:19:47.747419241 UTC] File system check finished [Info 2022-02-09 19:19:47.863666931 UTC] mounted /dev/sdc1 to /tmp/assert [Info 2022-02-09 19:19:47.941770129 UTC] Pretty Name is : \"Ubuntu 18.04.6 LTS\" [Info 2022-02-09 19:19:48.033067624 UTC] mounted /dev/sdc1 to /tmp/assert [Info 2022-02-09 19:19:48.104868563 UTC] Pretty Name is : \"Ubuntu 18.04.6 LTS\" [Info 2022-02-09 19:19:48.104905263 UTC] Pretty Name is : \"Ubuntu 18.04.6 LTS\" [Info 2022-02-09 19:19:48.174984390 UTC] mounted /dev/sdc1 to /srv/rescue-root/ [Info 2022-02-09 19:19:48.247004531 UTC] mounted /dev/sdc15 to /srv/rescue-root/boot/efi Directory /tmp/action_implementation can not be removed : 'No such file or directory (os error 2)' The current dir is : /var/lib/waagent/run-command/download/1/repair-files-20220209191931/repair-script-library/Azure-repair-script-library-cae6187/src/linux/common/helpers/alar2 [Info 2022-02-09 19:19:48.268209291 UTC] ----- Start action ----- [Info 2022-02-09 19:19:49.865765676 UTC] ----- Action stopped ----- [Output 02/09/2022 19:19:49]Recovery script finished [STATUS]::SUCCESS [Log-End 02/09/2022 19:19:49]/var/lib/waagent/run-command/download/1/repair-files-20220209191931/logs-20220209191931.txt",
  "message": "Script completed succesfully.",
  "output": "[Output 02/09/2022 19:19:46]Starting the recovery [Info 2022-02-09 19:19:46.972639205 UTC] We have the following partitions determined: [\"1 227328 62916574 29.9 GiB 8300 \", \"14 2048 10239 4.0 MiB EF02 \", \"15 10240 227327 106.0 MiB EF00 \"] [Info 2022-02-09 19:19:46.976966139 UTC] Ade is enabled : false [Info 2022-02-09 19:19:46.976991639 UTC] This could be a recent Ubuntu 16.x or 18.x image. Or a RedHat with RAW partitions [Info 2022-02-09 19:19:47.130318117 UTC] /dev/sdc1 [Info 2022-02-09 19:19:47.130358617 UTC] fsck for ext4 cloudimg-rootfs: recovering journal cloudimg-rootfs: clean, 113649/3870720 files, 747402/7836155 blocks [Info 2022-02-09 19:19:47.491845884 UTC] File system check finished [Info 2022-02-09 19:19:47.666074918 UTC] fsck for vfat fsck.fat 4.1 (2017-01-24) 0x41: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt. Automatically removing dirty bit. Performing changes. /dev/sdc15: 11 files, 8921/213716 clusters[Info 2022-02-09 19:19:47.747419241 UTC] File system check finished [Info 2022-02-09 19:19:47.863666931 UTC] mounted /dev/sdc1 to /tmp/assert [Info 2022-02-09 19:19:47.941770129 UTC] Pretty Name is : \"Ubuntu 18.04.6 LTS\" [Info 2022-02-09 19:19:48.033067624 UTC] mounted /dev/sdc1 to /tmp/assert [Info 2022-02-09 19:19:48.104868563 UTC] Pretty Name is : \"Ubuntu 18.04.6 LTS\" [Info 2022-02-09 19:19:48.104905263 UTC] Pretty Name is : \"Ubuntu 18.04.6 LTS\" [Info 2022-02-09 19:19:48.174984390 UTC] mounted /dev/sdc1 to /srv/rescue-root/ [Info 2022-02-09 19:19:48.247004531 UTC] mounted /dev/sdc15 to /srv/rescue-root/boot/efi Directory /tmp/action_implementation can not be removed : 'No such file or directory (os error 2)' The current dir is : /var/lib/waagent/run-command/download/1/repair-files-20220209191931/repair-script-library/Azure-repair-script-library-cae6187/src/linux/common/helpers/alar2 [Info 2022-02-09 19:19:48.268209291 UTC] ----- Start action ----- [Info 2022-02-09 19:19:49.865765676 UTC] ----- Action stopped ----- \n[Output 02/09/2022 19:19:49]Recovery script finished ",
  "resource_group": "repair-3rdbreakUbuntu1804-20220209191630",
  "script_status": "SUCCESS",
  "status": "SUCCESS",
  "vm_name": "repair-3rdbrea_"
}

Output of the execution in RHEL 7.9:

az vm repair run -g myRG -n breakrhel79 --run-id linux-alar2 --parameters kernel --run-on-repair --verbose
Searching for repair-vm within subscription...
Found repair VM: /subscriptions/xxxxxxx/resourceGroups/repair-breakrhel79-20220209192122/providers/Microsoft.Compute/virtualMachines/repair-breakrh_

Running script on repair VM: repair-breakrh_
Log file is too large and has been cutoff at the start of file. Please locate the log file within the repair VM using the logFullpath to check full logs.

Script returned with output:
[Output 02/09/2022 19:24:30]Starting the recovery [Info 2022-02-09 19:24:30.328848068 UTC] We have the following partitions determined: ["1 2048 1026047 500.0 MiB EF00 EFI System Partition", "2 1026048 2050047 500.0 MiB 0700 ", "3 2050048 2054143 2.0 MiB EF02 ", "4 2054144 134215679 63.0 GiB 8E00 "] [Info 2022-02-09 19:24:30.334700819 UTC] Ade is enabled : false [Info 2022-02-09 19:24:30.334735220 UTC] This is a recent RedHat or CentOS image with 4 partitions and LVM signature [Info 2022-02-09 19:24:31.352501751 UTC] fsck for LVM2_member [Info 2022-02-09 19:24:31.352764553 UTC] File system check finished [Info 2022-02-09 19:24:31.352784453 UTC] fsck for XFS on /dev/sdc2 [Info 2022-02-09 19:24:32.973948330 UTC] mounted /dev/sdc2 to /tmp/assert [Info 2022-02-09 19:24:34.018300895 UTC] File system check finished [Info 2022-02-09 19:24:34.018370695 UTC] fsck for vfat fsck.fat 4.1 (2017-01-24) 0x25: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt. Automatically removing dirty bit. Performing changes. /dev/sdc1: 17 files, 1267/63965 clusters [Info 2022-02-09 19:24:34.159344822 UTC] File system check finished [Info 2022-02-09 19:24:34.201403858 UTC] LVM Details 'LVMDetails { lvm_root_part: "/dev/rootvg/rootlv", lvm_usr_part: "/dev/rootvg/usrlv", lvm_var_part: "/dev/rootvg/varlv" }' [Info 2022-02-09 19:24:36.462705855 UTC] mounted /dev/rootvg/rootlv to /tmp/assert [Info 2022-02-09 19:24:36.489079656 UTC] Pretty Name is : "Red Hat Enterprise Linux Server 7.9 (Maipo)" [Info 2022-02-09 19:24:36.489108656 UTC] Pretty Name is : "Red Hat Enterprise Linux Server 7.9 (Maipo)" [Info 2022-02-09 19:24:37.606572141 UTC] mounted /dev/rootvg/rootlv to /srv/rescue-root/ [Info 2022-02-09 19:24:39.045253922 UTC] mounted /dev/rootvg/usrlv to /srv/rescue-root/usr [Info 2022-02-09 19:24:40.053924138 UTC] mounted /dev/rootvg/varlv to /srv/rescue-root/var [Info 2022-02-09 19:24:40.906413614 UTC] mounted /dev/sdc2 to /srv/rescue-root/boot [Info 2022-02-09 19:24:41.591137837 UTC] mounted /dev/sdc1 to /srv/rescue-root/boot/efi Directory /tmp/action_implementation can not be removed : 'No such file or directory (os error 2)' The current dir is : /var/lib/waagent/run-command/download/1/repair-files-20220209192414/repair-script-library/Azure-repair-script-library-cae6187/src/linux/common/helpers/alar2 [Info 2022-02-09 19:24:41.611819576 UTC] ----- Start action ----- Loaded plugins: langpacks, product-id, search-disabled-repos Resolving Dependencies --> Running transaction check ---> Package patch.x86_64 0:2.7.1-12.el7_7 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: patch x86_64 2.7.1-12.el7_7 rhui-rhel-7-server-rhui-rpms 111 k Transaction Summary ================================================================================ Install 1 Package Total download size: 111 k Installed size: 210 k Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : patch-2.7.1-12.el7_7.x86_64 1/1 Verifying : patch-2.7.1-12.el7_7.x86_64 1/1 Installed: patch.x86_64 0:2.7.1-12.el7_7 Complete! [Info 2022-02-09 19:27:47.143874286 UTC] ----- Action stopped -----
[Output 02/09/2022 19:27:47]Recovery script finished

{
  "log_full_path": "/var/lib/waagent/run-command/download/1/repair-files-20220209192414/logs-20220209192414.txt",
  "logs": " (1:6.0-1ubuntu2) ...\r Setting up libc6-i386 (2.27-3ubuntu1.4) ...\r Setting up lib32gcc1 (1:8.4.0-1ubuntu1~18.04) ...\r Setting up libobjc4:amd64 (8.4.0-1ubuntu1~18.04) ...\r Setting up libobjc-7-dev:amd64 (7.5.0-3ubuntu1~18.04) ...\r Setting up lib32stdc++6 (8.4.0-1ubuntu1~18.04) ...\r Setting up libclang-common-6.0-dev (1:6.0-1ubuntu2) ...\r Setting up libclang-6.0-dev (1:6.0-1ubuntu2) ...\r Setting up libclang-dev (1:6.0-41~exp5~ubuntu1) ...\r Processing triggers for libc-bin (2.27-3ubuntu1.4) ...\r [Output 02/09/2022 19:24:30]Starting the recovery [Info 2022-02-09 19:24:30.328848068 UTC] We have the following partitions determined: [\"1 2048 1026047 500.0 MiB EF00 EFI System Partition\", \"2 1026048 2050047 500.0 MiB 0700 \", \"3 2050048 2054143 2.0 MiB EF02 \", \"4 2054144 134215679 63.0 GiB 8E00 \"] [Info 2022-02-09 19:24:30.334700819 UTC] Ade is enabled : false [Info 2022-02-09 19:24:30.334735220 UTC] This is a recent RedHat or CentOS image with 4 partitions and LVM signature [Info 2022-02-09 19:24:31.352501751 UTC] fsck for LVM2_member [Info 2022-02-09 19:24:31.352764553 UTC] File system check finished [Info 2022-02-09 19:24:31.352784453 UTC]fsck for XFS on /dev/sdc2 [Info 2022-02-09 19:24:32.973948330 UTC] mounted /dev/sdc2 to /tmp/assert [Info 2022-02-09 19:24:34.018300895 UTC] File system check finished [Info 2022-02-09 19:24:34.018370695 UTC] fsck for vfat fsck.fat 4.1 (2017-01-24) 0x25: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt. Automatically removing dirty bit. Performing changes. /dev/sdc1: 17 files, 1267/63965 clusters [Info 2022-02-09 19:24:34.159344822 UTC] File system check finished [Info 2022-02-09 19:24:34.201403858 UTC] LVM Details 'LVMDetails { lvm_root_part: \"/dev/rootvg/rootlv\", lvm_usr_part: \"/dev/rootvg/usrlv\", lvm_var_part: \"/dev/rootvg/varlv\" }' [Info 2022-02-09 19:24:36.462705855 UTC] mounted /dev/rootvg/rootlv to /tmp/assert [Info 2022-02-09 19:24:36.489079656 UTC] Pretty Name is : \"Red Hat Enterprise Linux Server 7.9 (Maipo)\" [Info 2022-02-09 19:24:36.489108656 UTC] Pretty Name is : \"Red Hat Enterprise Linux Server 7.9 (Maipo)\" [Info 2022-02-09 19:24:37.606572141 UTC] mounted /dev/rootvg/rootlv to /srv/rescue-root/ [Info 2022-02-09 19:24:39.045253922 UTC] mounted /dev/rootvg/usrlv to /srv/rescue-root/usr [Info 2022-02-09 19:24:40.053924138 UTC] mounted /dev/rootvg/varlv to /srv/rescue-root/var [Info 2022-02-09 19:24:40.906413614 UTC] mounted /dev/sdc2 to /srv/rescue-root/boot [Info 2022-02-09 19:24:41.591137837 UTC] mounted /dev/sdc1 to /srv/rescue-root/boot/efi Directory /tmp/action_implementation can not be removed : 'No such file or directory (os error 2)' The current dir is : /var/lib/waagent/run-command/download/1/repair-files-20220209192414/repair-script-library/Azure-repair-script-library-cae6187/src/linux/common/helpers/alar2 [Info 2022-02-09 19:24:41.611819576 UTC] ----- Start action ----- Loaded plugins: langpacks, product-id, search-disabled-repos Resolving Dependencies --> Running transaction check ---> Package patch.x86_64 0:2.7.1-12.el7_7 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: patch x86_64 2.7.1-12.el7_7 rhui-rhel-7-server-rhui-rpms 111 k Transaction Summary ================================================================================ Install 1 Package Total download size: 111 k Installed size: 210 k Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : patch-2.7.1-12.el7_7.x86_64 1/1 Verifying : patch-2.7.1-12.el7_7.x86_64 1/1 Installed: patch.x86_64 0:2.7.1-12.el7_7 Complete! [Info 2022-02-09 19:27:47.143874286 UTC] ----- Action stopped ----- [Output 02/09/2022 19:27:47]Recovery script finished [STATUS]::SUCCESS [Log-End 02/09/2022 19:27:47]/var/lib/waagent/run-command/download/1/repair-files-20220209192414/logs-20220209192414.txt",
  "message": "Script completed succesfully.",
  "output": "[Output 02/09/2022 19:24:30]Starting the recovery [Info 2022-02-09 19:24:30.328848068 UTC] We have the following partitions determined: [\"1 2048 1026047 500.0 MiB EF00 EFI System Partition\", \"2 1026048 2050047 500.0 MiB 0700 \", \"3 2050048 2054143 2.0 MiB EF02 \", \"4 2054144 134215679 63.0 GiB 8E00 \"] [Info 2022-02-09 19:24:30.334700819 UTC] Ade is enabled : false [Info 2022-02-09 19:24:30.334735220 UTC] This is a recent RedHat or CentOS image with 4 partitions and LVM signature [Info 2022-02-09 19:24:31.352501751 UTC] fsck for LVM2_member [Info 2022-02-09 19:24:31.352764553 UTC] File system check finished [Info 2022-02-09 19:24:31.352784453 UTC] fsck for XFS on /dev/sdc2 [Info 2022-02-09 19:24:32.973948330 UTC] mounted /dev/sdc2 to /tmp/assert [Info 2022-02-09 19:24:34.018300895 UTC] File system check finished [Info 2022-02-09 19:24:34.018370695 UTC] fsck for vfat fsck.fat 4.1 (2017-01-24) 0x25: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt. Automatically removing dirty bit. Performing changes. /dev/sdc1: 17 files, 1267/63965 clusters [Info 2022-02-09 19:24:34.159344822 UTC] File system check finished [Info 2022-02-09 19:24:34.201403858 UTC] LVM Details 'LVMDetails { lvm_root_part: \"/dev/rootvg/rootlv\", lvm_usr_part: \"/dev/rootvg/usrlv\", lvm_var_part: \"/dev/rootvg/varlv\" }' [Info 2022-02-09 19:24:36.462705855 UTC] mounted /dev/rootvg/rootlv to /tmp/assert [Info 2022-02-09 19:24:36.489079656 UTC] Pretty Name is : \"Red Hat Enterprise Linux Server 7.9 (Maipo)\" [Info 2022-02-09 19:24:36.489108656 UTC] Pretty Name is : \"Red Hat Enterprise Linux Server 7.9 (Maipo)\" [Info 2022-02-09 19:24:37.606572141 UTC] mounted /dev/rootvg/rootlv to /srv/rescue-root/ [Info 2022-02-09 19:24:39.045253922 UTC] mounted /dev/rootvg/usrlv to /srv/rescue-root/usr [Info 2022-02-09 19:24:40.053924138 UTC] mounted /dev/rootvg/varlv to /srv/rescue-root/var [Info 2022-02-09 19:24:40.906413614 UTC] mounted /dev/sdc2 to /srv/rescue-root/boot [Info 2022-02-09 19:24:41.591137837 UTC] mounted /dev/sdc1 to /srv/rescue-root/boot/efi Directory /tmp/action_implementation can not be removed : 'No such file or directory (os error 2)' The current dir is : /var/lib/waagent/run-command/download/1/repair-files-20220209192414/repair-script-library/Azure-repair-script-library-cae6187/src/linux/common/helpers/alar2 [Info 2022-02-09 19:24:41.611819576 UTC] ----- Start action ----- Loaded plugins: langpacks, product-id, search-disabled-repos Resolving Dependencies --> Running transaction check ---> Package patch.x86_64 0:2.7.1-12.el7_7 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: patch x86_64 2.7.1-12.el7_7 rhui-rhel-7-server-rhui-rpms 111 k Transaction Summary ================================================================================ Install 1 Package Total download size: 111 k Installed size: 210 k Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : patch-2.7.1-12.el7_7.x86_64 1/1 Verifying : patch-2.7.1-12.el7_7.x86_64 1/1 Installed: patch.x86_64 0:2.7.1-12.el7_7 Complete! [Info 2022-02-09 19:27:47.143874286 UTC] ----- Action stopped ----- \n[Output 02/09/2022 19:27:47]Recovery script finished ",
  "resource_group": "repair-breakrhel79-20220209192122",
  "script_status": "SUCCESS",
  "status": "SUCCESS",
  "vm_name": "repair-breakrh_"
}

In both cases the default kernel was not changed to the previous one:

[root@breakrhel79 ~]# uname -a
Linux breakrhel79 3.10.0-1160.53.1.el7.x86_64 #1 SMP Thu Dec 16 10:19:28 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
[root@breakrhel79 ~]# ll /boot
total 89616
-rw-r--r--. 1 root root   153562 Feb 18  2020 config-3.10.0-1127.el7.x86_64
-rw-r--r--. 1 root root   153596 Dec 16 10:39 config-3.10.0-1160.53.1.el7.x86_64
drwx------. 3 root root    16384 Jan  1  1970 efi
drwx------. 5 root root      101 Feb  9 19:27 grub2
-rw-------. 1 root root 21420443 Feb  9 18:18 initramfs-3.10.0-1127.el7.x86_64.img
-rw-------. 1 root root 13534731 Feb  9 18:13 initramfs-3.10.0-1127.el7.x86_64kdump.img
-rw-------. 1 root root 21422012 Feb  9 18:17 initramfs-3.10.0-1160.53.1.el7.x86_64.img
-rw-------. 1 root root 13631547 Feb  9 18:59 initramfs-3.10.0-1160.53.1.el7.x86_64kdump.img
-rw-r--r--. 1 root root   320512 Feb 18  2020 symvers-3.10.0-1127.el7.x86_64.gz
-rw-r--r--. 1 root root   320671 Dec 16 10:39 symvers-3.10.0-1160.53.1.el7.x86_64.gz
-rw-------. 1 root root  3611662 Feb 18  2020 System.map-3.10.0-1127.el7.x86_64
-rw-------. 1 root root  3620596 Dec 16 10:39 System.map-3.10.0-1160.53.1.el7.x86_64
-rwxr-xr-x. 1 root root  6762800 Feb 18  2020 vmlinuz-3.10.0-1127.el7.x86_64
-rwxr-xr-x. 1 root root  6773592 Dec 16 10:39 vmlinuz-3.10.0-1160.53.1.el7.x86_64

root@3rdbreakUbuntu1804:~# uname -a
Linux 3rdbreakUbuntu1804 5.4.0-1068-azure #71~18.04.1-Ubuntu SMP Thu Jan 20 08:21:40 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
root@3rdbreakUbuntu1804:~# ll /boot
total 88121
drwxr-xr-x  4 root root     4096 Feb  9 19:15 ./
drwxr-xr-x 23 root root     4096 Feb  9 19:22 ../
-rw-------  1 root root  4327563 Jan 13 19:02 System.map-5.4.0-1067-azure
-rw-------  1 root root  4327904 Jan 20 08:01 System.map-5.4.0-1068-azure
-rw-r--r--  1 root root   154771 Jan 13 19:02 config-5.4.0-1067-azure
-rw-r--r--  1 root root   154771 Jan 20 08:01 config-5.4.0-1068-azure
drwx------  3 root root      512 Jan  1  1970 efi/
drwxr-xr-x  6 root root     4096 Feb  9 19:15 grub/
-rw-r--r--  1 root root 30300667 Jan 18 19:38 initrd.img-5.4.0-1067-azure
-rw-r--r--  1 root root 30300237 Feb  9 19:15 initrd.img-5.4.0-1068-azure
-rw-------  1 root root 10321664 Jan 13 19:06 vmlinuz-5.4.0-1067-azure
-rw-------  1 root root 10325760 Jan 20 08:12 vmlinuz-5.4.0-1068-azure
root@3rdbreakUbuntu1804:~#
malachma commented 2 years ago

Could you please provide me the content of /etc/default/grub from the redhat one? It could be that one property is missing (GRUB_DEFAULT) I saw it missing on a RedHat 8.2

malachma commented 2 years ago

Issue fixed. #29 can be closed