Closed alexandrovas closed 2 months ago
Hello,
The usage of netsh was due to the fact that we are running cloudbase-init during the very early first boot - specialize step, where WMI is not available. If netsh is not working anymore, we ll need to find an alternative that works during the early boot.
Thank you, Adrian Vladu
Hello,
We are currently using opendev for patches, if you can add your patch to the review queue there, would be great. https://review.opendev.org/q/project:x/cloudbase-init
How to create an account and contribute to: https://docs.openstack.org/contributors/common/setup-gerrit.html
Otherwise, I can cherry-pick your commit, but it is a more complicated issue, as during the opendev onboarding there is a Licensing document that needs to be aprroved: https://docs.openstack.org/contributors/common/setup-gerrit.html#individual-contributor-license-agreement-icla . Please let me know if you can add it as a opendev patch (former Gerrit).
Thank you, Adrian Vladu.
Hello, any news about this issue ?
We are having the same issue here, Core 2022 not setting the IP address on deployment in openstack
Hello, work is in progress here to fix the issue -> https://review.opendev.org/c/x/cloudbase-init/+/898713 I have built an installer with the fix here: https://github.com/ader1990/cloudbase-init-installer-1/actions/runs/8506367466 (see the artifacts tab) If you can try it out to confirm the fix, that would be awesome!
Thank you.
Hello, work is in progress here to fix the issue -> https://review.opendev.org/c/x/cloudbase-init/+/898713 I have built an installer with the fix here: https://github.com/ader1990/cloudbase-init-installer-1/actions/runs/8506367466 (see the artifacts tab) If you can try it out to confirm the fix, that would be awesome!
Thank you.
I will test and let you know.
Not working on my side
ERROR cloudbaseinit.init [-] plugin 'NetworkConfigPlugin' failed with error 'Renaming interface "Ethernet" to "tapb498e43f-0c" failed': cloudbaseinit.exception.CloudbaseInitException: Renaming interface "Ethernet" to "tapb498e43f-0c" failed
Hello,
The usage of netsh was due to the fact that we are running cloudbase-init during the very early first boot - specialize step, where WMI is not available. If netsh is not working anymore, we ll need to find an alternative that works during the early boot.
Thank you, Adrian Vladu
Couldnt you just rename in the registry (although this may require a reboot) or wmic ?
@dgrauet I will recheck, can you please provide a systeminfo output of the Windows exact version, to make sure I can reliably reproduce the issue? @aiso-net the fix uses a lower level WMI implementation (Windows API MI), so it should definitely work if the API is respected.
OS Name: Microsoft Windows Server 2022 Standard OS Version: 10.0.20348 N/A Build 20348
Hello @dgrauet, I have tried to reproduce the issue using the ISO from https://www.microsoft.com/en-us/evalcenter/download-windows-server-2022 (10.0.20348 with latest updates).
But both the latest nightly and https://github.com/ader1990/cloudbase-init-installer-1/actions/runs/8506367466 work as expected, tried with both Standard and Datacenter. I think this might be an issue with the VirtIO drivers in some situations. Can you please give more details on how you created the Windows VM and what hypervisor version, virtio driver version are you using?
Thank you, Adrian Vladu
Hello again, I managed to reproduce the issue, seems that I was not using the correct ISO in my testing.
I have observed that only MSFT_NetAdapter.rename method can be used to rename the adapter on the Core version and changed the code accordingly: https://review.opendev.org/c/x/cloudbase-init/+/898713
For example, this fix is not working https://github.com/cloudbase/cloudbase-init/pull/102/files#diff-bde815550dd2cbe6c3cd4c1f2d266c63c38f5dbaed128ac207d9556757ebc596R865 and neither using the Win32_NetworkAdapter class.
The MSI installer with the fix should be built shortly and available here https://github.com/ader1990/cloudbase-init-installer-1/actions/runs/8736432020
Thank you, Adrian Vladu
LGTM, will you release 1.1.6 with this patch ?
Hello!
I have issue with network interface renaming on Windows 2022 Core. Environment:
Cloudbase-init log:
As result network configuration of VM is failed and VM is not accessible by network.
After machine created I logged in to it and checked network config. Network interface is not renamed and left with name![image](https://user-images.githubusercontent.com/49055338/204082936-9578e532-664e-404a-8d71-6b9b80afecfb.png)
Ethernet
:I tried to rename interface manually by the same command as in cloudbase-init code:![image](https://user-images.githubusercontent.com/49055338/204083170-1a263057-caf3-4cad-998a-e59762ff7183.png)
Looks like this command is not working in Windows 2022 Core.
After this I tried to rename network interface by Powershell command![image](https://user-images.githubusercontent.com/49055338/204083396-f85b641f-6b3b-4c70-9024-f9d81c745758.png)
Get-NetAdapter -Name "Ethernet" | Rename-NetworkAdapter -NewName "tap31bc296d-b5"
:And network interface was successfully renamed by this Powershell command. After renaming interface I restarted VM to continue cloudbase-init initialization progress and it successfully finished too.
I think this code with
netsh
call should be replaced to WMI MSFT_NetAdapter interface or Powershell Rename-NetAdapter cmdlet becausenetsh
is obsoleted.