如何将虚拟机快照复制到 Azure 中的存储帐户?

问题描述 投票:0回答:1

我可以使用 az cli 成功创建 VM 磁盘快照。 如何使用 az cli 将快照复制到 azure 存储帐户?

azure powershell azure-storage azure-virtual-machine
1个回答
0
投票

如何使用 az cli 将快照复制到 azure 存储帐户?

您可以使用以下命令通过 Azure CLI 将

VM snapshot
复制到 Azure 存储帐户。

首先,从门户复制虚拟机快照 URL:

Azure 门户 > 快照 > 选择快照 > 快照导出 > 生成 URL

enter image description here

命令:

az storage blob copy start --account-name "venkat679" --destination-blob "abcd.vhd" --destination-container "test" --account-key "<Your account key>" --source-uri "<snapshoturl>"

输出:

{
  "client_request_id": "bc99xxxxxee-a269-00155df677e8",
  "copy_id": "xxxx",
  "copy_status": "pending",
  "date": "2024-04-04T06:15:30+00:00",
  "etag": "\"0x8DC546EA152C803\"",
  "last_modified": "2024-04-04T06:15:30+00:00",
  "request_id": "8xxxxx,
  "version": "2022-11-02",
  "version_id": null
}

enter image description here

复制过程需要一些时间才能完成,一段时间后,它将反映在您的存储容器中。

传送门:

文件已成功复制到 Azure 存储容器。

enter image description here

参考:

az 存储 blob 副本 |微软学习

© www.soinside.com 2019 - 2024. All rights reserved.