Roboto3x

QEMU Spice Win10 (Best 4-2020)

Apr 5th, 2020
473
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.88 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. ## PATHS TO VM RESOURCES ###
  4.  
  5. VMDIR="/.vmcore"
  6. FIRMWARE="/.vmcore/firmware"
  7. OS=$VMDIR"/images/macboot.img"
  8. INSTALL=$VMDIR"/installer/BaseSystem.dmg"
  9.  
  10. NAME=win10_32_core
  11.  
  12. ### CPU VARS ###
  13.  
  14. SMP=16
  15. CORES=16
  16. SOCKETS=1
  17. TRHEADS=1
  18. CPU=EPYC
  19. MEM=20G
  20.  
  21. ### DISKS ###
  22.  
  23. DEVICE="ide-hd,bus=ide.2,drive=Clover"
  24. DRIVE="id=MacHD,if=none,file=$OS,format=raw"
  25.  
  26. ### KEYBOARD / MOUSE devices from lsusb ###
  27.  
  28. V0="0x046d"                
  29. V1="0x046d"
  30. P0="0xc333"
  31. P1="0xc332"
  32.  
  33. ### ARGS ###
  34.  
  35. sudo qemu-system-x86_64-spice \
  36.     -enable-kvm \
  37.     -name $NAME \
  38.     -m $MEM \
  39.     -machine q35,accel=kvm,kernel_irqchip=on \
  40.     -smp $SMP,cores=$CORES,sockets=$SOCKETS \
  41.     -cpu $CPU,kvm=off,hv_time,kvm=off,hv_vendor_id=null \
  42.     -drive if=pflash,format=raw,readonly,file="$FIRMWARE/OVMF_CODE.ms.fd" \
  43.     -drive if=pflash,format=raw,file="$FIRMWARE/OVMF_VARS.ms.fd" \
  44.     -device vfio-pci,host=41:00.0,bus=pcie.0,multifunction=on \
  45.     -device vfio-pci,host=41:00.1,bus=pcie.0 \
  46.     -device vfio-pci,host=41:00.2,bus=pcie.0 \
  47.     -device vfio-pci,host=41:00.3,bus=pcie.0 \
  48.     -spice port=5900,addr=127.0.0.1,password=vze2pycv0,disable-ticketing -soundhw hda \
  49.     -device virtio-serial -chardev spicevmc,id=vdagent,debug=0,name=vdagent \
  50.     -device virtserialport,chardev=vdagent,name=com.redhat.spice.0 \
  51.     -display gtk \
  52.     -device e1000,netdev=net0,id=net0 \
  53.     -netdev user,id=net0 \
  54.     -device virtio-scsi-pci,id=scsi0 \
  55.     -device ivshmem-plain,memdev=ivshmem,bus=pcie.0 \
  56.     -object memory-backend-file,id=ivshmem,share=on,mem-path=/dev/shm/looking-glass,size=32M \
  57.     -device ich9-ahci,id=sata \
  58.     -hda /dev/sdf \
  59.     -hdb /dev/sdg \
  60.     -device ich9-usb-uhci3 \
  61.     -boot menu=on \
  62.     -monitor stdio \
  63.     -device usb-host,vendorid=$V0,productid=$P0 \
  64.     -device usb-host,vendorid=$V1,productid=$P1 \
  65. #   -usb -device usb-kbd -device usb-mouse \
Advertisement
Add Comment
Please, Sign In to add comment