Azure 中的虚拟网络(经典)和虚拟网络有什么区别?

What is the difference between Virtual Network (Classic) and Virtual Network in Azure?

注意到 Azure 中的虚拟网络和虚拟网络(经典),想知道它们之间有什么区别以及何时选择什么?

Azure 有两个 different deployment models 用于创建和使用资源:Resource Managerclassic.

创建、配置和管理 Azure 资源的方式在这两种模型之间有所不同。在经典模式下,Azure 中预配的每个资源都是一个管理单元。您单独管理所有资源。经典模式不允许对资源进行分组,这使得管理Azure资源变得困难。

Azure资源管理模式增加了资源组的概念,资源组是共享共同生命周期的资源的容器。在 ARM 模式下,您可以将解决方案的所有服务作为一个整体进行部署、管理和监控,而不是单独处理这些服务。此外,您可以将标签应用于资源,以逻辑组织订阅中的所有资源。

当您从 Azure PowerShell 等命令行与经典模式资源交互时,您正在使用 Azure 服务管理 API 调用 (ASM)。 ASM 是一种访问 Azure 资源的传统方式。在资源管理器模式下,您正在使用 Azure Resource Manager Rest API. When a user sends a request from any of the Azure tools, APIs, or SDKs, Resource Manager receives the request. It authenticates and authorizes the request. Resource Manager sends the request to the Azure service, which takes the requested action. See Azure Resource Manager overview.

虚拟网络(经典)用于经典模型。 Azure 中的虚拟网络是为资源管理器模型创建的。目前,Microsoft 建议您对所有新资源使用资源管理器。据我所知,大多数情况下,在为 cloud services 创建 VNet 时会使用虚拟网络(经典)。对于 Resource Manager 资源,您只需在 Azure 门户中创建虚拟网络。

There are three scenarios to be aware of:

  • Cloud Services does not support Resource Manager deployment model.
  • Virtual machines, storage accounts, and virtual networks support both Resource Manager and classic deployment models.
  • All other Azure services support Resource Manager

这是一篇关于 Azure Classic vs Azure Resource Manager

的博客

So which one should I use?

Since both modes are viable options at this point, it is necessary to pay careful attention to the features that each offer and your specific requirements. ARM cannot simply be assumed to be the best fit as it simply may not meet all of your or your customer’s needs.