未经同意,请勿转载!

TL;DR:Azure Local 2606 在 Multi-rack(多机架、跨交换机域) 路径下创建 VM,完整流程分为两大阶段:

  • 阶段 1(前置条件):5 个 H2 章节——Azure / Firewall / Azure Local / VM image / Azure CLI;Network Fabric + L3 isolation domain 官方要求;Guest Management Proxy 官方要求
  • 阶段 2(创建 VM):3 种部署方式(CLI / Portal / ARM);--zone + --strict-placement 两个新增参数;Security type 仅 Standard、Memory type 仅 Static、Arc Gateway 不支持

本篇按"先 prereqs、再 create"的叙事主线展开。Hyperconverged 路径见第 1 篇


作者声明


〇、HC vs MR 路径选型速查(5 秒决策)

业务需求 HC 路径 MR 路径(本篇)
单集群 / 单机房 ✅ 典型场景 ✅ 可用但偏重
多机架 / 跨机房 ❌ 不适用 ✅ 典型场景
Trusted Launch(secure boot + vTPM) ✅ 支持 ❌ 不支持
Dynamic Memory ✅ 支持 ❌ 不支持
Availability Zone(机架级容灾) ❌ 不适用 ✅ --zone
Strict Placement ❌ 不适用 ✅ --strict-placement
Arc Gateway ✅ 支持 ❌ 不支持
Marketplace 镜像 支持直接选择 部署时使用 Storage Account 中的镜像(镜像通常可由 Marketplace 导入)
Linux + Guest Management Proxy ✅ 验证(仅 Ubuntu Server) ✅ 官方要求(所有 Linux)
Guest Management Proxy 建议 官方要求

一句话选型

  • HC 路径:单集群、需要 Trusted Launch / Dynamic Memory / Arc Gateway / 直接 Marketplace 镜像
  • MR 路径(本篇):多机架、需要机架级容灾、可接受 Standard + Static 内存降级

如果选 HC 路径,请看 第 1 篇 · Hyperconverged 完整实战


第一部分:前置条件(Prerequisites)

一、为什么 Multi-rack 的 Prerequisites 是独立页

维度 Hyperconverged(第 1 篇) Multi-rack(本篇)
Prerequisites 位置 内嵌在综合页 独立页
章节数 1 段(含 5 种 tab) 5 个 H2 章节
独有要求 (无) Network Fabric + L3 isolation domain + L3 external/internal network + Guest Management Proxy 官方要求
VM image 详规 仅列 3 种来源链接 明确 Linux 自定义镜像要求(cloud-init、Serial Console),以及 Windows 镜像注意事项
客户端 CLI 1 项 prereq 5 步流程:安装 CLI + 重启 + az login + az version + 安装 stack-hci-vm extension

二、Azure requirements(订阅要求)

官方原文

  • "To provision Azure Local VMs and VM resources such as network interfaces, VM images, and data disks, you must have access to an Azure subscription with the appropriate Role-based access control (RBAC) role and permissions assigned."
  • "Azure Local VM infrastructure is supported in the regions documented in the What is Azure Local for multi-rack deployments?. For Azure Local VMs, all entities must be registered, enabled, or created in the same region."
  • "The entities included with your Azure Local for multi-rack deployments include Network Fabric Controller, Cluster Manager, Custom Location, VM resources (disks, NICs, images), and VMs created from Azure Arc. These entities can be in different or same resource groups as long as all resource groups are in the same region."

作者解读

要求
订阅 + RBAC 订阅级访问即可;详见 multi-rack-assign-vm-rbac-roles
Region 同一性 官方要求相关 Azure 资源位于同一区域;范围:Network Fabric Controller / Cluster Manager / Custom Location / VM resources / Arc-enabled VMs
Resource Group 跨 RG 可,但所有 RG 必须同 region

作者解读 [常见误区]

❌ 常见误区:"VM 在哪个 RG 都可以,反正都是同一 region" ✅ 真相:相关 Azure 资源必须在同一 region(硬要求);但 RG 可以不同

三、Firewall requirements(防火墙要求)

官方原文: "Make sure the requirements as listed in Required firewall URLs for Azure Local deployments are satisfied to allow communication between the Arc VMs running on Azure Local and Azure Arc."

作者解读

  • 官方出站 URL 列表见 required-firewall-urls 页面
  • 包含:Arc Connected Machine Agent endpoints(*.guestconfiguration.azure.com*.his.arc.azure.com 等)+ Azure Local 自身 control plane endpoints + Azure Stack HCI 注册 endpoint
  • 防火墙要求是 VM 与 Azure Arc 通信的前提——Guest Management / VM Extension / Update Management 都依赖

