subiquity creates wrong network configuration (wrong NIC name)

Bug #1882162 reported by psl
28
This bug affects 4 people
Affects Status Importance Assigned to Milestone
subiquity (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I already reported a bug against other tool but I think it should be filled against subiquity.

https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/1881832

Ubuntu server 20.04 and 18.04.4. When I installed them on virtual machine (FreeNAS 11.3, VMware ESXi 6.7), installation was OK but after reboot, virtual machine had no network connectivity, IP address from DHCP server was not requested. NIC interface was enp0s4. I can ask for IP address manualy with "sudo dhclient enp0s4" and it works!

I think that issue is that subiquity creates wrong network configuration, this is file after install. Nnote, that enp0s5 is configured with DHCP4, but real NIC is enp0s4...

/etc/netplan/00-installer-config.yaml

#####
# This is the network config written by 'subiquity'
network:
  ethernets:
    enp0s5:
      dhcp4: true
  version: 2

I fixed this issue by replacing "enp0s5" with "enp0s4" in file /etc/netplan/00-installer-config.yaml. Rebooted machine asked for IP address from DHCP server and I like it...

psl (slansky)
description: updated
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

It looks like your nic changed name after the reboot. I don't know why that would happen.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in subiquity (Ubuntu):
status: New → Confirmed
Revision history for this message
Lukas Märdian (slyon) wrote :

In the other bug report @psl reported the root cause of this problem:

"I tried to create another virtual machine with Ubuntu running on TrueNAS server and I carefully monitored devices during install process.

The source of this problem is at I have to use CD-ROM image during install but I have to remove CD-ROM device to start Virtual machine with Ubuntu. TrueNAS doesn't offer any option to use CDROM without disk image (it reports an error when file with ISO image is not found) and I have to remove CD-ROM device (SATA controller). When I remove CD-ROM device, device indexes at PCI bus (lspci output) are changed. ETH device is during install really enp0s5 but once CD-ROM device is removed from virtual machine configuration, it becomes enp0s4. This was not a problem in the past when the first ETH device was always "eth0 " but now it is a problem because any change on PCI can result in different interface name; enp0s5 in the install configuration becomes en0s4 in the run configuration..."

I marked it as a duplicate of this one.

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Argh. Well in that case I guess you should put net.ifnames=0 on the kernel command line when booting the install media (after --- so it gets propagated to the installed system too).

Revision history for this message
Don Williams (elstryfe) wrote :

I wanted to add to this as well I downloaded this build as well and I can see my DHCP offer the IP address but the Ubunutu server does not ACK the offer or even see it from tcpdump. This is also on unRAID as well using VirtIO network adapter.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.