我需要概括和捕获一个 linux 虚拟机。
我使用 ARM 模板部署了 VM。在 ARM 模板中,我使用以下内容将 VHD 存储在存储帐户中
"storageProfile": {
"imageReference": {
"publisher": "[variables('imagePublisher')]",
"offer": "[variables('imageOffer')]",
"sku": "[variables('imageSku')]",
"version": "latest"
},
"osDisk": {
"name": "[parameters('virtualMachineName')]",
"createOption": "fromImage",
"vhd": {
"uri": "[concat(concat(reference(resourceId(variables('resourceGroupName'), 'Microsoft.Storage/storageAccounts', parameters('storageAccountName')), '2015-06-15').primaryEndpoints['blob'], 'vhds/'), parameters('virtualMachineName'), concat(uniqueString(resourceGroup().id), '.vhd'))]"
}
},
"dataDisks": []
},
现在我按照这个文档来创建和镜像和虚拟机。
当我执行以下命令时,我收到错误
az image create --resource-group myResourceGroup --name myImage --source myVM
The storage account containing blob https://testvmstorage.blob.core.windows.net/vhds/testvmyrg5wfer6xbcg.vhd is or has been encrypted. Copy the blob to an unencrypted storage account before importing.