Skip to content

Instantly share code, notes, and snippets.

@epers
Created Feb 12, 2019
Embed
What would you like to do?
#!/bin/sh
/usr/bin/kvm\
-id 5007\
-name cm2\
-chardev socket,id=qmp,path=/var/run/qemu-server/5007.qmp,server,nowait\
-mon chardev=qmp,mode=control\
-chardev socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5\
-mon chardev=qmp-event,mode=control\
-pidfile /var/run/qemu-server/5007.pid\
-daemonize\
-smbios type=1,uuid=d56f088a-2195-4a51-bb9f-7348190f5677\
-drive if=pflash,unit=0,format=raw,readonly,file=/usr/share/pve-edk2-firmware//OVMF_CODE.fd\
-drive if=pflash,unit=1,format=qcow2,id=drive-efidisk0,file=/mnt/pve/cc1-sn1/images/5007/vm-5007-disk-0.qcow2\
-smp 2,sockets=1,cores=2,maxcpus=2\
-nodefaults\
-boot menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg\
-vnc unix:/var/run/qemu-server/5007.vnc,x509,password\
-no-hpet\
-cpu kvm64,+lahf_lm,+sep,+kvm_pv_unhalt,+kvm_pv_eoi,hv_spinlocks=0x1fff,hv_vapic,hv_time,hv_reset,hv_vpindex,hv_runtime,hv_relaxed,hv_synic,hv_stimer\
-m 8192\
-device pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f\
-device pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e\
-device vmgenid,guid=2f16ba4c-a2f0-4bde-9879-0d998ec879c1\
-device piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2\
-device usb-tablet,id=tablet,bus=uhci.0,port=1\
-device VGA,id=vga,bus=pci.0,addr=0x2\
-chardev socket,path=/var/run/qemu-server/5007.qga,server,nowait,id=qga0\
-device virtio-serial,id=qga0,bus=pci.0,addr=0x8\
-device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0\
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3\
-iscsi initiator-name=iqn.1993-08.org.debian:01:7ec922d43d9b\
-drive file=/mnt/pve/cc1-sn1/template/iso/virtio-win-0.1.164.iso,if=none,id=drive-ide0,media=cdrom,aio=threads\
-device ide-cd,bus=ide.0,unit=0,drive=drive-ide0,id=ide0,bootindex=200\
-drive file=/mnt/pve/cc1-sn1/template/iso/srv2016.iso,if=none,id=drive-ide2,media=cdrom,aio=threads\
-device ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=201\
-device virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5\
-drive file=/mnt/pve/cc1-sn1/images/5007/vm-5007-disk-0.raw,if=none,id=drive-scsi0,cache=writeback,format=raw,aio=threads,detect-zeroes=on\
-device scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,bootindex=100,wwn=0x5000c50015ea71ae,serial=yCCfBgH1\
-drive file=/mnt/pve/cc1-sn1/images/5007/vm-5007-disk-1.raw,if=none,id=drive-scsi1,cache=writeback,format=raw,aio=threads,detect-zeroes=on\
-device scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=1,drive=drive-scsi1,id=scsi1,wwn=0x5000c50015ea71ad,serial=yCCfBgH1\
-netdev type=tap,id=net0,ifname=tap5007i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown,vhost=on\
-device virtio-net-pci,mac=A6:11:DD:E2:D7:A8,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300\
-rtc driftfix=slew,base=localtime\
-machine type=pc\
-global kvm-pit.lost_tick_policy=discard\
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment