Skip to content

rapido-vm: set romfile= on virito-net devices - #286

Merged
ddiss merged 1 commit into
rapido-linux:masterfrom
ddiss:virtio-net-no-pxe-stall
Nov 3, 2026
Merged

ddiss merged 1 commit into
rapido-linux:masterfrom
ddiss:virtio-net-no-pxe-stall

Conversation

@ddiss

@ddiss ddiss commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

The default behaviour causes a significant stall.
E.g. measurements on my laptop (tumbleweed 7.2.11-1-default kernel, ~commit 6533056 rapido, qemu-x86-11.1.2-1.1.x86_64):

rapido> ./rapido cut -B -x shutdown simple-network initramfs initrds/myinitrd written (38673296 bytes)

Seabios (default):
QEMU_EXTRA_ARGS="-nographic -device virtio-rng-pci"

rapido> time ./rapido boot > /dev/null

real 0m6.717s
user 0m2.251s
sys 0m0.555s

UEFI:
QEMU_EXTRA_ARGS="-nographic -device virtio-rng-pci -bios /usr/share/qemu/ovmf-x86_64-4m.bin"

rapido> time ./rapido boot > /dev/null

real 0m7.563s
user 0m2.863s
sys 0m0.796s

https://gist.github.com/mcastelino/7ab9dba51b0dbb230bd18c448d935312 indicates that the stall is due to PXE boot, which can be disabled via the romfile= QEMU network device parameter. The manually added parameter results in:

Seabios:
QEMU_EXTRA_ARGS="-nographic -device virtio-rng-pci"

cargo build --release
Compiling rapido v0.1.0 (/home/ddiss/isms/rapido-utils/rapido)
Finished release profile [optimized] target(s) in 1.26s

rapido> time ./rapido boot > /dev/null

real 0m2.661s
user 0m2.105s
sys 0m0.554s

QEMU_EXTRA_ARGS="-nographic -device virtio-rng-pci -bios /usr/share/qemu/ovmf-x86_64-4m.bin"

rapido> time ./rapido boot > /dev/null

real 0m3.376s
user 0m2.645s
sys 0m0.694s

So the romfile= parameter more than halves the simple-network boot (and subsequent shutdown) time.

It probably makes sense to add a QEMU_NET_DEV_EXTRA_ARGS or similar config option, but let's just hardcode it for now and hope that we can get away with it.

Link: #285

The default behaviour causes a significant stall.
E.g. measurements on my laptop (tumbleweed 7.2.11-1-default kernel,
~commit 6533056 rapido, qemu-x86-11.1.2-1.1.x86_64):

rapido> ./rapido cut -B -x shutdown simple-network
initramfs initrds/myinitrd written (38673296 bytes)

Seabios (default):
QEMU_EXTRA_ARGS="-nographic -device virtio-rng-pci"

rapido> time ./rapido boot > /dev/null

real    0m6.717s
user    0m2.251s
sys     0m0.555s

UEFI:
QEMU_EXTRA_ARGS="-nographic -device virtio-rng-pci -bios /usr/share/qemu/ovmf-x86_64-4m.bin"

rapido> time ./rapido boot > /dev/null

real    0m7.563s
user    0m2.863s
sys     0m0.796s

https://gist.github.com/mcastelino/7ab9dba51b0dbb230bd18c448d935312
indicates that the stall is due to PXE boot, which can be disabled via
the romfile= QEMU network device parameter. The manually added parameter
results in:

Seabios:
QEMU_EXTRA_ARGS="-nographic -device virtio-rng-pci"

cargo build --release
   Compiling rapido v0.1.0 (/home/ddiss/isms/rapido-utils/rapido)
    Finished `release` profile [optimized] target(s) in 1.26s

rapido> time ./rapido boot > /dev/null

real    0m2.661s
user    0m2.105s
sys     0m0.554s

QEMU_EXTRA_ARGS="-nographic -device virtio-rng-pci -bios /usr/share/qemu/ovmf-x86_64-4m.bin"

rapido> time ./rapido boot > /dev/null

real    0m3.376s
user    0m2.645s
sys     0m0.694s

So the romfile= parameter more than halves the simple-network boot (and
subsequent shutdown) time.

It probably makes sense to add a QEMU_NET_DEV_EXTRA_ARGS or similar
config option, but let's just hardcode it for now and hope that we
can get away with it.

Link: rapido-linux#285
Signed-off-by: David Disseldorp <[email protected]>
@ddiss
ddiss merged commit c254aee into rapido-linux:master Nov 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant