Skip to content

os-morphing: fix static ip configuration if the mac changes - #505

Merged
Dany9966 merged 1 commit into
cloudbase:masterfrom
petrutlucian94:static_ip_changed_mac
Aug 25, 2026
Merged

os-morphing: fix static ip configuration if the mac changes#505
Dany9966 merged 1 commit into
cloudbase:masterfrom
petrutlucian94:static_ip_changed_mac

Conversation

@petrutlucian94

@petrutlucian94 petrutlucian94 commented Aug 22, 2026

Copy link
Copy Markdown
Member

When "use_dhcp" is disabled, Coriolis tries to apply static IP configuration on Windows, while on Linux it defines udev rules for preserving the interface names, identifying interfaces by MAC address.

However, it expects the MAC address of the source instance to be preserved, which isn't always the case.

This change updates the Linux and Windows OS morphing code to use the new MAC address, if provided. The import provider is expected to set "new_mac_address" within the nic info if the original MAC hasn't been preserved.

Note that Coriolis cannot modify network configuration files at the moment. An exception will be raised if the original MAC address is explicitly set by the network configuration (e.g. netplan).

Comment thread coriolis/osmorphing/base.py Outdated
@petrutlucian94
petrutlucian94 force-pushed the static_ip_changed_mac branch 2 times, most recently from bf1188a to 063eec1 Compare August 24, 2026 15:43
When "use_dhcp" is disabled, Coriolis tries to apply static IP
configuration on Windows, while on Linux it defines udev rules
for preserving the interface names, identifying interfaces by MAC
address.

However, it expects the MAC address of the source instance to be
preserved, which isn't always the case.

This change updates the Linux and Windows OS morphing code to
use the new MAC address, if provided. The import provider is
expected to set "new_mac_address" with the nic info if the
original MAC hasn't been preserved.

Note that Coriolis cannot modify network configuration files at the
moment. An exception will be raised if the original MAC address
is explicitly set by the network configuration (e.g. netplan).
@Dany9966
Dany9966 merged commit c0f578b into cloudbase:master Aug 25, 2026
5 checks passed
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.

2 participants