Hello @pedri ,
I understand that a new Mellanox ConnectX-4 Lx Virtual Ethernet Adapter is created every time you deallocate your Azure Windows 10 PRO VM.
I checked internally and found that you raised a support request for this issue and below is the summary provided by the support team:
We were able to reproduce the issue in our lab, so we discussed this with our engineering team and came to a conclusion that this is happening due to the design limitation of accelerated network.
There are few things that will happen when you stop and start the VM. When you stop the virtual machine it will be deallocated from the current physical server and when you start the machine again it will be started/allocated on the new physical server in the datacenter and that particular machine will have a new hardware MAC address.
New hardware will not find the old mac address, that is why it take a new mac address. This is by design for accelerated networking.
If you shut down the VM through the OS, the VM is stopped and not deallocated. In that case, there would be no ghosted NIC because the lease is never lost for the existing hardware. The VM would start on the same hardware/physical server in the datacenter, have the same resources, and no ghosted NIC would appear.
From this link Accelerated Networking overview | Microsoft Learn, you will be able to see the difference in the design for accelerated and normal networking.
If you look at the screenshot with accelerated networking, to improve the performance it will bypass the virtual switch (Software controlled).
Whenever VM moves to a new/different hardware you will get the different hardware address, hence the OS will not be able to identify the previous server's MAC address, which is the reason your NIC will be ghosted/shown under the hidden devices.
For the VM’s running without accelerated networking, MAC address can be reserved with the software layer (virtual switch).
At present, we do not have control to reserve the mac address of the physical server. Our Product Group team is always working to improve our product and services, however there is no estimated time for the improvement of this feature.
----------------------------------------------------------------------------------------------------------------
Please "Accept the answer", as it might be beneficial to other community members reading this thread.