如何阻止Azure随机更换虚拟机上的网卡?

Azure似乎有随机更改虚拟机硬件configuration的习惯,而不会告诉用户任何事情。

这当然在文档中提到,虽然有点模糊:

Can I manually assign IP addresses to NICs in virtual machines? No. You must not change any interface properties of VMs. Any changes may lead to potentially losing connectivity to the virtual machine. 

和:

 Will the MAC address remain the same for my virtual machine once it has been created? No. A virtual machine's MAC address can change for a few different reasons. If the VM is put in the status Stopped (Deallocated), if you change the virtual machine size, or if there is service healing or planned maintenance of the host server, the MAC address is not retained. 

实际上似乎发生的情况是,只要有一些“服务”已经完成,虚拟机的现有虚拟网卡就会被删除,并被一个新的虚拟网卡replace,并更改其MAC地址,并将所有networkingconfiguration重置为默认值。

然而,除了导致访客操作系统中众所周知的鬼影NIC的泛滥之外,这也会导致各种各样的问题。

其中之一是,如果实际上是为了某种目的而依靠MAC地址的话,比如运行一个应用程序来使用它来进行基于硬件的授权。

此处讨论的另一个问题是,除非在高级TCP / IP设置中启用了Use this connection's DNS suffix in DNS registration ,否则Windows系统上DHCPconfiguration的NIC将不会在其DNS中注册其PTRlogging。 而且,当然,Azure明确要求虚拟NIC使用DHCP …并且此选项默认情况下启用,Azure决定用新的NICreplace现有的NIC时不会启用; 因此,再见,PTRlogging。

那么,有什么办法可以阻止Azure从新的虚拟网卡中随意更换虚拟网卡,否则就会失去对它们所做的所有configuration调整,改变它们的MAC地址并在客机系统中留下虚拟网卡?

不,没有办法做到这一点,所以取决于MAC地址许可或PTRlogging的东西是你想避免的,如果你正在考虑Azure。