macOS-Simple-KVM icon indicating copy to clipboard operation
macOS-Simple-KVM copied to clipboard

No bootable device.

Open MiskolcziRichard opened this issue 3 years ago • 2 comments

Upon launching the basic.sh script, QEMU starts up but does not find any bootloaders. Output containing errors:

Boot failed: could not read the boot disk

Booting from DVD/CD...
Boot failed: Could not read from CDROM (code 0003)
[...]
Nothing to boot: No such file or directory (http://ipxe.org/2d03e13b)
No more network devices

Booting from Floppy...
Boot failed: could not read the boot disk

No bootable device.

I have created a 64G qcow2 disk called MyDisk.qcow2 and referred to it in the basic.sh script as per the README.

Here's my basic.sh:

#!/bin/bash

OSK="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
VMDIR=$PWD
OVMF=$VMDIR/firmware
#export QEMU_AUDIO_DRV=pa
#QEMU_AUDIO_DRV=pa

qemu-system-x86_64 \
    -enable-kvm \
    -m 4G \
    -machine q35,accel=kvm \
    -smp 4,cores=2 \
    #smp cpus=6,cores=6,threads=1,sockets=1 \
    -cpu Penryn,vendor=GenuineIntel,kvm=on,+sse3,+sse4.2,+aes,+xsave,+avx,+xsaveopt,+xsavec,+xgetbv1,+avx2,+bmi2,+smep,+bmi1,+fma,+movbe,+invtsc \
    -device isa-applesmc,osk="$OSK" \
    -smbios type=2 \
    -drive if=pflash,format=raw,readonly,file="$OVMF/OVMF_CODE.fd" \
    -drive if=pflash,format=raw,file="$OVMF/OVMF_VARS-1024x768.fd" \
    -vga qxl \
    -device ich9-intel-hda -device hda-output \
    -usb -device usb-kbd -device usb-mouse \
    -netdev user,id=net0 \
    -device e1000-82545em,netdev=net0,id=net0,mac=ed:c1:7a:70:11:c8 \
    -device ich9-ahci,id=sata \
    -drive id=ESP,if=none,format=qcow2,file=ESP.qcow2 \
    -device ide-hd,bus=sata.2,drive=ESP \
    -drive id=InstallMedia,format=raw,if=none,file=BaseSystem.img \
    -device ide-hd,bus=sata.3,drive=InstallMedia \
    -drive id=SystemDisk,if=none,file=/home/typo/MacVM/macOS-Simple-KVM/MyDisk.qcow2 \
    -device ide-hd,bus=sata.4,drive=SystemDisk \

MiskolcziRichard avatar Dec 06 '20 23:12 MiskolcziRichard

I feel like I should also mention that upon shutting down the VM, the following error message pops up in my terminal:

./basic.sh: line 15: -cpu: command not found

Now, I use fish as my shell which does have some oddities when it comes to scripting, but this also shows up when I run it specifically with bash.

MiskolcziRichard avatar Dec 06 '20 23:12 MiskolcziRichard

Note you comment this line in multi-commands: #smp cpus=6,cores=6,threads=1,sockets=1 \

Comments in multi-line commands are not acceptable.

Kiprey avatar Jul 01 '22 15:07 Kiprey