If needed remove or upgrade the kernel Example 3 - enable Serial Console Now access the chroot environment again by runningĪll LVs should be visible as mounted partitions Run the lvs command to verify which LVs are available for mounting, every VM, which has been migrated or comes from another Cloud Provider will vary in configuration.Įxit the chroot environment mount the required LV Mount all the Logical Volumes to allow packages to be removed or reinstalled Grub2-mkconfig rebuilds grub.cfg using the versions requiredĪ failed kernel upgrade can render the VM non-bootable. Grub2-set-default is used to change to another kernel Grub2-editenv list displays which kernel will be loaded at next boot The grep command lists the kernels that grub.cfg is aware of. Perform Fixes Example 1 - configure the VM to boot from a different kernelĪ common scenario is to force a VM to boot from a previous kernel as the current installed kernel may have become corrupt or an upgrade did not complete correctly. Troubleshoot VMs in order to fix errors.Įxecute the lsblk command and the /rescue is now / and /rescue/boot is /boot When executing commands in a chroot environment, note they are run against the attached OS Disk and not the local rescue VM.Ĭommands can be used to install, remove and update software. Mount /dev/mapper/rootvg-usrlv /rescue/usr cd /rescueĬhroot: failed to run command ‘/bin/bash’: No such file or directory Gain chroot access, which will enable you to perform various fixes, slight variations exist for each Linux distribution. Verify the file systems of the attached disk are now correctly mounted using the lsblk command Mount the partition that has the Boot flag set on /rescue/boot Proceed to mount this device on the directory /rescue The output of the next command will show the path to mount for the root LV In this example, taking the output from the previous lsblk command rootvg-rootlv is the correct root LV to mount and can be used in the next command. It has the configuration files such as /etc/default/grub Locate the path to mount the Logical Volume that contains the / (root) partition. If not, use the below commands to enable them and rerun lsblk.Įnsure to have the LVMs from the attached disk visible before proceeding. Verify if LVMs from the affected VM are displayed. Run the command lsblk to see the LVMs of the affected VM The * indicates a boot partition, both partitions are to be mounted. Most scenarios, the attached snapshot disk will be seen as /dev/sdc displaying two partitions /dev/sdc1 and /dev/sdc2 Run the fdisk -l command to verify the snapshot disk has been attached and list all devices and partitions available The Source snapshot is the name of the snapshot previously created.Ĭreate a mount point for the attached disk. Elevate privileges and become super user usingĪttach a disk to the rescue VM made from the snapshot taken previously.Īzure portal -> select the rescue VM -> DisksĪssign a name to your new disk, select the same Resource Group as the snapshot, affected VM, and Rescue VM. Use the same region and resource group of the affected VM Connect to the rescue VMĬonnect using ssh into the rescue VM. Usually a rescue VM of the same or similar Operating system version is recommended. The snapshot will then be attached to a rescue VM.įollow instructions here on how to take a snapshot. This troubleshooting guide is of benefit for scenarios where a Linux VM is not booting,ssh is not possible and the underlying file system layout is configured with LVM (Logical Volume Manager).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |