是否可以选择将 Azure 经典虚拟映像存储在哪个容器中?
Is it possible to choose in which container does an Azure classic Virtual Image is stored?
在 Azure 资源管理器 (ARM) 中,您可以使用命令 Save-AzureRmVMImage 从给定的 VM 创建虚拟映像。该命令具有此参数:
-DestinationContainerName < String >
Specifies the name of a container. The virtual hard disks (VHDs) that
constitute the VMImage reside in the container that this parameter
specifies. If the VHDs are spread across multiple storage accounts,
this cmdlet creates one container that has this name in each storage
account.
但我正在使用 经典服务模式 (ASM) 并且命令 Save-AzureVMImage 没有该参数。
所以我的问题是:
- 是否可以指示 Azure 在何处存储该 VM 虚拟映像? 有任何解决方法吗?
- 奖励问题:ASM VM 虚拟映像存储在哪里?
第一个问题的答案 - 在经典 VM 虚拟映像中无法指定位置。
第二个问题的答案 - 当您创建经典 VM 时,您 select 一个存储帐户。 图像存储在与 VM 相同的存储帐户中。如果您转到该存储帐户 -> 容器 -> vhds。你可以看到它们。
如果您在创建 VM 时未指定任何存储帐户,它将使用自动生成的帐户。
如果您希望您的映像进入特定的存储帐户,您必须先创建它并在创建您的 VM 时指定它。
在 Azure 资源管理器 (ARM) 中,您可以使用命令 Save-AzureRmVMImage 从给定的 VM 创建虚拟映像。该命令具有此参数:
-DestinationContainerName < String >
Specifies the name of a container. The virtual hard disks (VHDs) that constitute the VMImage reside in the container that this parameter specifies. If the VHDs are spread across multiple storage accounts, this cmdlet creates one container that has this name in each storage account.
但我正在使用 经典服务模式 (ASM) 并且命令 Save-AzureVMImage 没有该参数。
所以我的问题是:
- 是否可以指示 Azure 在何处存储该 VM 虚拟映像? 有任何解决方法吗?
- 奖励问题:ASM VM 虚拟映像存储在哪里?
第一个问题的答案 - 在经典 VM 虚拟映像中无法指定位置。
第二个问题的答案 - 当您创建经典 VM 时,您 select 一个存储帐户。 图像存储在与 VM 相同的存储帐户中。如果您转到该存储帐户 -> 容器 -> vhds。你可以看到它们。
如果您在创建 VM 时未指定任何存储帐户,它将使用自动生成的帐户。
如果您希望您的映像进入特定的存储帐户,您必须先创建它并在创建您的 VM 时指定它。