/usr/bin/qemu-system-x86_64 \
    -no-user-config \
    -nodefaults \
    -no-shutdown \
    -machine accel=kvm,mem-merge=off \
    -rtc base=utc \
    -m 4096 \
    -cpu host \
    -smp cpus=16,cores=8,threads=2,sockets=1 \
    -display vnc=:0 \
    -vga std \
    -chardev ringbuf,id=ringBufSerial0,size=8388608 \
    -device isa-serial,chardev=ringBufSerial0 \
    -chardev socket,id=monitor0,server,path=write-qemu/monitor-debug.sock,nowait \
    -mon monitor0,mode=control \
    -chardev socket,id=monitor1,server,path=write-qemu/monitor.sock,nowait \
    -mon monitor1,mode=control \
    -boot order=d \
    -net none -device vfio-pci,host=0000:3b:11.7,romfile=qemu-img-binaries/snp.efirom \
    -net none -device vfio-pci,host=0000:3b:11.6 \
    -net none -device vfio-pci,host=0000:3b:09.7 \
    -drive file=/usr/share/edk2/ovmf/OVMF_CODE.fd,index=0,if=pflash,format=raw,readonly \
    -drive file=qemu-img-binaries/OVMF_VARS.fd,index=1,if=pflash,format=raw \
    -drive file=ubuntu.qcow2,format=qcow2,if=virtio,id=drive-virtio-disk0 \
# display to vnc socket
-display vnc=unix:/write-qemu/vnc.sock

# serial console in ringbuf
    -chardev ringbuf,id=ringBufSerial0,size=8388608 \
    -device isa-serial,chardev=ringBufSerial0 \
# serial console to socket
    -chardev socket,id=serial0,server,path=/write-qemu/serial.sock,nowait
    -device isa-serial,chardev=serial0 \

# vfio device
-device vfio-pci,host=0000:13:10.0,romfile=/usr/share/ipxe/808610ed.efirom

# boot order
-boot order=n  # n - network, d - cdrom

qemu-img

create image

qemu-img create -f qcow2 ubuntu.qcow2 200G

resize

qemu-img resize ubuntu.qcow2 + 200G

qmp monitor

-chardev socket,id=monitor0,server,path=write-qemu/monitor-debug.sock,nowait \
-mon monitor0,mode=control \

serial console

-chardev ringbuf,id=ringBufSerial0,size=8388608 \
-device isa-serial,chardev=ringBufSerial0 \

read serial console