作者解读 [常见误区]

❌ 常见误区:"Multi-rack 部署在内网,不用配出站 URL" ✅ 真相:即使 MR 部署,Azure Local VM 仍需要与 Azure Arc 控制平面通信——不放行 URL → Guest Management 不会启用

四、Azure Local requirements(集群要求)

官方原文(4 条 checklist)

  1. "Access to an Azure Local instance with the following configuration:
    • Deployed with the network fabric.
    • At least one Layer 3 isolation domain is configured.
    • At least one Layer 3 external network and one Layer 3 internal network with sufficiently large IP CIDR.
    • Custom location is configured."
  2. Note: "The first eight IPs of the address prefix associated with a Layer 3 internal network are reserved for internal use. Plan the size of the IP CIDR based on how many IPs your workloads require."
  3. "Go to the Overview page in the Azure Local resource. Verify that Detailed Status shows as Running. You should also see a custom/extended location in the cluster overview page."
  4. "Details of your proxy server to provide during VM creation. Azure Local VMs don't have external connectivity to enable guest management without proxy details configured at the time of creation."

4.1 Network Fabric + L3 isolation domain(MR 专属)

  • Network Fabric 是 Multi-rack 部署的"网络底座"——HC 不需要
  • L3 isolation domain(Layer 3 isolation domain)是 Network Fabric 内的逻辑隔离单元
  • L3 external network 与 L3 internal network 是 VM 流量出口的两类网络
  • L3 internal network 前 8 个 IP 被保留——规划 IP CIDR 时必须预留;不代表必须规划 /24,按实际 IP 需求规划即可

4.2 Custom Location + Detailed Status = Running

  • Overview 页能看到 custom/extended location 是必备验证项
  • Running 是官方要求的部署前提

