foxlet / macOS-Simple-KVM

Tools to set up a quick macOS VM in QEMU, accelerated by KVM.
13.61k stars 1.14k forks source link

qemu not starting up #64

Open crouther opened 5 years ago

crouther commented 5 years ago

These were my exact commands: sudo pacman -S qemu python python-pip ./jumpstart.sh --mojave qemu-img create -f qcow2 MyDisk.qcow2 64G nano basic.sh (and then added):

-drive id=SystemDisk,if=none,file=MyDisk.qcow2 \
-device ide-hd,bus=sata.4,drive=SystemDisk \

[root@nzxtarch macOS-Simple-KVM-master]# ./basic.sh qemu-system-x86_64: if=none,file=mac.qcow2: drive with bus=0, unit=0 (index=0) exists

Virtual machine is not starting when script is executed. running an Arch linux 2019 vm build. Executing script from GUI terminal, xfce4 environment. The Arch instillation itself is running in a virtualbox on a windows 10 build

foxlet commented 5 years ago

Nested virtualization hasn't been tested on Windows hosts, as a note. You you probably post the whole basic.sh as there seem to be more than just the edits you noted.

crouther commented 5 years ago
#!/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 2G \
    -machine q35,accel=kvm \
    -smp 4,cores=2 \
    -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=52:54:00:c9:18:27 \
    -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=mac.qcow2 \
    -device ide-hd,bus=sata.4,drive=SystemDisk \
foxlet commented 5 years ago

Can you add -nodefaults \, and fix the space after id=SystemDisk?

crouther commented 5 years ago

[root@nzxtarch macOS-Simple-KVM-master]# ./basic.sh Could not access KVM kernel module: No such file or directory qemu-system-x86_64: failed to initialize KVM: No such file or directory

crouther commented 5 years ago

Might try this?

https://stackoverflow.com/questions/14542754/qemu-kvm-kernel-module-no-such-file-or-directory

Not helping causing other issues, if you find something let me know

foxlet commented 5 years ago

Make sure VT-x/AMD-V is enabled in your firmware settings,

On Wed, Jul 3, 2019 at 10:06 PM crouther notifications@github.com wrote:

Might try this?

https://stackoverflow.com/questions/14542754/qemu-kvm-kernel-module-no-such-file-or-directory

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/foxlet/macOS-Simple-KVM/issues/64?email_source=notifications&email_token=AAMNLDKKEYE3EKENFCS2O7DP5VLJJA5CNFSM4H4JQ772YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZGDNAI#issuecomment-508311169, or mute the thread https://github.com/notifications/unsubscribe-auth/AAMNLDLVNSL5WLIGMYAMUKTP5VLJJANCNFSM4H4JQ77Q .

crouther commented 5 years ago

I've confirmed:

VirtualBox > Arch (Settings) > System > Acceleration >

Hardware Virtualization: ✔ Enable VT-x/AMD-V ✔ Enable Nested Paging

clonidine commented 8 months ago

any update?

crouther commented 4 months ago

The method I used a few years ago leveraged VMware Workstation Player on Windows 10 to run macOS. After several different troubleshooting attempts I discovered Windows struggles to host nested VirtualBox instances. I'm unaware if the software has improved over the years but you'll likely get greater performance just running macOS on a Mac, in a VirtualBox on a Linux distro, or in a VM on Windows.

clonidine commented 4 months ago

The method I used a few years ago leveraged VMware Workstation Player on Windows 10 to run macOS. After several different troubleshooting attempts I discovered Windows struggles to host nested VirtualBox instances. I'm unaware if the software has improved over the years but you'll likely get greater performance just running macOS on a Mac, in a VirtualBox on a Linux distro, or in a VM on Windows.

Oh, I see. Thanks.