Can not Create Virtual IP address

Go to Virtualmin select server navigate to Server Configuration->Change IP Address fill in the form the response is

check back in Webmin->Networking->Network Configuration->Network Interfaces you see

and

from this webmin is aware of eth0 being up but not started at boot, however it is as everything works fine until you try to add a virtual interface. if you try to add a virtual interface via Webmin->Networking->Network Configuration->Network Interfaces and name it the name of whatever, in this case I used eth0:1

any ideas on how to fix ?

Status: 
Active
Virtualmin version: 
162
Webmin version: 
1960

Comments

Looks like Virtualmin cannot find your boot-time network interface config.

Which Linux distro are you running there?

Can you post the contents of the files in your /etc/netplan directory to this bug report?

there are no files in /etc/netplan

Does the directory exist at all?

If not, what does your /etc/network/interfaces file contain?

the directory is there but empty and the content of /etc/network/interfaces is

auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 37.122.211.130
netmask 255.255.252.0
gateway 37.122.211.254
dns-nameservers 46.32.224.29 46.32.224.30 46.32.224.31
dns-search vps-10.com

However Webmin sees it a bit differently the dns servers are not set to the above IP's but in fact to google's servers (8.8.8.8, 8.8.4.4) and no dns-search is set. As a foot note this machine is a vps .. & from what i can see it's in a kvm container

BIOS Information
Vendor: Seabios
Version: 0.5.1
Release Date: 01/01/2007
Address: 0xE8000
Runtime Size: 96 kB
ROM Size: 64 kB
Characteristics:
BIOS characteristics not supported
Targeted content distribution is supported
BIOS Revision: 1.0

Handle 0x0100, DMI type 1, 27 bytes
System Information
Manufacturer: Red Hat
Product Name: KVM
Version: RHEL 6.6.0 PC
Serial Number: Not Specified
UUID: 63b906c5-7b0a-01e0-1cf6-fce701bc20b5
Wake-up Type: Power Switch
SKU Number: Not Specified
Family: Red Hat Enterprise Linux

I did try to save the network settings via Webmin which webmin accepted until I rebooted ... at this point the vps would not start and the only way out of this was to reprovision the server ... tried this twice same result.

Ok - the quick fix for this issue is to delete that empty /etc/netplan directory.

Ok did that what's next ? currently I can add a new IP address, which works, but I can not make it persistent if I add eth0 start at boot via webmin and reboot the network does not restart only way out of this is to reprovision the VPS and start from scratch (now on to the tenth attempt). I have another webmin managed server which I reprovisioned and only upgraded it to 18.04 which behaves normally and the netplan directory with .yaml files. Any reason for that ?

So when you re-provision a VPS, does it have the primary IP address listed in /etc/network/interfaces or a file /etc/netplan ?

netplan is always empty /etc/network/interfaces is as you see it above

Ilia's picture
Submitted by Ilia on Wed, 11/11/2020 - 04:59

Does everything work as expected after deleting /etc/netplan directory?

no I had to reprovision again .. I guess it's just the way it is

Ilia's picture
Submitted by Ilia on Wed, 11/11/2020 - 16:24

  1. If you delete /etc/netplan directory (considering it's empty) before installing Virtualmin and Webmin - does it work?

  2. Does it have Webmin pre-installed?

  3. What is the output of /etc/network/interfaces and /etc/resolve.conf before and after installing Virtualmin? Is /etc/resolv.conf a symlink or a file?

  4. What exactly fails? Connection lost upon a reboot? Can you access your server using IP address instead?

Ilia's picture
Submitted by Ilia on Wed, 11/11/2020 - 16:24

  1. What is your hosting provider and which plan you're using?

Service Provider is webfussion/123-reg Plan is unmanaged VPS Webmin is not preinstalled Resolv.conf is a symlink to ../run/resolvconf/resolv.conf I have never viewed the files before installing webmin/vm so I have no idea what they contain unless I reprovision again. The vps runs correctly (boots up) unless I add an interface to start at boot then on reboot the vps appears (from the provider control panel) to be stuck in a boot loop, I am guessing the network interface is not coming up through mis configuration .. the only fix is to reprovision. As this is a production server I can only try these things occasionally as there is too much down time for the users

Ilia's picture
Submitted by Ilia on Thu, 11/12/2020 - 04:38

What is the output of /etc/network/interfaces and /etc/resolve.conf files?

Is /etc/netplan directory exists? If you run command netplan in the console, what is the output?

/etc/netplan has been deleted the output from netplan is thus :- /etc/network/interfaces and /etc/resolv.conf

I have restarted the server due to other webmin issues and lo and behold the network came up so I guess removing the netplan directory fixed the issue