foxlet / macOS-Simple-KVM

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

No Mouse #132

Open howudodat opened 4 years ago

howudodat commented 4 years ago

Host OS Ubuntu 18.04 and 19.10, tried both as Hosts. VM starts to installer, mouse never works. Keyboard does.

after running ./jumpstart.sh, here is 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 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 \
mamoit commented 4 years ago

Click inside the QEMU window to bind the mouse to it, only then can you use it. Press ctrl+alt to unbind it. Press ctrl+alt+f to go fullscreen.

josdar commented 4 years ago

I have the exact same issue on Ubuntu 18.04, pressing ctrl+alt doesn't fix the problem, the pointer doesn't move when you're inside the QEMU, the keyboard works.

mamoit commented 4 years ago

ctrl+alt is to exit the binded mode, you need to click in the window where the vm is running to bind the cursor to it.

josdar commented 4 years ago

I know of course I already did that but the cursor is still not working, it doesn’t move inside the virtual machine.

howudodat commented 4 years ago

The two things I did to work around it: 1: instead of -device usb-mouse use -device usb-tablet 2: you need to use the keyboard on the first screen (sorry not at home to tell you what it is). use the keyboard to select install / drive the mouse seemed to work on later screens

141 commented 4 years ago

Did you ever get further than this step? It's exactly what happens to me since I don't have bios IOMMU support.

rhildred commented 3 years ago

@howudodat is correct. You need to move the focus around with the arrow keys until it is on the square in the centre of the screen. Then press enter. They are also correct about the usb-tablet in my experience.