Skip to content

Commit b2e5c21

Browse files
Marketenclaude
andcommitted
Keep the guest NIC name stable across E2E boots
The installer VM has a USB controller that later boots do not, which shifted the NIC to another PCI slot and renamed it. Debian's /etc/network/interfaces names the interface, so the installed system never brought up its network. Pin the NIC's PCI address like real hardware, where removing the USB stick renames nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent b2198d7 commit b2e5c21

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎test/e2e_iso_install.sh‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,12 @@ run_e2e_iso_install() {
215215
# including replies to ping. User networking needs no root but drops ICMP.
216216
local installer_network_args guest_network_args ssh_host
217217
if [ -n "${tap_iface}" ]; then
218+
# Pin the PCI slot: the USB controller only exists while installing, and
219+
# without a fixed address the NIC name would change after the install
220+
# (enp0s5 -> enp0s4), unlike on real hardware.
218221
installer_network_args=(
219222
-netdev "tap,id=net0,ifname=${tap_iface},script=no,downscript=no"
220-
-device "virtio-net-pci,netdev=net0,mac=${guest_mac}"
223+
-device "virtio-net-pci,netdev=net0,mac=${guest_mac},addr=0x10"
221224
)
222225
guest_network_args=("${installer_network_args[@]}")
223226
ssh_host=${guest_ip}

0 commit comments

Comments
 (0)