从 cdrom 启动 !! kvm -machine pc-i440fx-2.1

从 cdrom 启动 !! kvm -machine pc-i440fx-2.1

我正在尝试按照以下文章中的说明进行操作

https://docs.j7k6.org/vmware-esxi-hetzner-install-kvm-linux/

我通过以下命令启动虚拟机

kvm -machine pc-i440fx-2.1 \
  -cpu host \
  -smp cpus=2 \
  -m 4096 \
  -hda /dev/nvme0n1 \
  -cdrom VMware-VMvisor-Installer-7.0b-16324942.x86_64.iso \
  -vnc :1

WARNING: Image format was not specified for '/dev/nvme0n1' and probing guessed raw.
         Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
         Specify the 'raw' format explicitly to remove the restrictions.
qemu-system-x86_64: warning: Unknown firmware file in legacy mode: etc/msr_feature_control

但是当我通过 VNC Viewer 访问虚拟机时收到以下错误消息

Booting from Hard Disk...
error: no such partition.
Entering rescue mode...
grub rescue>

我不知道如何强制从 CD Rom 启动!!

答案1

您链接的教程假设您的硬盘(或此处的内置 SSD)是空白的。但您的驱动器并非空白;它至少包含先前 Linux 安装的残留,甚至可能是整个安装。因此,虚拟机正在尝试(但失败了)从该驱动器启动。

在尝试安装 ESXi 之前,您应该清除磁盘的分区表。例如:

wipefs -a /dev/nvme0n1

现在,您的 KVM 命令应该不会在硬盘上找到任何东西,也不会尝试从硬盘启动。如果它仍然无法从 CD 映像启动,您可以添加-boot d到命令行以尝试强制它从 CD 映像启动。

相关内容