Network device isn't detected on new VM creation

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

Joe's picture
Submitted by Joe on Fri, 07/07/2017 - 04:37 Pro Licensee

Title: VirtIO network isn't detected on new images ยป Network device isn't detected on new VM creation
Body: View changes

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 use eth0 for the first interface.

But maybe that isn't working on Debian ... which version of Debian is this?

Joe's picture
Submitted by Joe on Sat, 07/08/2017 - 19:47 Pro Licensee

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.)

Joe's picture
Submitted by Joe on Sun, 07/09/2017 - 14:03 Pro Licensee

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.