Skip to content

Fix SUSE guest networking - #13827

Open
ryan-ronnander wants to merge 1 commit into
hashicorp:mainfrom
ryan-ronnander:suse-guest-network-manager
Open

Fix SUSE guest networking#13827
ryan-ronnander wants to merge 1 commit into
hashicorp:mainfrom
ryan-ronnander:suse-guest-network-manager

Conversation

@ryan-ronnander

Copy link
Copy Markdown

Recent SUSE guests use NetworkManager and no longer include wicked or its ifcfg configuration files. openSUSE MicroOS has been affected since 2022 (#12777, static IPs silently fall back to DHCP). SLE and openSUSE Leap 16 removed wicked entirely, so every Leap 16 guest also fails after vagrant up:

/sbin/ifdown 'eth1' || true
mv '/tmp/vagrant-network-eth1-...' '/etc/sysconfig/network/ifcfg-eth1'
/sbin/ifup 'eth1'

bash: line 4: /sbin/ifdown: No such file or directory
mv: cannot move '/tmp/vagrant-network-eth1-...' to '/etc/sysconfig/network/ifcfg-eth1': No such file or directory

This fix follows the approach used for RHEL 10 guests in #13625: the network_scripts_dir capability detects the network configuration location, and configure_networks dispatches to the shared Vagrant::Util::GuestNetworks::Linux NetworkManager implementation when the wicked configuration directory is absent. The wicked path is unchanged for guests and older boxes that still use it (SLE/Leap 15.x).

Verified with vagrant-libvirt, using a private_network with a static IP:

  • cloud-image/opensuse-leap-16.0: With this change vagrant up completes, static and DHCP-typed networks come up as NetworkManager profiles, and addresses persist across reloads.
  • opensuse/MicroOS.x86_64 (the box from Setting a static IP on opensuse/MicroOS fails, uses DHCP instead #12777): the static address is applied (ipv4.method: manual) instead of silently staying on DHCP.
  • cloud-image/opensuse-leap-15.6 (wicked): behavior unchanged, ifcfg path still used.

Fixes #12777

Note: current opensuse/MicroOS.x86_64 boxes ship with the interactive JeOS firstboot wizard enabled, which blocks first boot until it is answered on the VM console. That is a box packaging issue, outside the scope of this PR.

Recent SUSE guests (SLE/openSUSE Leap 16, MicroOS) use NetworkManager
and no longer include wicked or its ifcfg configuration files. Detect
the correct location of the network configuration files, and configure
the guest based on the detected location.

Fixes hashicorp#12777
@hashicorp-cla-app

hashicorp-cla-app Bot commented Jul 4, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Setting a static IP on opensuse/MicroOS fails, uses DHCP instead

1 participant