Disable QEMU's default NIC in the Debian and Fedora launchers

A [netdev] in a -readconfig file does not stop QEMU from adding its
default NIC, so the guests had a second user-mode network without the
SSH port forward. Both NICs got 10.0.2.15 over DHCP, and SSH only worked
on boots where the forwarded NIC won the race for the default route.

Removing the default NIC shifts the other PCI devices down one slot, so
existing VMs may need their UEFI variable store reset to boot again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
guofangandClaude Opus 5.5 committed 2026-10-01 00:47:00 +08:00
1 parent 204051f930
commit 1251b88164
2 files changed
+6

No files matched your search

+3
View File
@@ -265,6 +265,9 @@ qemu_args = [
"-readconfig", str(qemu_arch_config),
# "max" is the host CPU under KVM/HVF and the fullest model under TCG.
"-cpu", "max",
# The config file's [netdev] does not stop QEMU from adding its default
# NIC, a second user network without the SSH port forward.
"-nic", "none",
"-display", display_backend,
]
+3
View File
@@ -267,6 +267,9 @@ qemu_args = [
"-readconfig", str(qemu_arch_config),
# "max" is the host CPU under KVM/HVF and the fullest model under TCG.
"-cpu", "max",
# The config file's [netdev] does not stop QEMU from adding its default
# NIC, a second user network without the SSH port forward.
"-nic", "none",
"-display", display_backend,
]