Skip to content

Instantly share code, notes, and snippets.

@will3942
Last active October 12, 2016 18:18
Show Gist options
  • Save will3942/343bd7daef55748c9104 to your computer and use it in GitHub Desktop.
Save will3942/343bd7daef55748c9104 to your computer and use it in GitHub Desktop.
Running OS X under QEMU/KVM
git clone git://git.kernel.org/pub/scm/virt/kvm/kvm.git
git clone git://git.kiszka.org/kvm-kmod.git
cd kvm-kmod
./configure
make LINUX=../kvm clean sync all
modprobe -r kvm_intel
cp ./x86/kvm*.ko /lib/modules/$(uname -r)/kernel/arch/x86/kvm/
modprobe kvm_intel
/root/osx/setup/bin/qemu-system-x86_64 -enable-kvm -m 4096 -cpu core2duo -machine q35 \
-smp 4 \
-usb -device usb-kbd -device usb-mouse \
-vga std \
-device isa-applesmc,osk="REPLACE KEY HERE" \
-kernel ./chameleon_svn2360_boot \
-smbios type=2 \
-device ide-drive,bus=ide.2,drive=MacHDD \
-drive id=MacHDD,if=none,cache=none,file=./osx.img \
-bios ./share/qemu/bios-mac.bin \
-vnc localhost:1 \
-device ide-drive,bus=ide.0,drive=MacDVD \
-drive id=MacDVD,if=none,snapshot=on,file=./Mavericks.iso
/root/osx/setup/bin/qemu-system-x86_64 -enable-kvm -m 4096 -cpu core2duo -machine q35 \
-smp 4 \
-usb -device usb-kbd -device usb-mouse \
-vga std \
-device isa-applesmc,osk="REPLACE KEY HERE" \
-kernel ./chameleon_svn2360_boot \
-smbios type=2 \
-device ide-drive,bus=ide.2,drive=MacHDD \
-drive id=MacHDD,if=none,cache=none,file=./osx.img \
-bios ./share/qemu/bios-mac.bin \
-vnc localhost:1 \
-device ide-drive,bus=ide.0,drive=MacDVD \
-drive id=MacDVD,if=none,snapshot=on,file=./MountainLion.iso
-device virtio-net,netdev=hub0port0,id=eth0 \
-netdev user,id=hub0port0
-device ide-drive,bus=ide.4,drive=fatdrive \
-drive id=fatdrive,file=fat:ro:VirtIoNetDrv
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Timeout</key>
<string>5</string>
<key>EthernetBuiltIn</key>
<string>Yes</string>
<key>PCIRootUID</key>
<string>1</string>
</dict>
git clone git://git.qemu.org/qemu.git;
cd qemu
./configure --prefix=../ --target-list=x86_64-softmmu
make clean; make; make install
cd ..
mkdir VirtIoNetDrv
(cd VirtIoNetDrv; wget http://github.com/pmj/virtio-net-osx/raw/master/bin/Virtio-Net-Driver-0.9.4.pkg)
Copy link

ghost commented Mar 4, 2015

-device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" \

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment