Correct, not until you run apt install cloud-init (like the ISO’s FOG spice does)!
You are very welcome.
OP is not using the ISO (yet.)
Well some of that logic does exist e.g. FOG spice as mentioned earlier for some console touch-ups, also as mentioned there’s (IMO) human-friendlier naming of network interfaces, plus packing in files you are downloading anyhow to speed things up when doing multiple installs from the same ISO, etc.
Can you address the ISO in a thread where it is more applicable? The topic is regarding cloud deployments and sysadmin messing with network interfaces, and the ISO is designed for hardware appliances (as you agreed above).
What would actually help is some guidance on the issue from the original post: the sysadmin hook renaming interfaces, even when I just run asterisk-version-switch and quit without making any changes. Since sysadmin is closed source, I can’t see what that hook is doing or how to stop it, so any insight from someone with access to the module (or a pointer to who does) would be useful.
OK let’s break this down. I also use Vultr and their Debian 12 image. To verify, I just installed a new Debian 12 system and haven’t touched it.
Interface for my FreePBX v17 system: enp1s0
Interface for your FreePBX v17 system: enp1s0 (as per your post)
Interface for my just installed Debian 12 system: enp1s0
In other words, based on Debian’s interface naming scheme and Vultr’s deployment setup, when you install a Debian 12 system your interface will be enp1s0. Therefore your original assertion that Sysadmin is changing interface names is not correct.
So my question is now, are you using a custom cloud-init that define things? Can you share your 50-cloud-init file so we can see its contents.
I cannot replicate some of your issues. I run asterisk-version-switch or restart services, I see the hook run in syslog and I see 50-cloud-init be removed. I never see an interface name changed. My system always comes back up after a reboot and 50-cloud-init is restored. However, it now takes upwards to 2 minutes or more for my system to reboot.
I can also say, I couldn’t replicate any of what I have been able to until after I updated the sysadmin module to 17.0.3.7. After that, I could replicate pretty everything but interface renaming and failed DHCP on reboots. My reboots almost take 3x longer now but still has the interface come up.
@adell4444 The hook is supporting something that ISO only installs do, rename interfaces. When the hook runs on a non-ISO system the only thing it does it destroy 50-cloud-init and then waffs in the air because /etc/network/interfaces.d/pbx-renames doesn’t exist and is never made. But I need to see your cloud-init setup to determine things a little more.
auto lo
iface lo inet loopback
auto enp1s0
iface enp1s0 inet dhcp
dns-nameservers 108.61.10.10
auto enp8s0
iface enp8s0 inet static
address 10.5.96.14/20
mtu 1450
post-up route add -net 10.0.0.0/8 gw 10.5.96.1 || true
pre-down route del -net 10.0.0.0/8 gw 10.5.96.1 || true
post-up route add -net 172.16.0.0/12 gw 10.5.96.1 || true
pre-down route del -net 172.16.0.0/12 gw 10.5.96.1 || true
post-up route add -net 192.168.0.0/16 gw 10.5.96.1 || true
pre-down route del -net 192.168.0.0/16 gw 10.5.96.1 || true
My fault, it’s not actually renaming the interface. I was confusing the previous conversation about what the ISO does with what the original topic was about.
What the hook is actually doing is renaming the 50-cloud-init file to the name of the primary interface, enp1s0. Cloud-init recreates 50-cloud-init at the next boot, ifup then reads two configs for the same interfaces, exits 1, fails networking.service, and the cgroup teardown kills dhclient. When the lease expires, network is down.
I do not do anything with cloud-init outside of whatever Vultr is using in this case by default. I attached a screenshot earlier that shows “cloud-init user data” being disabled when I deploy servers, though that is likely something different. I’m not sure.
Interestingly enough, enp8s0 does not have the same issue. The issue only exists with enp1s0.
Still haven’t replicated that but I will see if I can tonight.
Interestingly though, the only logs of an interface failing to come up is enp8s0.
I think the answer maybe, for now, to roll back Sysadmin since it seems previous versions don’t have this. I updated sysadmin a few months ago and this wasn’t happening. I updated it to the newest version, it’s happening. So to get around this for now you might have to keep rolling back to find a version that doesn’t have this in it.
My bad, that went elsewhere, probably should split that out. Anyhow…
We’re looking at an update internally to adapt sysadmin to be more cloud-init friendly but there’s a lot more you can do on the cloud-init side to adapt to the current circumstances besides rolling back modules (which is not advised from a security perspective.) Options in your case might include e.g. cloud-init template adjustments, stopping writes of 50-cloud-init after first boot in favor of sysadmin way, etc.
Then don’t shove unneeded solutions for non-problems in module updates. Because at this point, it’s making systems really secure by taking them off the network.
So using the install script with the --opensourceonly flag still installs commercial modules, then just uninstalls them afterwards. I’ve learned that I don’t even need to run asterisk-version-switch to trigger the hook, it just does it during the installation of the module as well after running the install script. I setup auditd prior to installing, and
I’m not entirely sure, but it appears as though the script installs version 17.0.2.33 according to /var/log/asterisk/freepbx.log before removing it due to the --opensourceonly flag
EDIT: I think I am finding that the service state only fails if you have a second interface attached to the instance using VPC. I am testing with that now
Can reproduce networking.service failure when secondary interface enp8s0 is present and sysadmin runs the rename-interface hook.
[root@test /]$ ls -la /etc/network/interfaces.d/
total 16
drwxr-xr-x 2 root root 4096 Sep 30 15:05 .
drwxr-xr-x 7 root root 4096 Sep 17 01:43 ..
-rw-r--r-- 1 root root 488 Sep 30 15:05 50-cloud-init
-rw-r--r-- 1 root root 488 Sep 30 14:32 enp1s0
[root@test /]$ systemctl status networking --no-pager
× networking.service - Raise network interfaces
Loaded: loaded (/lib/systemd/system/networking.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Wed 2026-09-30 15:05:36 PDT; 36min ago
Docs: man:interfaces(5)
Process: 643 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
Process: 915 ExecStopPost=/usr/bin/touch /run/network/restart-hotplug (code=exited, status=0/SUCCESS)
Main PID: 643 (code=exited, status=1/FAILURE)
CPU: 310ms
Sep 30 15:05:36 test.fqdn.com ifup[795]: DHCPACK of 137.220.49.251 from 169.254.169.254
Sep 30 15:05:36 test.fqdn.com ifup[803]: RTNETLINK answers: File exists
Sep 30 15:05:36 test.fqdn.com root[817]: /etc/dhcp/dhclient-exit-hooks.d/rfc3442-classless-routes returned non-zero exit status 2
Sep 30 15:05:36 test.fqdn.com dhclient[795]: bound to 137.220.49.251 -- renewal in 35921 seconds.
Sep 30 15:05:36 test.fqdn.com ifup[795]: bound to 137.220.49.251 -- renewal in 35921 seconds.
Sep 30 15:05:36 test.fqdn.com ifup[890]: RTNETLINK answers: File exists
Sep 30 15:05:36 test.fqdn.com ifup[643]: ifup: failed to bring up enp8s0
Sep 30 15:05:36 test.fqdn.com systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Sep 30 15:05:36 test.fqdn.com systemd[1]: networking.service: Failed with result 'exit-code'.
Sep 30 15:05:36 test.fqdn.com systemd[1]: Failed to start networking.service - Raise network interfaces.
[root@test /]$ journalctl -u networking -b --no-pager | grep -iE 'RTNETLINK|failed to bring up|FAILURE'
Sep 30 15:05:36 test.fqdn.com ifup[803]: RTNETLINK answers: File exists
Sep 30 15:05:36 test.fqdn.com ifup[890]: RTNETLINK answers: File exists
Sep 30 15:05:36 test.fqdn.com ifup[643]: ifup: failed to bring up enp8s0
Sep 30 15:05:36 test.fqdn.com systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
[root@test /]$ pgrep -a dhclient
[root@test /]$
To be clear, there is still a failure when no VPC NIC is present. networking.service reports success but ifup still starts two dhclients on the same interface sharing one PID file, with different renewal timers. Also: