Advertisement
ohetfi

kvm-windows7.sh

Sep 22nd, 2015
505
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.18 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # Use PulseAudio
  4. QEMU_PA_SAMPLES=128
  5. export QEMU_AUDIO_DRV=pa
  6.  
  7. sudo qemu-system-x86_64 \
  8.     -name Windows-7 \
  9.     -pidfile /tmp/kvm-windows7.pid \
  10.     -cpu host,kvm=off \
  11.     -smp 8,sockets=1,cores=4,threads=2 \
  12.     -enable-kvm \
  13.     -m 8G \
  14.     -mem-path /dev/hugepages \
  15.     -mem-prealloc \
  16.     -balloon none \
  17.     -rtc clock=vm,base=localtime \
  18.     -vga none \
  19.     -serial null \
  20.     -parallel null \
  21.     -monitor none \
  22.     -display none \
  23.     -daemonize \
  24.     -soundhw hda \
  25.     -k en-us \
  26.     -machine type=q35,accel=kvm \
  27.     -device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \
  28.     -boot order=c \
  29.     -drive if=none,id=drive0,cache=none,aio=native,format=raw,file=/dev/disk/by-id/ata-Hitachi_HDS721050CLA660_JP1570FR1ZWP7K \
  30.     -device virtio-blk,drive=drive0,scsi=off,config-wce=off,x-data-plane=on \
  31.     -device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on \
  32.     -device vfio-pci,host=01:00.1,bus=root.1,addr=00.1 \
  33.     -net nic,model=virtio,macaddr=52:54:00:6b:03:05 -net bridge,br=br0 \
  34.     -usb \
  35.     -device ich9-usb-uhci3,id=uhci \
  36.     -device usb-ehci,id=ehci \
  37.     -usbdevice host:093a:2510 \
  38.     -usbdevice host:04d9:1603 \
  39.     -usbdevice host:046d:c21e \
  40.     -usbdevice host:0bc2:2300
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement