-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can not bring up networking When stop a VM and start it again #11585
Comments
It seems that a new MAC address will be generated on every VM startup, but field HWADDR in /etc/sysconfig/network-scripts/ifcfg-eth0 is never changed, which causing the mismatch, and the network refuses to start |
Similar issues: |
/cc @orelmisan |
this also happen in ubuntu 22.04. Any solutions for this? |
a workaround is removing field HWADDR in /etc/sysconfig/network-scripts/ifcfg-eth0, and restart again |
Yes, this is indeed correct. |
In my case, i'm using Ubuntu families (20.04, 22.04), i remove mac-address and set-name in cloud-init process. |
I believe that on the Linux side,
https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
is addressing this problem.
MACADDR based syscfg scripts are indeed error prone in our flow.
… Message ID: ***@***.***>
|
It's too complex to me, can we just clear the field HWADDR or something similiar? |
Oh yes, you can clear the HWADDR field in sysconfig, however, the solution depends on your guest operating system/distribution. |
I mean can kubevirt do it automatically? |
You can set the mac address explicitly on the VM spec. Then it will persist between boots. https://kubevirt.io/api-reference/v1.2.0/definitions.html#_v1_interface |
@EdDev Sorry, that's not what I want. Say I have 100 vms, I just want to make sure they are still work after restart, I don't want to carefully pick 100 valid MACs and assign them one by one |
As mentioned in #11585 (comment) , you can use KMP. At the moment, there is no other option. |
@EdDev , ok, I see. thanks |
What happened:
stop a VM by
virtctl stop xxx
and start it again, an error happenedFailed to start LSB: Bring up/down networking.
and interface eth0 is downWhat you expected to happen:
eth0 is up
How to reproduce it (as minimally and precisely as possible):
Additional context:
dv.yaml
vm.yaml
Environment:
virtctl version
):kubectl version
): N/Auname -a
): N/AThe text was updated successfully, but these errors were encountered: