创建大量 Linux 台机器失败,配置状态为“已取消”

Create large number of Linux machines failed with provisioning state `Canceled`

我正在尝试使用此 bash 脚本使用 azure-cli (v 2.0.7) 部署大量 linux 台机器:

#!/usr/bin/env bash

number_of_servers=12
for i in `seq 1 1 ${number_of_servers}`;
do
az vm create --resource-group Automationsystem --name VM${i} --image BaseImage --admin-username azureuser --size Standard_F4S --ssh-key-value ~/.ssh/mykey.pub &
done

机器是从自定义映像创建的。

当我 运行 它时,我得到以下错误:
The resource operation completed with terminal provisioning state 'Canceled'.The operation has been preempted by a more recent operation

我尝试创建更少的机器,但错误仍然存​​在。

我看了这个 question 但它没有解决我的问题。

can I create the machines from custom image?

是的,我们可以使用自定义映像来创建 Azure VMs。 我们可以使用此 template 来部署带有自定义映像的创建 vmss。

"sourceImageVhdUri": {
      "type": "string",
      "metadata": {
        "description": "The source of the blob containing the custom image, must be in the same region of the deployment."
      }
    },

我们应该先将图像存储到 Azure 存储帐户。