4.3 Guest Management Proxy(Multi-rack 官方要求

官方原文(关键):"Azure Local VMs don't have external connectivity to enable guest management without proxy details configured at the time of creation."

  • MR 路径 Guest Management Proxy 是硬性要求——不是"建议"
  • 与 HC 的差异:HC 是"建议设置 Proxy 以启用 Guest Management";MR 是"没有 Proxy → 没有外部连接 → Guest Management 功能无法启用"
  • Proxy 配置时机:必须在 VM 创建时传入——不能后修改
  • 配置方式:CLI 通过 --proxy-configuration 4 个子参数;Portal 通过专门字段(详见 §十三)

4.4 网络要求速查表

要求 关键约束
Network Fabric 必须已部署 MR 专属
L3 isolation domain 至少 1 个 网络隔离单元
L3 external network 至少 1 个 出口流量
L3 internal network 至少 1 个 前 8 IP 保留
IP CIDR "sufficiently large" 未给具体数字——按 IP 需求规划
Custom Location 已配置 Overview 页可查
Detailed Status Running 官方要求的部署前提
Guest Management Proxy 官方要求 VM 创建时传入

五、VM image requirements(内容级要求)

官方原文: "For Azure Local VM images to be used on Azure Local, make sure to satisfy the following requirements:"

  • "Use only English (en-us) language VHDs to create VM images."
  • "For Linux VM images:
    • To allow for initial configuration and customization during VM provisioning, you need to ensure that the image contains cloud init with nocloud datasource.
    • You need to configure the bootloader, kernel, and init system in your image to enable both serial connectivity and text-based console. Use both GRUB_TERMINAL="console serial" and kernel cmdline settings. This configuration is required to enable serial access for troubleshooting deployment issues and console support for your VM after deployment. Make sure the serial port settings on your system and terminal match to establish proper communication."

5.1 通用:en-us VHD

Microsoft 官方要求使用 en-us VHD,以确保镜像能够正确初始化。

5.2 Linux VM 镜像(2 条)

作用
cloud-init nocloud datasource cloud-init 根据提供的 userdata 完成初始化
Serial connectivity + text-based console(GRUB + kernel + init) Azure Local 依赖串口控制台进行 VM 启动日志采集和故障诊断

5.3 与 HC 路径对比

Hyperconverged Multi-rack
en-us VHD 未明示 官方要求
Linux cloud-init nocloud 未明示 官方要求
Linux serial console 未明示 官方要求(GRUB + kernel + init)

作者解读:MR 路径的镜像要求比 HC 更明确——但上述 Linux 配置是所有 Azure Local Linux VM 的最佳实践(HC 路径默认 Marketplace 镜像已内置)。所以"官方要求"是相对于"自定义 VHDX 上传"场景。

六、Azure CLI requirements(客户端 5 步流程)

官方原文:"Skip this section if you aren't using Azure CLI to provision and manage Azure Local VMs and VM resources."

6.1 CLI 安装 5 步流程

  1. 安装最新版 Azure CLI——在客户端机器上安装
  2. 重启终端——确保 PATH 变量生效
  3. az login——本地安装用 az login;其他登录方式见 Sign in with the Azure CLI
  4. az version——查看版本与依赖库;升级用 az upgrade
  5. 安装 stack-hci-vm extension——见下节

6.2 stack-hci-vm extension 安装

az extension list --output table
az extension remove --name "stack-hci-vm"
az extension add --name "stack-hci-vm" --version "*"
az extension list --output table

作者解读

  • --version "*" 表示安装最新版本——官方推荐
  • stack-hci-vm extension 是 Azure CLI 与 Azure Local VM 交互的命令集
  • 建议每次 VM 操作前 az extension list 检查版本

七、Multi-rack Prereqs 全量速查(vs HC)

Prerequisites 项 Hyperconverged Multi-rack(本篇)
Azure 订阅 + RBAC
Azure 区域同一性 未明示 ✅ 官方要求
出站 URL 防火墙 默认通过 Network Fabric 管控 ✅ 官方明文要求
Resource Group 建议同 RG 跨 RG 可,但同 region
Network Fabric + L3 隔离域 不涉及 ✅ 官方要求
L3 external/internal network logical network 即可 ✅ 官方要求 + 前 8 IP 保留
Custom Location
Detailed Status = Running 未明示 ✅ 官方要求
VM image 来源 3 种来源 1 种来源(Storage account,详见 §十.4)
en-us VHD 未明示 ✅ 官方要求
Linux cloud-init nocloud 未明示 ✅ 官方要求
Linux serial console 未明示 ✅ 官方要求
Network Interface
Guest Management Proxy 建议 ✅ 官方要求
Azure CLI 安装 1 项 5 步流程
stack-hci-vm extension 隐含 ✅ 明确安装步骤

第二部分:创建 VM(实战命令)

八、顶部重要提示(官方 Note)

官方原文(页面顶部):"> Arc gateway isn't supported on Azure Local VMs."

作者解读

  • 这条 Note 位于页面最顶部——意味着它是 MR 路径下的首要限制
  • HC 路径下 az stack-hci-vm create ... --gateway-id $gw 是支持的;MR 不支持

九、Multi-rack 创建 VM 与 HC 的 6 大差异速查

维度 Hyperconverged Multi-rack(本篇)
Arc Gateway ✅ --gateway-id 可用 ❌ 不支持
Security type Standard / Trusted Launch 仅 Standard
Memory type Static / Dynamic Memory 仅 Static
Availability Zone ❌ 不涉及 ✅ --zone <zone-name>(详见 §十一.3.A)
Strict Placement ❌ 不涉及 ✅ --strict-placement true/false(详见 §十一.3.B)
Guest Management Proxy 建议 官方要求(详见 §四.3)
Trusted Launch 验证 GuestStateIsolationType cmdlet 无(不支持)
VM images 3 种来源 1 种来源(Storage account,详见 §十.4)

十、Prerequisites(本页范围内)

10.1 3 种 tab 通用项

  • 订阅 + RBAC 角色
  • Resource group
  • VM image
  • Custom location
  • Guest Management Proxy 服务器详情MR 官方要求

10.2 CLI tab 额外项

10.3 ARM tab 额外项

  • 逻辑网络或虚拟网络子网——"Access to a logical network or virtual network subnet that you associate with the VM on your Azure Local instance."

10.4 VM image 来源(仅 Storage account

官方原文:"These VM images could be created using VM image starting from an image in Azure Storage account."

作者解读 [关键]

⚠️ MR 路径下 VM image 来源仅 Storage account 一种——不能直接引用 Marketplace Image;Marketplace 镜像通常先导入到 Storage Account 再使用(详见 multi-rack-virtual-machine-image-storage-account

十一、Azure CLI 路径

11.1 必填参数速查表

参数 说明
--name VM 名称
--resource-group VM 所在 RG
--admin-username / --admin-password VM 管理员
--image VM 镜像 ARM resource ID(Storage account 镜像
--location Azure 区域
--custom-location Custom Location ARM resource ID
--nics NIC 名称或 ID;至少 1 个
--authentication-type all / password / ssh
--memory-mb CLI 参数;1024 倍数(如 1024 / 2048 / 4096 / 8192)
--processors vCPU 数
--proxy-configuration 官方要求(详见 §四.3)
--zone 新增:Availability Zone 名称
--strict-placement 新增:true / false
--enable-agent WS 2012/2012 R2 设为 false
--enable-vm-config-agent WS 2012/2012 R2 设为 false

11.2 完整命令(Multi-rack 全参数)

az stack-hci-vm create \
  --subscription $subscription \
  --name $vmName \
  --resource-group $resourceGroup \
  --admin-username $userName \
  --admin-password $password \
  --computer-name $computerName \
  --image $imageName \
  --location $location \
  --authentication-type all \
  --nics $nicName \
  --custom-location $customLocationID \
  --hardware-profile memory-mb="8192" processors="4" \
  --zone $zone \
  --strict-placement true \
  --enable-agent true \
  --enable-vm-config-agent true \
  --proxy-configuration \
    http_proxy=$httpProxy \
    https_proxy=$httpsProxy \
    no_proxy="localhost,127.0.0.1,.svc,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,100.0.0.0/8" \
    cert_file_path=$certPath

11.3 关键参数详解

A. --zone(Availability Zone)

官方原文:"zone (Optional) Name of the availability zone (rack) where you want the VM to be placed."

  • 在 Multi-rack 中,Availability Zone 表示 Network Fabric 中定义的 Zone(通常对应一个 Rack)
  • 跨机架 VM 调度可实现机架级容灾
  • 必须先配置 Network Fabric + 至少 1 个 rack 才能使用 --zone
  • 不传 --zone 时,VM 由 Azure Local 自动选择 zone(best-effort)
B. --strict-placement

官方原文:"strict-placement (Optional) Choose strict placement if you have specified a zone and want the VM to only be scheduled on the specified availability zone. If the specified zone doesn't have capacity or is unavailable, VM creation will fail. If you specify no for this parameter, the VM will be scheduled on the specified zone on a best-effort basis."

作者解读 [常见误区]

❌ 常见误区:"strict-placement 是默认行为" ✅ 真相:CLI 参数默认 false——指定的 zone 没容量时,VM 会尝试其他 zone

❌ 常见误区:"strict-placement true 后 VM 一定在该 zone" ✅ 真相:strict-placement true 时,如果 zone 没容量或不可用,VM 创建直接失败(不会 fallback)

C. --memory-mb(CLI 参数;1024 倍数)

官方原文:"The value must be a multiple of 1024 (that is, specified in whole GB increments such as 1024, 2048, 4096, 8192)."

  • HC 路径没此限制(仅是"建议");MR 路径是硬要求
  • 传 memory-mb="3000"(非 1024 倍数),命令会失败

十二、Linux VM

官方原文:"To create a Linux VM, use the same command that you used to create the Windows VM."

"For SSH keys, you need to pass the ssh-key-values parameters along with authentication-type ssh. If you are using an existing key, ensure that the public key is in OpenSSH format."

官方原文(Linux VM Important):"The VM created has guest management enabled by default. It is required to provide HTTP proxy to enable guest management properly."

作者解读

  • MR 路径下 Linux Proxy 也是官方要求——与 HC 路径的差异(HC 仅 Ubuntu Server 验证过;MR 全部 Linux 官方要求)
  • SSH key 格式必须是 OpenSSH——其他格式(PEM、RSA 私钥等)需先转换

十三、Azure Portal 路径

13.1 5 步流程

  1. Azure Arc cluster view → Virtual machines
  2. 顶部命令栏 → + Create VM
  3. Basics tab → Project details + Instance details
  4. VM extensions → 启用 Guest Management
  5. VM proxy configuration → 填 4 个字段(http_proxy / https_proxy / no_proxy / cert_file_path,详见 §四.3)

13.2 关键参数(MR 专属)

字段 说明
Security type 仅 Standard(HC 有 Trusted Launch 选项,MR 没有)
Memory type 仅 Static(HC 有 Dynamic 选项,MR 没有)
Availability Zone 新增:选择机架名(见 §十一.3.A)
Strict placement 新增:Yes / No(见 §十一.3.B)

13.3 NIC 限制(关键)

官方原文(Portal VM extensions Note)

  • "Add at least one network interface through the Networking tab to complete guest management setup."
  • "The network interface that you enable, must have a valid IP address and internet access by setting VM proxy."

作者解读Guest Management 功能依赖 NIC + Proxy——没有 NIC 或没有 Proxy,Guest Management 都无法启用

十四、ARM template 路径

  • ARM template 通过 az deployment group create 或 Portal 触发
  • 参数与 CLI 路径对齐,但需要 Logical Network(HC 路径是 NIC,MR 路径是 Logical Network)
  • 关键参数image / custom-location / logicalNetwork / proxy-configuration

十五、Use managed identity(自动启用)

官方原文:"When the VMs are created on your Azure Local via Azure CLI or Azure portal, a system-assigned managed identity is also created that lasts for the lifetime of the VMs."

"The VMs on Azure Local are extended from Arc-enabled servers and can use system-assigned managed identity to access other Azure resources that support Microsoft Entra ID-based authentication. For example, the VMs can use a system-assigned managed identity to access the Azure Key Vault."

作者解读

  • 与 HC 路径完全一致——system-assigned managed identity 自动创建
  • 用于访问支持 Microsoft Entra ID-based authentication 的 Azure 资源
  • 典型用例:Azure Key Vault(官方明文示例)
  • 不需要 az identity assign——全自动

第三部分:重点结论 + 附录

十六、重点结论([作者总结])

网络与集群

  1. MR 部署的硬性前提是 Network Fabric 已部署——现有 ToR / BGP 不替代。
  2. 官方要求相关 Azure 资源位于同一区域;RG 可不同。
  3. L3 internal network 前 8 个 IP 被保留——IP 规划时扣掉;不代表官方推荐 /24,按工作负载需求规划。
  4. Detailed Status = Running 是官方要求的部署前提——不是"不 Running 就一定失败"。

镜像要求

  1. MR 路径 VM image 仅 Storage account 一种——不能直接引用 Marketplace Image;Marketplace 镜像通常先导入到 Storage Account 再使用。
  2. Linux 自定义镜像官方要求:en-us VHD + cloud-init nocloud + Serial Console(GRUB + kernel + init)。Windows 镜像在 Marketplace 已有标准配置。

创建 VM 差异

  1. MR 比 HC 多 9 项官方要求——本质是"网络底座更复杂 + 跨机架可靠性更高"。
  2. MR 有 6 大功能差异,其中 4 项是降级:不支持 Trusted Launch / Dynamic Memory / Arc Gateway / 直接 Marketplace 引用。
  3. 新增两个 Multi-rack 专属参数--zone(指定目标 Availability Zone)与 --strict-placement(false=best-effort,true=严格调度)。
  4. CLI 参数 --memory-mb 强制 1024 倍数——HC 是建议,MR 是硬要求;Portal 用户不受此限制。
  5. Arc Gateway 不支持——页面顶部 Note 明示。
  6. MR 路径不能用 Trusted Launch 或 Dynamic Memory——业务需要时必须选 HC 路径。
  7. Guest Management Proxy 是 MR 官方要求——不配 → Guest Management 功能无法启用(VM Extension / Update Manager / Run Command 失效)。
  8. Guest Management 功能依赖 NIC + Proxy——没有 NIC 或没有 Proxy,Guest Management 都无法启用。
  9. Availability Zone 不是 Azure 公有云 Region——MR 路径下是 Network Fabric 中定义的 Zone(通常对应一个 Rack)。

完整误区与各章详细说明参见上文 §一~§十五各小节。


附录 A:术语约定

术语 含义
Multi-rack Azure Local 2606+ 的多机架、跨交换机域部署形态
Network Fabric MR 部署的网络编排底座
L3 isolation domain Layer 3 隔离域——Network Fabric 内的逻辑隔离单元
L3 external network VM 流量的出口网络
L3 internal network VM 流量的内部网络;前 8 IP 保留
Custom Location Azure Local 集群定位符
cloud-init nocloud cloud-init 读取本地配置的 datasource
GRUB_TERMINAL="console serial" GRUB 通过串口输出启动菜单
stack-hci-vm extension Azure CLI 与 Azure Local VM 交互的命令扩展
Detailed Status Azure Local 集群 Overview 页的状态字段;Running 是 VM 创建的前置条件
Availability Zone(MR 专属) Network Fabric 中定义的 Zone(通常对应一个 Rack)
Strict Placement strict-placement=true 时严格按 zone 调度;false 时 best-effort
1024 倍数限制 CLI 参数 --memory-mb 必须 1024 倍数
Guest Management Proxy Azure Local VM 启用 Guest Management 所必需的 HTTP/HTTPS Proxy
system-assigned managed identity Azure 自动给 VM 分配的托管标识

附录 B:参考链接


文档维护:本篇对应 azloc-2606(2026 年 7 月视图),适用于 azloc-2512 及以后的 Multi-rack 部署。如官方在更高版本拆分 Create VM 章节(如按 Trusted Launch 或 GPU 类型拆子页面),本篇将随之更新。

Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