i hope this is the right place and someone here is managing the build process of the snapcraft images for multipass.
i had problems starting multiple instances using the same snapcraft image via multipass.
i didn’t matter if this was done via snapcraft or directlty via multipass launch.
all instances which use the same image get the same ip address.
after watching the network traffic it was clear that the dhcp requests were carrying the same identifier via option 61.
it seems like you forgot to empty /etc/machine-id and /var/lib/dbus/machine-id before shipping the image. at least thats a way it works, ubuntu creates a new random machine id when both files are empty.
for a test i emptied both files in the qcow2 image and created new instances which were not assignes the same ip any more.
i only emptied /etc/machine-id and /var/lib/dbus/machine-id in the image and this issue was gone. the id’s are regenerated during boot when the files are empty.
i only repaired snapcraft:core18 here locally because mounting of qcow2 images is a bit cumbersome
these images were not working: (they all have different ids, but they all have ids in the image)
regard the bug report @launchpad IIRC both files are the problem /etc/machine-id and /var/lib/dbus/machine-id
We mounted the qcow2 images directly, ie, before first boot and /etc/machine-id is empty but /var/lib/dbus/machine-id which is the source of the problem and why I filed the bug that way. You are seeing the image after boot which is filling in /etc/machine-id with what’s contained in the other file.
Note that snapcraft:core* is not the same as the Ubuntu Core* images. The snapcraft:core* are special images used for creating snap packages.
i was mounting the qcow images too, and i just checked again. i deleted the image
then i issued a multipass launch -n foo snapcraft:core18
right before the download was finished i copied the image (from /var/snap/multi…/cache/…/images…), mounted it via guestmount and checked.
there is an id in /etc/machine-id and /var/lib/dbus/machine-id
Ok, I confirmed what you see on the bionic image. Some (all?) other images do not have /etc/machine-id filled out.
At any rate, the team responsible for these images understand where the problem is occurring during the image creation and the fix they will apply should fix both cases. I don’t have an ETA yet on when fixed images will be available though.