1,1 Top
1 #!/bin/bash
2 /usr/bin/kvm \
3 -id 100 \
4 -name ArchBox \
5 -no-shutdown \
6 -chardev 'socket,id=qmp,path=/var/run/qemu-server/100.qmp,server=on,wait=off' \
7 -mon 'chardev=qmp,mode=control' \
8 -chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5' \
9 -mon 'chardev=qmp-event,mode=control' \
10 -pidfile /var/run/qemu-server/100.pid \
11 -smbios 'type=1,uuid=22f3c344-45bb-474c-9c9a-851648d78b3a' \
12 -smp '4,sockets=2,cores=2,maxcpus=4' \
13 -nodefaults \
14 -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
15 -vnc 'unix:/var/run/qemu-server/100.vnc,password=on' \
16 -cpu kvm64,enforce,+kvm_pv_eoi,+kvm_pv_unhalt,+lahf_lm,+sep \
17 -m 4096 \
18 -device 'pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e' \
19 -device 'pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f' \
20 -device 'vmgenid,guid=10a11734-6c31-4de4-9a70-d4516eee52fa' \
21 -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' \
22 -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' \
23 -device 'VGA,id=vga,bus=pci.0,addr=0x2' \
24 -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3' \
25 -iscsi 'initiator-name=iqn.1993-08.org.debian:01:fa94959361f2' \
26 -drive 'file=/var/lib/vz/template/iso/archlinux-2022.05.01-x86_64.iso,if=none,id=drive-ide2,media=cdrom,aio=io_uring' \
27 -device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=101' \
28 -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
29 -drive 'file=/dev/vms/vm-100-disk-0,if=none,id=drive-scsi0,format=raw,cache=none,aio=native,detect-zeroes=on' \
30 -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,bootindex=100' \
31 -netdev 'type=tap,id=net0,ifname=tap100i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown,vhost=on' \
32 -device 'virtio-net-pci,mac=F2:F7:6A:2C:57:6D,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=102' \
33 -machine 'type=pc+pve0' \
34 -vnc 0.0.0.0:69