virtual machine kernel boot repair
Failure Reason: Business feedback after a machine restarts, I can't log in. The AWS Platform Foundation Cloud VNC looked down, see the kernel error, the original business did a kernel upgrade operation. The upgraded kernel is not suitable for this system. Need to adjust back to the original kernel boot.
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M02/89/BC/wKiom1ga_U2jiDRrAAE9uiWs-ZQ457.png-wh_500x0-wm_3 -wmp_4-s_3198401735.png "title=" {4ea4c702-b25f-4ed6-8772-cd42c1ee1da5}.png "alt=" Wkiom1ga_ U2jidrraae9uiws-zq457.png-wh_50 "/>
1: Confirm which machine, the current instance of the fault machine is confirmed: i-23c0f47e . Virsh list to see if it is powered on, if it is turned on first.
[Email protected]_234_107 ~]# Virsh List
Id Name State
----------------------------------
0 Domain-0 Running
Ten I-10D7FDD5 no State
2: Our platform is a sub-machine disk made of logical volume
[Email protected]_234_107 ~]# LVS
LV VG Attr lsize Origin snap% Move Log copy% Convert
I-10d7fdd5.extend.file Vg_bc_local-wi-ao 89.01g
i-10d7fdd5.instance Vg_bc_local-wi-ao 18.00g
I-23c0f47e.extend.file vg_bc_local-wi-a-140.01g
i-23c0f47e.instance vg_bc_local-wi-a-18.00g
3:kpartx untie the disk and mount the first disc because the first block is the machine's/partition, mounted to the/MNT
[[Email protected]_234_107~]# kpartx-av/dev/mapper/vg_bc_local-i--23c0f47e.instance
[Email protected]_234_107 ~]# mount/dev/mapper/vg_bc_local-i--23c0f47e.instance1/mnt/
4: Make a backup before making a change, form a good habit
[Email protected]_234_107 ~]# cp/mnt/boot/grub/grub.conf/tmp/.
5: Remove the incorrect boot dd, or adjust the boot
[Email protected]_234_107 ~]# vim/mnt/boot/grub/grub.conf
Since the kernel and version are customized by the company, it is not for everyone to see, modify the correct guidance can be.
6: Restore the disk after modification, start the virtual machine
[Email protected]_234_107 ~]# kpartx-dv/dev/mapper/vg_bc_local-i--23c0f47e.instance
[[Email protected]_234_107 ~]# Virsh Create (startup script)
To summarize:
If you are a physical opportunity to this kind of problem, the incoming single user adjusts
If your virtual machine disk is using a hard disk partition, use Losetup
Operation is very simple, need to according to their own structure of the different, can be changed under
Virtual Machine kernel Boot repair