OK, so I though this was a VirtIO misdetection, but even when I manually select VirtIO, Cloudmin gets the interface name wrong (still names it eth0).
Since this is a Debian image, Cloudmin is editing the /etc/network/interfaces file, which before editing by Cloudmin contains the following:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug ens3
iface ens3 inet dhcp
So...seems like Cloudmin ought to figure out that iface = ens3
If it picked up that info, it'd be able to create a function network config out of the box.
Status:
Active
Comments
Submitted by JamieCameron on Sat, 07/08/2017 - 12:30 Comment #2
Was this VM created from an imported image? Normally Cloudmin tries to ensure that interface names like
ens3
aren't used, as they are unstable and depend on the network driver in use - instead it sets a udev option to always useeth0
for the first interface.Submitted by JamieCameron on Sat, 07/08/2017 - 12:31 Comment #3
But maybe that isn't working on Debian ... which version of Debian is this?
Debian 9. But, I'm pretty sure it happened on another image as well...but, I've been poking at so many image-related issues, I can't be sure of that.
It was imported, yes.
If you want to see the offending image, you can find it in /root/kvm-64-debian90-base.ext3 on srv1.
I can probably make this change automatically in the images that packer generates if that's a good idea. As I mentioned a while back, I'm planning to setup an automated builder for the most common distros and versions so we always have fresh images in our Cloudmin repos...but, so far, I can't make the damned things work. So, what do I need to do to make Cloudmin happy with the network in the image? (And, if Cloudmin can detect it and correct it, that'd be cool, too, since surely others will want to be able to make their own images that work.)
Submitted by JamieCameron on Sat, 07/08/2017 - 21:50 Comment #5
The manual fix for this is to configure the system to use predictable interface names - see http://www.itzgeek.com/how-tos/mini-howtos/change-default-network-name-e...
But I really need to make Cloudmin configure the VM to do this at creation time ..
Submitted by JamieCameron on Sat, 07/08/2017 - 22:54 Comment #6
Actually, this page may be better : http://www.itzgeek.com/how-tos/linux/debian/change-default-network-name-...
It looks like this is a change Debian 9 introduced .. I will need to update Cloudmin to handle it.
OK, cool. That sounds good.
I'll proceed on getting an automated build thing going for popular distros. Once it's confirmed working in Cloudmin, I'll roll them into the cloudmin.virtualmin.com repo.