-1

I am trying to follow the instructions in the following article

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

I start the VM by the following command

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

but when I access the VM by VNC Viewer I got the following error message

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

I don't know how to force to boot from CD Rom!!

1 Answers1

0

The tutorial you linked, assumes that your hard drive (or here, your internal SSD) is blank. But your drive is not blank; it contains at least the remnants of a previous Linux installation, and possibly the whole installation. Thus the virtual machine is trying (and failing) to boot from it.

Before trying to install ESXi you should erase the disk's partition table. For example:

wipefs -a /dev/nvme0n1

Now, your KVM command should not find anything on the hard drive and should not try to boot from it. If it still doesn't boot from the CD image, you can add -boot d to the command line to try to force it to boot from the CD image.

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940