如何使用 ARM 模板将 Azure VM 添加到现有 Vnet 或新 Vnet
How can I add Azure VM to existing Vnet or new Vnet using ARM template
我正在为 ARM 模板创建 JSON 文件以部署 Azure VM 及其依赖资源。
我已经使用以下资源创建了 RHEL VM(都是新创建的):-
Storage Account
Diagnostic Storage Account
Virtual Network
Network Interface
Public IP Address
Network Security Group
现在我想使用现有的 Vnet、子网或新的 Vnet、子网创建 Azure VM。有没有我可以跟进的例子。我该怎么做?
这对于 Microsoft documentation 来说非常简单。
这里的挑战通常在于理解依赖关系。在该示例中,您并不是说我希望此 VM 在此 Vnet 中启动,而是说 "I want this VM to use this NIC which is associated with this Subnet of this Vnet"
最简单的方法是只使用 link 底部提供的示例并继续前进。对于您的情况,您最终将能够简单地删除 Vnet 资源块并添加您自己的 Vnet 属性。
This is an extra tool 用于使用 ARM 模板。
Now I want to create Azure VM with existing Vnet
你可以参考这个example。
如果您想要更多模板,可以搜索 templates gallery 以找到您需要的模板。
or new Vnet, subnet.
你可以参考这个example,只需要使用现有的资源组。
我正在为 ARM 模板创建 JSON 文件以部署 Azure VM 及其依赖资源。
我已经使用以下资源创建了 RHEL VM(都是新创建的):-
Storage Account
Diagnostic Storage Account
Virtual Network
Network Interface
Public IP Address
Network Security Group
现在我想使用现有的 Vnet、子网或新的 Vnet、子网创建 Azure VM。有没有我可以跟进的例子。我该怎么做?
这对于 Microsoft documentation 来说非常简单。
这里的挑战通常在于理解依赖关系。在该示例中,您并不是说我希望此 VM 在此 Vnet 中启动,而是说 "I want this VM to use this NIC which is associated with this Subnet of this Vnet"
最简单的方法是只使用 link 底部提供的示例并继续前进。对于您的情况,您最终将能够简单地删除 Vnet 资源块并添加您自己的 Vnet 属性。
This is an extra tool 用于使用 ARM 模板。
Now I want to create Azure VM with existing Vnet
你可以参考这个example。
如果您想要更多模板,可以搜索 templates gallery 以找到您需要的模板。
or new Vnet, subnet.
你可以参考这个example,只需要使用现有的资源组。