遇一山,过一山,处处有风景;只要勇敢向前,一路尽是繁花盛开。 | (点击查看→)【测试干货】python/java自动化、持续集成、性能、测开、简历、笔试面试等

k8s虚拟机未关闭,电脑重启后,虚拟机无法启动

问题

windows自动更新后,把电脑重启了,

虚拟机非正常关闭再次打连不上,心里真的是一万匹草泥马,显示如下:

Generating "/run/initramfs/rdsosreport.txt"
Entering emergency mode. Exit the shell to continue.
Type "journaletl” to view system logs.
You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick or /boot
after mounting them and attach it to a bug report.

 

 

输入journalctl后查看日志,输入G定位到文末

 

方案

需要修复/dev/dm-0,dm-0是centos-root的软连接

执行:

xfs_repair /dev/dm-0
reboot

 

如果提示需要加-L参数,就加:-L 选项指定强制日志清零,强制xfs_repair将日志归零:xfs_repair -L /dev/dm-0

然后输入reboot

 

如果执行后报如下错

xfs_repair: cannot open /dev/dm-0: Device or resource busy

 

 

输入:journalctl查看日志

 

 

 

提示:Unmount and run xfs_repair,也就是先umount,再执行 xfs_repair 命令

执行下面3步:

umount /dev/mapper/centos_k8s--master01-root

 

xfs_repair -v -L /dev/mapper/centos_k8s--master01-root,-L 选项指定强制日志清零,强制xfs_repair将日志归零,即使它包含脏数据(元数据更改)。

 

reboot

 

最后解决,赶紧把里面的实践资料备个份

 

但是k8s集群仍然不可用

The connection to the server 192.168.117.161:6443 was refused - did you specify the right host or port?

https://www.cnblogs.com/uncleyong/p/16585956.html

 

参考:https://blog.csdn.net/qq_45547688/article/details/125164941

原文:https://www.cnblogs.com/uncleyong/p/15766921.html

 

posted @ 2022-01-05 18:07  全栈测试笔记  阅读(668)  评论(0编辑  收藏  举报
浏览器标题切换
浏览器标题切换end