有没有办法在 azure 中将网络接口添加到另一个资源组的虚拟机?

Is there a way to add a Network interface to a Virtual Machine of another resource group in azure?

我已经在 azure 中有一个资源组,它有一个虚拟机,并且它与一个网络接口相关联以连接到该组中的 vnet。

resource-group-1
 -> virtual machine
 -> network interface
 -> vnet
 -> other things ...

但现在我创建了第二个资源组,其中将包含一些资源和一个 vnet。我现在想使用存在于 resource-group-1 上的同一个虚拟机,所以我在那里创建了一个网络接口:

resource-group-2
 -> network interface 2
 -> vnet 2

现在我想将resource-group-1的网络接口2连接到resource-group-2中的虚拟机。

我已经尝试过,就像文档中说的那样停止 VM 并转到 SettingsNetworkingAttach network interface,但我似乎无法 select 那里有用的东西。

好像很久以前,这个修改只能通过powershell来完成。 我看到的另一件事是,在向虚拟机添加新网卡时,我们无法更改 vnet。这可能根本不可能?

目前,我猜以下选项可能使这成为可能

不可能将存在于不同 VNet 中的新网络接口从当前附加到 VM 的网络接口添加到现有 VM。不能将不同 VNet 中的两个 NIC 添加到同一个 Azure VM。参考this.

如果要将 azure VM 及其 NIC 移动到另一个资源组,一个简单的方法是 move a VM to another resource group. Read supported moving resources

此外,还有一个Step-by-Step PowerShell Guide:如何将Azure VM移动到不同的资源组?