レスキューモード環境を通じて提供されるツールによって、さまざまな問題を解決できます。多くの場合、これらの問題は起動の問題を指しますが、root パスワードを忘れるなど、さまざまな種類のものである可能性もあります。レスキュー モードは命の恩人であり、それを理解することは学ぶべき非常に重要なスキルです。したがって、そのようなレシピは手元に置いておくべきだと感じました.
注意 :不適切な使用により、オペレーティング システムが起動できなくなる可能性があるため、ブートローダー コマンドを使用するときは常に注意してください。この投稿では、KVM ゲストをレスキュー モードで起動する手順について説明します。
1. KVM ゲストを停止します。これは重要です。これを行わないと、ゲスト vDisk が破損する可能性があります。
# virsh shutdown [Guest]
2. libguestfs-tools をインストールします。
# yum install libguestfs-tools
3. virt-rescue を使用してレスキュー シェルを開始します。
# virt-rescue -d [Guest]
レスキュー シェルが開始されたときの出力例:
Welcome to virt-rescue, the libguestfs rescue shell. Note: The contents of / (root) are the rescue appliance. You have to mount the guest’s partitions under /sysroot before you can examine them. >fdisk -l Disk /dev/sda: 300 GiB, 322122547200 bytes, 629145600 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x3e094520 Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 2099199 2097152 1G 83 Linux /dev/sda2 2099200 629145599 627046400 299G 8e Linux LVM