Skip to content

Instantly share code, notes, and snippets.

qemu-img create -f qcow2 -o compression_type=zstd,preallocation=off,nocow=off,extended_l2=on,cluster_size=128k,size=60G win11-desktop-c.qcow2
@richardm1
richardm1 / gist:1b8a2d959e1aa687e05dcf91933f566d
Created May 4, 2025 16:05
NetKVM with no host-to-guest packet loss (finally)
<interface type="bridge">
<mac address="52:54:00:52:cb:4c"/>
<source bridge="br0"/>
<model type="virtio"/>
<driver name="vhost" txmode="iothread" ioeventfd="on" event_idx="on" queues="4" rx_queue_size="256" tx_queue_size="256">
<host csum="on" gso="on" tso4="on" tso6="on" ecn="on" ufo="on" mrg_rxbuf="on"/>
<guest csum="on" tso4="on" tso6="on" ecn="on" ufo="on"/>
</driver>
<coalesce>
<rx>
@richardm1
richardm1 / watch-iostat.sh
Created May 4, 2025 14:32 — forked from DaMatrix/watch-iostat.sh
bash: continuously updated iostat (like 'watch iostat') (inspired by https://jrs-s.net/2019/06/04/continuously-updated-iostat/)
#!/bin/bash
shopt -s extglob
NEWLINE=$'\n'
ANSI_ERASE_ENTIRE_SCREEN=$'\e[2J'
ANSI_RESET_CURSOR_POSITION=$'\e[H'
ANSI_CLEAR="${ANSI_ERASE_ENTIRE_SCREEN}${ANSI_RESET_CURSOR_POSITION}"
die() {