-
Notifications
You must be signed in to change notification settings - Fork 0
/
virt-install_win.sh
35 lines (34 loc) · 1.76 KB
/
virt-install_win.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
virt-install \
--name win \
--memory 8192 \
--sysinfo host \
--cpu host-passthrough,cache.mode=passthrough,topology.sockets=1,topology.cores=4,topology.threads=1 \
--os-variant name=win11 \
--cdrom "/var/lib/libvirt/images/Win11_23H2_English_x64v2.iso" \
--disk path="/var/lib/libvirt/images/virtio-win.iso",device=cdrom,bus=sata \
--network network=default,model.type=virtio \
--graphics none \
--noautoconsole \
--boot uefi,bootmenu.enable='yes' \
--features smm.state=on,kvm.hidden.state=on \
--tpm default \
--disk path="/var/lib/libvirt/images/win.qcow2",size=256,bus=virtio \
--hostdev 01:00.0,type=pci \
--hostdev 01:00.1,type=pci \
--hostdev 0x046d:0xc542,type=usb \
--hostdev 0x24ae:0x2010,type=usb \
--xml xpath.create=./features/hyperv/vendor_id \
--xml xpath.set=./features/hyperv/vendor_id/@state=on \
--xml xpath.set=./features/hyperv/vendor_id/@value=whateverid \
--xml xpath.create=./os/firmware/feature \
--xml xpath.set=./os/firmware/feature/@enabled=yes \
--xml xpath.set=./os/firmware/feature/@name=secure-boot \
--qemu-commandline="-acpitable" \
--qemu-commandline=file=/var/lib/libvirt/qemu/SSDT1.dat \
--iothreads 1 \
--cputune vcpupin0.vcpu=0,vcpupin0.cpuset=2,vcpupin1.vcpu=1,vcpupin1.cpuset=8,vcpupin2.vcpu=2,vcpupin2.cpuset=3,vcpupin3.vcpu=3,vcpupin3.cpuset=9,vcpupin4.vcpu=4,vcpupin4.cpuset=4,vcpupin5.vcpu=5,vcpupin5.cpuset=10,vcpupin6.vcpu=6,vcpupin6.cpuset=5,vcpupin7.vcpu=7,vcpupin7.cpuset=11 \
--xml xpath.create=./cputune/emulatorpin \
--xml xpath.set=./cputune/emulatorpin/@cpuset='0,6' \
--xml xpath.create=./cputune/iothreadpin \
--xml xpath.set=./cputune/iothreadpin/@iothread=1 \
--xml xpath.set=./cputune/iothreadpin/@cpuset='0,6'