排查 Azure 中共享映像库的问题Troubleshoot shared image galleries in Azure

如果在对共享映像库、映像定义和映像版本执行任何操作时遇到问题,请在调试模式下再次运行失败的命令。If you have problems performing any operations on shared image galleries, image definitions, and image versions, run the failing command again in debug mode. 在 Azure CLI 中,请通过传递 --debug 开关激活调试模式;在 PowerShell 中,请通过传递 -Debug 开关激活调试模式。You activate debug mode by passing the --debug switch with the Azure CLI and the -Debug switch with PowerShell. 找到错误以后,请按本文的说明来排查错误。After you've located the error, follow this article to troubleshoot it.

库名称无效。允许的字符为英文字母数字字符(带下划线),句点必须位于中间,总共最多 80 个字符。所有其他的特殊字符(包括短划线)都不允许使用。Gallery name is invalid. Allowed characters are English alphanumeric characters, with underscores, and periods allowed in the middle, up to 80 characters total. All other special characters, including dashes, are disallowed.
原因:库名不符合命名要求。Cause: The name for the gallery does not meet the naming requirements.
解决方法:选择满足以下条件的名称:Workaround: Choose a name that meets the following conditions:

  • 存在 80 个字符的限制Has an 80-character limit
  • 只包含英文字母、数字、下划线和句点Contains only English letters, numbers, underscores, and periods
  • 以英文字母或数字开头和结尾Starts and ends with English letters or numbers

根据验证规则,实体名称 "galleryName" 无效: ^[^_\W][\w-._]{0,79}(?<![-.])$。The entity name 'galleryName' is invalid according to its validation rule: ^[^_\W][\w-._]{0,79}(?<![-.])$.
原因:库名不符合命名要求。Cause: The gallery name does not meet the naming requirements.
解决方法:选择满足以下条件的库名:Workaround: Choose a name for the gallery that meets the following conditions:

  • 存在 80 个字符的限制Has an 80-character limit
  • 只包含英文字母、数字、下划线和句点Contains only English letters, numbers, underscores, and periods
  • 以英文字母或数字开头和结尾Starts and ends with English letters or numbers

提供的资源名称 <galleryName> 的以下尾随字符无效: <character>。名称不能以以下字符结尾: <character>The provided resource name <galleryName> has these invalid trailing characters: <character>. The name can not end with characters: <character>
原因:库名以句点或下划线结尾。Cause: The name for the gallery ends with a period or underscore.
解决方法:选择满足以下条件的库名:Workaround: Choose a name for the gallery that meets the following conditions:

  • 存在 80 个字符的限制Has an 80-character limit
  • 只包含英文字母、数字、下划线和句点Contains only English letters, numbers, underscores, and periods
  • 以英文字母或数字开头和结尾Starts and ends with English letters or numbers

提供的位置 <region> 不适用于资源类型 "Microsoft.Compute/galleries"。资源类型的可用区域列表为 …The provided location <region> is not available for resource type 'Microsoft.Compute/galleries'. List of available regions for the resource type is …
原因:为库指定的区域不正确,或者该区域需要一个访问请求。Cause: The region specified for the gallery is incorrect or requires an access request.
解决方法:检查区域名称拼写是否正确。Workaround: Check that the region name is spelled correctly. 可以运行此命令来查看你有权访问哪些区域。You can run this command to see what regions you have access to. 如果区域不在列表中,请提交访问请求If the region is not in the list, submit an access request.

删除嵌套资源前无法删除资源。Can not delete resource before nested resources are deleted.
原因:你已尝试删除至少包含一个现有映像定义的库。Cause: You've tried to delete a gallery that contains at least one existing image definition. 库必须为空后才能删除。A gallery must be empty before it can be deleted.
解决方法:删除库中的所有映像定义,然后删除库。Workaround: Delete all image definitions inside the gallery and then proceed to delete the gallery. 如果映像定义包含映像版本,则必须先删除映像版本,然后才能删除映像定义。If the image definition contains image versions, you must delete the image versions before you delete the image definitions.

资源 <galleryName> 已存在于资源组 <resourceGroup> 中的位置 <region_1>。不能在位置 <region_2> 创建同名的资源。请选择新的资源名称。The resource <galleryName> already exists in location <region_1> in resource group <resourceGroup>. A resource with the same name cannot be created in location <region_2>. Please select a new resource name.
原因:资源组中已存在同名的现有库,而你已尝试在另一区域中创建另一个同名的库。Cause: You have an existing gallery in the resource group with the same name and have tried to create another gallery with the same name but in a different region.
解决方法:使用其他库或资源组。Workaround: Either use a different gallery or use a different resource group.

创建或修改映像定义Creating or modifying image definitions

不允许更改属性 "galleryImage.properties.<property>"。Changing property 'galleryImage.properties.<property>' is not allowed.
原因:你已尝试更改 OS 类型、OS 状态、Hyper-V 代系、产品/服务、发布者或 SKU。Cause: You tried to change the OS type, OS state, Hyper-V generation, offer, publisher, or SKU. 系统不允许更改这些属性中的任何一个。Changing any of these properties is not permitted.
解决方法:改为创建新的映像定义。Workaround: Create a new image definition instead.

*资源 <galleryName/imageDefinitionName 已存在于资源组 <resourceGroup 中的位置 <region1。不能在位置 <region2 创建同名的资源。请选择新的资源名称。The resource <galleryName/imageDefinitionName> already exists in location <region_1> in resource group <resourceGroup>. A resource with the same name cannot be created in location <region_2>. Please select a new resource name.
原因:同一库和资源组中已存在同名的现有映像定义。Cause: You have an existing image definition in the same gallery and resource group with the same name. 你已尝试在同一库中创建另一个同名但区域不同的映像定义。You've tried to create another image definition with the same name and in the same gallery but in a different region.
解决方法:对映像定义使用其他名称,或将映像定义放在其他库或资源组中。Workaround: Use a different name for the image definition, or put the image definition in a different gallery or resource group.

提供的资源名称 <galleryName>/<imageDefinitionName> 的以下尾随字符无效: <character>。名称不能以以下字符结尾: <character>The provided resource name <galleryName>/<imageDefinitionName> has these invalid trailing characters: <character>. The name can not end with characters: <character>
原因:<imageDefinitionName> 名称以句点或下划线结尾。Cause: The <imageDefinitionName> name ends with a period or underscore.
解决方法:选择满足以下条件的映像定义名称:Workaround: Choose a name for the image definition that meets the following conditions:

  • 存在 80 个字符的限制Has an 80-character limit
  • 只包含英文字母、数字、下划线、连字符和句点Contains only English letters, numbers, underscores, hyphens, and periods
  • 以英文字母或数字开头和结尾。Starts and ends with English letters or numbers.

根据验证规则,实体名称 <imageDefinitionName> 无效: ^[^_\W][\w-._]{0,79}(?<![-.])$"The entity name <imageDefinitionName> is invalid according to its validation rule: ^[^_\W][\w-._]{0,79}(?<![-.])$"
原因:<imageDefinitionName> 名称以句点或下划线结尾。Cause: The <imageDefinitionName> name ends with a period or underscore.
解决方法:选择满足以下条件的映像定义名称:Workaround: Choose a name for the image definition that meets the following conditions:

  • 存在 80 个字符的限制Has an 80-character limit
  • 只包含英文字母、数字、下划线、连字符和句点Contains only English letters, numbers, underscores, hyphens, and periods
  • 以英文字母或数字开头和结尾Starts and ends with English letters or numbers

资产名称 galleryImage.properties.identifier.<property> 无效。该名称不能为空。允许的字符为大写或小写字母、数字、连字符 (-)、句点 (.)、下划线 (_)。名称不允许以句点 (.) 结尾。名称长度不能超过 <number> 个字符。Asset name galleryImage.properties.identifier.<property> is not valid. It cannot be empty. Allowed characters are uppercase or lowercase letters, digits, hyphen(-), period (.), underscore (_). Names are not allowed to end with period(.). The length of the name cannot exceed <number> characters.
原因:发布者、产品/服务或 SKU 值不符合命名要求。Cause: The publisher, offer, or SKU value does not meet the naming requirements.
解决方法:选择满足以下条件的值:Workaround: Choose a value that meets the following conditions:

  • 发布者名称的限制为 128 个字符,产品/服务和 SKU 名称的限制为 64 个字符Has a 128-character limit for publisher or 64-character limit for offer and SKU
  • 只包含英文字母、数字、连字符、下划线和句点Contains only English letters, numbers, hyphens, underscores, and periods
  • 不以句点结尾Does not end with a period

无法对嵌套资源执行请求的操作。找不到父资源 <galleryName>。Can not perform requested operation on nested resource. Parent resource <galleryName> not found.
原因:当前订阅和资源组中没有名为 <galleryName> 的库。Cause: There is no gallery with the name <galleryName> in the current subscription and resource group.
解决方法:检查库、订阅和资源组的名称是否正确。Workaround: Check that the names of the gallery, subscription, and resource group are correct. 否则,请创建名为 <galleryName> 的新库。Otherwise, create a new gallery named <galleryName>.

提供的位置 <region> 不适用于资源类型 "Microsoft.Compute/galleries"。 资源类型的可用区域列表为 …The provided location <region> is not available for resource type 'Microsoft.Compute/galleries'. List of available regions for the resource type is …
原因:<region> 名称不正确,或者该名称需要一个访问请求。Cause: The <region> name is incorrect or requires an access request.
解决方法:检查区域名称拼写是否正确。Workaround: Check that the region name is spelled correctly. 可以运行此命令来查看你有权访问哪些区域。You can run this command to see what regions you have access to. 如果区域不在列表中,请提交访问请求If the region is not in the list, submit an access request.

无法将值 <value> 序列化为类型 "iso-8601",ISO8601Error: ISO 8601 时间指示符 "T" 缺失。无法分析日期/时间字符串 <value>Unable to serialize value: <value> as type: 'iso-8601'., ISO8601Error: ISO 8601 time designator 'T' missing. Unable to parse datetime string <value>
原因:未将已提供给属性的值作为日期正确设置其格式。Cause: The value provided to the property is not properly formatted as a date.
解决方法:以 yyyy-MM-dd、yyyy-MM-dd'T'HH:mm:sszzz 或 ISO 8601 有效格式提供日期。Workaround: Provide a date in the yyyy-MM-dd, yyyy-MM-dd'T'HH:mm:sszzz, or ISO 8601 -valid format.

无法将字符串转换为 DateTimeOffset: <value>。路径为 "properties.<property>"Could not convert string to DateTimeOffset: <value>. Path 'properties.<property>'
原因:未将已提供给属性的值作为日期正确设置其格式。Cause: The value provided to the property is not properly formatted as a date.
解决方法:以 yyyy-MM-dd、yyyy-MM-dd'T'HH:mm:sszzz 或 ISO 8601 有效格式提供日期。Workaround: Provide a date in the yyyy-MM-dd, yyyy-MM-dd'T'HH:mm:sszzz, or ISO 8601 -valid format. EndOfLifeDate 必须设置为未来日期。EndOfLifeDate must be set to a future date.
原因:未将生命周期结束日期属性作为今天的日期之后的某个日期正确设置其格式。Cause: The end-of-life date property is not properly formatted as a date that's after today's date.
解决方法:以 yyyy-MM-dd、yyyy-MM-dd'T'HH:mm:sszzz 或 ISO 8601 有效格式提供日期。Workaround: Provide a date in the yyyy-MM-dd, yyyy-MM-dd'T'HH:mm:sszzz, or ISO 8601 -valid format.

argument --<property>: int 值 <value> 无效argument --<property>: invalid int value: <value>
原因:<property> 仅接受整数值,<value> 不是整数。Cause: <property> accepts only integer values, and <value> is not an integer.
解决方法:选择整数值。Workaround: Choose an integer value.

<property> 的最小值不得大于 <property> 的最大值。The minimum value of <property> must not be greater than the maximum value of <property>.
原因:为 <property> 提供的最小值大于为 <property> 提供的最大值。Cause: The minimum value provided for <property> is higher than the maximum value provided for <property>.
解决方法:更改值,使最小值小于或等于最大值。Workaround: Change the values so that the minimum is less than or equal to the maximum.

由(发布者:<Publisher>、产品/服务:<Offer>、sku:<SKU>)标识的库映像 <imageDefinitionName> 已存在。请选择其他发布者、产品/服务、sku 组合。Gallery image: <imageDefinitionName> identified by (publisher:<Publisher>, offer:<Offer>, sku:<SKU>) already exists. Choose a different publisher, offer, sku combination.
原因:你已尝试使用相同的发布者、产品/服务和 SKU 三元组作为同一库中的现有映像定义来创建新的映像定义。Cause: You've tried to create a new image definition with the same publisher, offer, and SKU triplet as an existing image definition in the same gallery.
解决方法:在库中,所有映像定义必须有一个由发布者、产品/服务和 SKU 组成的独一无二的组合。Workaround: Within a gallery, all image definitions must have a unique combination of publisher, offer, and SKU. 请选择一个独一无二的组合,或选择一个新的库,然后重新创建映像定义。Choose a unique combination, or choose a new gallery and create the image definition again.

删除嵌套资源前无法删除资源。Can not delete resource before nested resources are deleted.
原因:你已尝试删除包含映像版本的映像定义。Cause: You've tried to delete an image definition that contains image versions. 映像定义必须为空后才能删除。An image definition must be empty before it can be deleted.
解决方法:删除映像定义中的所有映像版本,然后删除映像定义。Workaround: Delete all image versions inside the image definition and then proceed to delete the image definition.

无法绑定参数 <property>。无法将值 <value> 转换为类型 <propertyType>。无法将标识符名称 <value> 与有效的枚举器名称匹配。请指定以下枚举器名称之一,然后重试: <choice1>, <choice2>, …Cannot bind parameter <property>. Cannot convert value <value> to type <propertyType>. Unable to match the identifier name <value> to a valid enumerator name. Specify one of the following enumerator names and try again: <choice1>, <choice2>, …
原因:属性有受限的一组可能值,且 <value> 不是其中之一。Cause: The property has a restricted list of possible values, and <value> is not one of them.
解决方法:选择可能的 <choice> 值之一。Workaround: Choose one of the possible <choice> values.

无法绑定参数 <property>。无法将值 <value> 转换为类型 "System.DateTime"Cannot bind parameter <property>. Cannot convert value <value> to type "System.DateTime"
原因:未将已提供给属性的值作为日期正确设置其格式。Cause: The value provided to the property is not properly formatted as a date.
解决方法:以 yyyy-MM-dd、yyyy-MM-dd'T'HH:mm:sszzz 或 ISO 8601 有效格式提供日期。Workaround: Provide a date in the yyyy-MM-dd, yyyy-MM-dd'T'HH:mm:sszzz, or ISO 8601 -valid format.

无法绑定参数 <property>。无法将值 <value> 转换为类型 "System.Int32"Cannot bind parameter <property>. Cannot convert value <value> to type "System.Int32"
原因:<property> 仅接受整数值,<value> 不是整数。Cause: <property> accepts only integer values, and <value> is not an integer.
解决方法:选择整数值。Workaround: Choose an integer value.

此区域不支持 ZRS 存储帐户类型。ZRS storage account type is not supported in this region.
原因:你已在尚不支持标准区域冗余存储 (ZRS) 的区域中选择了 ZRS。Cause: You've chosen standard zone-redundant storage (ZRS) in a region that does not yet support it.
解决方法:将存储帐户类型更改为 Premium_LRSStandard_LRSWorkaround: Change the storage account type to Premium_LRS or Standard_LRS. 查看文档,了解已启用 ZRS 预览版的最新区域列表Check our documentation for the latest list of regions with ZRS preview enabled.

创建或更新映像版本Creating or updating image versions

提供的位置 <region> 不适用于资源类型 "Microsoft.Compute/galleries"。 资源类型的可用区域列表为 …The provided location <region> is not available for resource type 'Microsoft.Compute/galleries'. List of available regions for the resource type is …
原因:<region> 名称不正确,或者该名称需要一个访问请求。Cause: The <region> name is incorrect or requires an access request.
解决方法:检查区域名称拼写是否正确。Workaround: Check that the region name is spelled correctly. 可以运行此命令来查看你有权访问哪些区域。You can run this command to see what regions you have access to. 如果区域不在列表中,请提交访问请求If the region is not in the list, submit an access request.

无法对嵌套资源执行请求的操作。找不到父资源 <galleryName/imageDefinitionName>。Can not perform requested operation on nested resource. Parent resource <galleryName/imageDefinitionName> not found.
原因:当前订阅和资源组中没有名为 <galleryName/imageDefinitionName> 的库。Cause: There is no gallery with the name <galleryName/imageDefinitionName> in the current subscription and resource group.
解决方法:检查库、订阅和资源组的名称是否正确。Workaround: Check that the names of the gallery, subscription, and resource group are correct. 否则,请在指定资源组中创建名为 < galleryName> 的新库和/或名为 <imageDefinitionName> 的映像定义。Otherwise, create a new gallery with the name <galleryName> and/or an image definition named <imageDefinitionName> in the indicated resource group.

无法绑定参数 <property>。无法将值 <value> 转换为类型 "System.DateTime"Cannot bind parameter <property>. Cannot convert value <value> to type "System.DateTime"
原因:未将已提供给属性的值作为日期正确设置其格式。Cause: The value provided to the property is not properly formatted as a date.
解决方法:以 yyyy-MM-dd、yyyy-MM-dd'T'HH:mm:sszzz 或 ISO 8601 有效格式提供日期。Workaround: Provide a date in the yyyy-MM-dd, yyyy-MM-dd'T'HH:mm:sszzz, or ISO 8601 -valid format.

无法绑定参数 <property>。无法将值 <value> 转换为类型 "System.Int32"Cannot bind parameter <property>. Cannot convert value <value> to type "System.Int32"
原因:<property> 仅接受整数值,<value> 不是整数。Cause: <property> accepts only integer values, and <value> is not an integer.
解决方法:选择整数值。Workaround: Choose an integer value.

库映像版本发布配置文件区域 <publishingRegions> 必须包含映像版本 <sourceRegion> 的位置Gallery image version publishing profile regions <publishingRegions> must contain the location of image version <sourceRegion>
原因:源映像的位置 (<sourceRegion>) 必须包括在 <publishingRegions> 列表中。Cause: The location of the source image (<sourceRegion>) must be included in the <publishingRegions> list.
解决方法:在 <publishingRegions> 列表中包括 <sourceRegion>。Workaround: Include <sourceRegion> in the <publishingRegions> list.

参数 <property> 的值 <value> 超出范围。该值必须介于 <minValue> 到 <maxValue>(两者均含)之间。The value <value> of parameter <property> is out of range. The value must be between <minValue> and <maxValue>, inclusive.
原因:<value> 超出了 <property> 的可能值的范围。Cause: <value> is outside the range of possible values for <property>.
解决方法:选择一个在 <minValue> 到 <maxValue>(两者均含)范围内的值。Workaround: Choose a value that's within the range of <minValue> and <maxValue>, inclusive.

找不到源 <resourceID>。请检查源是否存在,以及是否与要创建的库映像版本位于同一区域。Source <resourceID> is not found. Please check source exists, and is in the same region as gallery image version being created.
原因:<resourceID> 中没有源,或者 <resourceID> 中的源与要创建的库映像不在同一区域中。Cause: There is no source located at <resourceID>, or the source at <resourceID> is not in the same region as the gallery image being created.
解决方法:检查 <resourceID> 值是否正确,以及库映像版本的源区域是否与 <resourceID> 值的区域相同。Workaround: Check that the <resourceID> value is correct and that the source region of the gallery image version is the same as the region of the <resourceID> value.

不允许更改属性 "galleryImageVersion.properties.storageProfile.<diskImage>.source.id"。Changing property 'galleryImageVersion.properties.storageProfile.<diskImage>.source.id' is not allowed.
原因:库映像版本的源 ID 在创建之后无法更改。Cause: The source ID of a gallery image version can't be changed after creation.
解决方法:确保此源 ID 与现有源 ID 相同,更改映像版本的版本号,或删除当前映像版本,然后重试。Workaround: Ensure that the source ID is the same as the existing source ID, change the version number of the image version, or delete the current image version and try again.

在输入数据磁盘中检测到重复的 lun 编号。每个数据磁盘的 lun 编号必须独一无二。Duplicated lun numbers have been detected in the input data disks. Lun number must be unique for each data disk.
原因:使用磁盘和/或磁盘快照的列表创建映像版本时,两个或更多个磁盘或磁盘快照具有相同的 LUN。Cause: When you're creating an image version by using a list of disks and/or disk snapshots, two or more disks or disk snapshots have the same LUN.
解决方法:删除或更改任何重复的 LUN。Workaround: Remove or change any duplicate LUNs.

在输入磁盘中发现重复的源 ID。每个磁盘的源 ID 应该独一无二。Duplicated source ids are found in the input disks. Source id should be unique for each disk.
原因:使用磁盘和/或磁盘快照的列表创建映像版本时,两个或更多个磁盘或磁盘快照具有相同的资源 ID。Cause: When you're creating an image version by using a list of disks and/or disk snapshots, two or more disks or disk snapshots have the same resource ID.
解决方法:删除或更改任何重复的磁盘源 ID。Workaround: Remove or change any duplicate disk source IDs.

路径 "properties.storageProfile.<diskImages>.source.id" 中的属性 ID <resourceID> 无效。需要以 "/subscriptions/{subscriptionId}" 或 "/providers/{resourceProviderNamespace}/" 开头的完全限定的资源 ID。Property id <resourceID> at path 'properties.storageProfile.<diskImages>.source.id' is invalid. Expect fully qualified resource Id that start with '/subscriptions/{subscriptionId}' or '/providers/{resourceProviderNamespace}/'.
原因:<ResourceID> 值的格式不正确。Cause: The <resourceID> value is incorrectly formatted.
解决方法:检查资源 ID 是否正确。Workaround: Check that the resource ID is correct.

源 ID <resourceID> 必须是托管映像、虚拟机或其他库映像版本The source id: <resourceID> must either be a managed image, virtual machine or another gallery image version
原因:<ResourceID> 值的格式不正确。Cause: The <resourceID> value is incorrectly formatted.
解决方法:如果使用 VM、托管映像或库映像版本作为源映像,请检查 VM、托管映像或库映像版本的资源 ID 是否正确。Workaround: If you're using a VM, managed image, or gallery image version as the source image, check that the resource ID of the VM, managed image, or gallery image version is correct.

源 ID <resourceID> 必须是托管磁盘或快照。The source id: <resourceID> must be a managed disk or snapshot.
原因:<ResourceID> 值的格式不正确。Cause: The <resourceID> value is incorrectly formatted.
解决方法:如果使用磁盘和/或磁盘快照作为映像版本的源,请检查磁盘和/或磁盘快照的资源 ID 是否正确。Workaround: If you're using disks and/or disk snapshots as sources for the image version, check that the resource IDs of the disks and/or disk snapshots are correct.

无法从 <resourceID> 创建库映像版本,因为父库映像中的 OS 状态(<OsState_1>)不是 <OsState_2>。Cannot create Gallery Image Version from: <resourceID> since the OS State in the parent gallery image (<OsState_1>) is not <OsState_2>.
原因:操作系统状态(“通用”或“专用”)与映像定义中指定的操作系统状态不匹配。Cause: The operating system state (Generalized or Specialized) does not match the operating system state specified in the image definition.
解决方法:根据操作系统状态为 <OsState_1> 的 VM 选择源,或根据 <OsState_2> 为 VM 创建新的映像定义。Workaround: Either choose a source based on a VM with the operating system state of <OsState_1> or create a new image definition for VMs based on <OsState_2>.

ID 为 "<resourceID>" 的资源的虚拟机监控程序代系 ['<V#_1>'] 不同于父库映像虚拟机监控程序代系 ['<V#_2>']The resource with id '<resourceID>' has a different Hypervisor generation ['<V#_1>'] than the parent gallery image Hypervisor generation ['<V#_2>']
原因:映像版本的虚拟机监控程序代系与映像定义中指定的虚拟机监控程序代系不匹配。Cause: The hypervisor generation of the image version does not match the hypervisor generation specified in the image definition. 映像定义操作系统是 <V#_1>,映像版本操作系统是 <V#_2>。The image definition operating system is <V#_1>, and the image version operating system is <V#_2>.
解决方法:选择与映像定义具有相同虚拟机监控程序代系的源,或者创建/选择与映像版本具有相同虚拟机监控程序代系的新映像定义。Workaround: Either choose a source with the same hypervisor generation as the image definition or create/choose a new image definition that has the same hypervisor generation as the image version.

ID 为 "<resourceID>" 的资源的 OS 类型 ['<OsType_1>'] 不同于父库映像 OS 类型 ['<OsType _2>']The resource with id '<resourceID>' has a different OS type ['<OsType_1>'] than the parent gallery image OS type generation ['<OsType _2>']
原因:映像版本的虚拟机监控程序代系与映像定义中指定的虚拟机监控程序代系不匹配。Cause: The hypervisor generation of the image version does not match the hypervisor generation specified in the image definition. 映像定义操作系统是 <OsType_1>,映像版本操作系统是 <OsType_2>。The image definition operating system is <OsType_1>, and the image version operating system is <OsType_2>.
解决方法:选择与映像定义具有相同操作系统 (Linux/Windows) 的源,或者创建/选择与映像版本具有相同操作系统的新映像定义。Workaround: Either choose a source with the same operating system (Linux/Windows) as the image definition or create/choose a new image definition that has the same operating system generation as the image version.

源虚拟机 <ResourceID> 不能包含临时 OS 磁盘。Source virtual machine <resourceID> cannot contain an ephemeral OS disk.
原因:<ResourceID> 中的源包含一个临时 OS 磁盘。Cause: The source at <resourceID> contains an ephemeral OS disk. 共享映像库当前不支持临时 OS 磁盘。The shared image gallery does not currently support ephemeral OS disks.
解决方法:根据不使用临时 OS 磁盘的 VM 选择不同的源。Workaround: Choose a different source based on a VM that does not use an ephemeral OS disk.

源虚拟机 <resourceID> 不能包含 UltraSSD 帐户类型中存储的磁盘 ['<diskID>']。Source virtual machine <resourceID> cannot contain disk ['<diskID>'] stored in an UltraSSD account type.
原因:磁盘 <diskID> 是超级 SSD 磁盘。Cause: The disk <diskID> is an Ultra SSD disk. 共享映像库当前不支持超级 SSD 磁盘。The shared image gallery does not currently support Ultra SSD disks.
解决方法:使用仅包含高级 SSD、标准 SSD 和/或标准 HDD 托管磁盘的源。Workaround: Use a source that contains only Premium SSD, Standard SSD, and/or Standard HDD managed disks.

必须从托管磁盘创建源虚拟机 <resourceID>。Source virtual machine <resourceID> must be created from Managed Disks.
原因:<resourceID> 中的虚拟机使用非托管磁盘。Cause: The virtual machine in <resourceID> uses unmanaged disks.
解决方法:使用一个其所基于的 VM 仅包含高级 SSD、标准 SSD 和/或标准 HDD 托管磁盘的源。Workaround: Use a source based on a VM that contains only Premium SSD, Standard SSD, and/or Standard HDD managed disks.

源 "<resourceID>" 上的请求数过多。请减少源上的请求数,或等待一段时间后再重试。Too many requests on source '<resourceID>'. Please reduce the number of requests on the source or wait some time before retrying.
原因:由于请求过多,此映像版本的源当前正受阻。Cause: The source for this image version is currently being throttled because of too many requests.
解决方法:尝试稍后创建此映像版本。Workaround: Try to create the image version later.

磁盘加密集 "<diskEncryptionSetID>" 必须位于库资源所在的订阅 "<subscriptionID>" 中。The disk encryption set '<diskEncryptionSetID>' must be in the same subscription '<subscriptionID>' as the gallery resource.
原因:磁盘加密集只能在创建时所在的订阅和区域中使用。Cause: Disk encryption sets can be used only in the same subscription and region in which they were created.
解决方法:在映像版本所在的订阅和区域中创建或使用加密集。Workaround: Create or use an encryption set in the same subscription and region as the image version.

加密的源 "<resourceID>" 所在的订阅 ID 不同于当前库映像版本订阅 "<subscriptionID_1>"。请使用未加密的源重试,或使用源的订阅 "<subcriptionID_2>" 创建库映像版本。Encrypted source: '<resourceID>' is in a different subscription ID than the current gallery image version subscription '<subscriptionID_1>'. Please retry with an unencrypted source(s) or use the source's subscription '<subcriptionID_2>' to create the gallery image version.
原因:共享映像库当前不支持从另一源映像创建另一订阅中的映像版本(如果对源映像进行了加密)。Cause: The shared image gallery does not currently support creating image versions in another subscription from another source image if the source image is encrypted.
解决方法:使用未加密的源,或在源所在的订阅中创建映像版本。Workaround: Use an unencrypted source or create the image version in the same subscription as the source.

找不到磁盘加密集 <diskEncryptionSetID>。The disk encryption set <diskEncryptionSetID> was not found.
原因:磁盘加密可能不正确。Cause: The disk encryption might be incorrect.
解决方法:检查磁盘加密集的资源 ID 是否正确。Workaround: Check that the resource ID of the disk encryption set is correct.

映像版本名称无效。映像版本名称应遵循 Major(int).Minor(int).Patch(int)格式,例如: 1.0.0、2018.12.1 等。The image version name is invalid. The image version name should follow Major(int).Minor(int).Patch(int) format, for e.g: 1.0.0, 2018.12.1 etc.
原因:映像版本的有效格式是用句点分隔的三个整数。Cause: The valid format for an image version is three integers separated by a period. 映像版本名称不符合此有效格式。The image version name did not meet the valid format.
解决方法:使用遵循 Major(int).Minor(int).Patch(int) 格式的映像版本名称。Workaround: Use an image version name that follows the format Major(int).Minor(int).Patch(int). 例如:1.0.0For example: 1.0.0. 或 2018.12.1。or 2018.12.1.

参数 galleryArtifactVersion.properties.publishingProfile.targetRegions.encryption.dataDiskImages.diskEncryptionSetId 的值无效The value of parameter galleryArtifactVersion.properties.publishingProfile.targetRegions.encryption.dataDiskImages.diskEncryptionSetId is invalid
原因:数据磁盘映像上使用的磁盘加密集的资源 ID 使用的格式无效。Cause: The resource ID of the disk encryption set used on a data disk image uses an invalid format.
解决方法:确保磁盘加密集的资源 ID 遵循 /subscriptions/<subscriptionID>/resourceGroups/<resourceGroupName>/providers/Microsoft.Compute/<diskEncryptionSetName> 格式。Workaround: Ensure that the resource ID of the disk encryption set follows the format /subscriptions/<subscriptionID>/resourceGroups/<resourceGroupName>/providers/Microsoft.Compute/<diskEncryptionSetName>.

参数 galleryArtifactVersion.properties.publishingProfile.targetRegions.encryption.osDiskImage.diskEncryptionSetId 的值无效。The value of parameter galleryArtifactVersion.properties.publishingProfile.targetRegions.encryption.osDiskImage.diskEncryptionSetId is invalid.
原因:OS 磁盘映像上使用的磁盘加密集的资源 ID 使用的格式无效。Cause: The resource ID of the disk encryption set used on the OS disk image uses an invalid format.
解决方法:确保磁盘加密集的资源 ID 遵循 /subscriptions/<subscriptionID>/resourceGroups/<resourceGroupName>/providers/Microsoft.Compute/<diskEncryptionSetName> 格式。Workaround: Ensure that the resource ID of the disk encryption set follows the format /subscriptions/<subscriptionID>/resourceGroups/<resourceGroupName>/providers/Microsoft.Compute/<diskEncryptionSetName>.

对于更新库映像版本的请求,无法使用区域 [<region>] 中的磁盘加密集来指定新的数据磁盘映像加密 lun [<number>]。若要更新此版本,请删除该新 lun。如果需要更改数据磁盘映像加密设置,则必须使用正确的设置创建新的库映像版本。Cannot specify new data disk image encryption lun [<number>] with a disk encryption set in region [<region>] for update gallery image version request. To update this version, remove the new lun. If you need to change the data disk image encryption settings, you must create a new gallery image version with the correct settings.
原因:已向现有映像版本的数据磁盘添加加密。Cause: You added encryption to the data disk of an existing image version. 不能向现有映像版本添加加密。You can't add encryption to an existing image version.
解决方法:创建新的库映像版本或删除已添加的加密设置。Workaround: Create a new gallery image version or remove the added encryption settings.

库项目版本源只能在 storageProfile 下直接指定,或者在单独的 OS 或数据磁盘中指定。只能提供刚好一种源类型(用户映像、快照、磁盘、虚拟机)。The gallery artifact version source can only be specified either directly under storageProfile or within individual OS or data disks. One and only one source type (user image, snapshot, disk, virtual machine) can be provided.
原因:缺少源 ID。Cause: The source ID is missing.
解决方法:确保源的源 ID 存在。Workaround: Ensure that the source ID of the source is present.

找不到源: <resourceID>。请确保源存在。Source was not found: <resourceID>. Please make sure the source exists.
原因:源的资源 ID 可能不正确。Cause: The resource ID of the source might be incorrect.
解决方法:确保源的资源 ID 正确。Workaround: Ensure that the resource ID of the source is correct.

目标区域 "<Region_1>" 中的磁盘 "galleryArtifactVersion.properties.publishingProfile.targetRegions.encryption.osDiskImage.diskEncryptionSetId" 需要磁盘加密集,因为磁盘加密集 "<diskEncryptionSetID>" 用于区域 "<Region_2>" 中的相应磁盘A disk encryption set is required for disk 'galleryArtifactVersion.properties.publishingProfile.targetRegions.encryption.osDiskImage.diskEncryptionSetId' in target region '<Region_1>' since disk encryption set '<diskEncryptionSetID>' is used for the corresponding disk in region '<Region_2>'
原因:加密已用于 <Region_2> 中的 OS 磁盘,但未用于 <Region_1> 中的 OS 磁盘。Cause: Encryption has been used on the OS disk in <Region_2>, but not in <Region_1>.
解决方法:如果在 OS 磁盘上使用加密,请在所有区域中使用加密。Workaround: If you're using encryption on the OS disk, use encryption in all regions.

目标区域 "<Region_1>" 中的磁盘 "LUN <number>" 需要磁盘加密集,因为磁盘加密集 "<diskEncryptionSetID>" 用于区域 "<Region_2>" 中的相应磁盘A disk encryption set is required for disk 'LUN <number>' in target region '<Region_1>' since disk encryption set '<diskEncryptionSetID>' is used for the corresponding disk in region '<Region_2>'
原因:加密已用于 <Region_2> 中 LUN <number> 处的数据磁盘,但未用于 <Region_1> 中的相应数据磁盘。Cause: Encryption has been used on the data disk at LUN <number> in <Region_2>, but not in <Region_1>.
解决方法:如果在数据磁盘上使用加密,请在所有区域中使用加密。Workaround: If you're using encryption on a data disk, use encryption in all regions.

encryption.dataDiskImages 中指定的 lun [<number>] 无效。lun 必须是以下值之一: ['0,9']。An invalid lun [<number>] was specified in encryption.dataDiskImages. The lun must be one of the following values ['0,9'].
原因:为加密指定的 LUN 与附加到 VM 的磁盘的任何 LUN 都不匹配。Cause: The LUN specified for the encryption does not match any of the LUNs for disks attached to the VM.
解决方法:将加密中的 LUN 更改为 VM 中存在的数据磁盘的 LUN。Workaround: Change the LUN in the encryption to the LUN of a data disk present in the VM.

在目标区域 "<region>" encryption.dataDiskImages 中指定了重复的 lun "<number>"。Duplicate luns '<number>' were specified in target region '<region>' encryption.dataDiskImages.
原因:<region> 中使用的加密设置指定了某个 LUN 至少两次。Cause: The encryption settings used in <region> specified a LUN at least twice.
解决方法:更改 <region> 中的 LUN,确保 <region> 中的所有 LUN 都独一无二。Workaround: Change the LUN in <region> to make sure that all the LUNs are unique in <region>.

OSDiskImage 和 DataDiskImage 不能指向同一 blob <sourceID>OSDiskImage and DataDiskImage cannot point to same blob <sourceID>
原因:OS 磁盘和至少一个数据磁盘的源不是独一无二的。Cause: The sources for the OS disk and at least one data disk are not unique.
解决方法:更改 OS 磁盘和/或数据磁盘的源,以确保 OS 磁盘以及每个数据磁盘都独一无二。Workaround: Change the source for the OS disk and/or data disks to ensure that the OS disk as well as each data disk is unique.

目标发布区域中不允许出现重复区域。Duplicate regions are not allowed in target publishing regions.
原因:某个区域在发布区域中多次列出。Cause: A region is listed among the publishing regions more than once.
解决方法:删除重复区域。Workaround: Remove the duplicate region.

不允许在现有映像中添加新的数据磁盘或更改数据磁盘的 LUN。Adding new Data Disks or changing the LUN of a Data Disk in an existing Image is not allowed.
原因:对映像版本的更新调用包含新的数据磁盘,或有某个磁盘的新 LUN。Cause: An update call to the image version either contains a new data disk or has a new LUN for a disk.
解决方法:使用现有映像版本的 LUN 和数据磁盘。Workaround: Use the LUNs and data disks of the existing image version.

磁盘加密集 <diskEncryptionSetID> 必须位于库资源所在的订阅 <subscriptionID> 中。The disk encryption set <diskEncryptionSetID> must be in the same subscription <subscriptionID> as the gallery resource.
原因:共享映像库当前不支持使用其他订阅中的磁盘加密集。Cause: The shared image gallery does not currently support using a disk encryption set in a different subscription.
解决方法:在同一订阅中创建映像版本和磁盘加密集。Workaround: Create the image version and disk encryption set in the same subscription.

从映像版本创建或更新 VM 或规模集Creating or updating a VM or scale sets from an image version

客户端有权对范围 <resourceID> 执行操作 "Microsoft.Compute/galleries/images/versions/read",但当前租户 <tenantId1> 无权访问链接的订阅 <subscriptionId2>。The client has permission to perform action 'Microsoft.Compute/galleries/images/versions/read' on scope <resourceID>, however the current tenant <tenantId1> is not authorized to access linked subscription <subscriptionId2>.
原因:虚拟机或规模集是通过另一租户中的 SIG 映像创建的。Cause: The virtual machine or scale set was created through a SIG image in another tenant. 你已尝试对虚拟机或规模集进行更改,但无权访问拥有该映像的订阅。You've tried to make a change to the virtual machine or scale set, but you don't have access to the subscription that owns the image.
解决方法:与映像版本的订阅的所有者联系,让其授予你对映像版本的读取访问权限。Workaround: Contact the owner of the subscription of the image version to grant read access to the image version.

库映像 <resourceID> 在 <region> 区域中不可用。请联系映像所有者以将映像复制到此区域,或更改请求的区域。The gallery image <resourceID> is not available in <region> region. Please contact image owner to replicate to this region, or change your requested region.
原因:要在某个区域中创建的 VM 不在库映像的已发布区域的列表中。Cause: The VM is being created in a region that's not among the list of published regions for the gallery image.
解决方法:将映像复制到该区域,或在库映像的发布区域的其中一个区域中创建 VM。Workaround: Either replicate the image to the region or create a VM in one of the regions in the gallery image's publishing regions.

不允许使用参数 "osProfile"。Parameter 'osProfile' is not allowed.
原因:为从专用映像版本创建的 VM 提供了管理员用户名、密码或 SSH 密钥。Cause: Admin username, password, or SSH keys were provided for a VM that was created from a specialized image version.
解决方法:如果要从该映像创建 VM,请勿包含管理员用户名、密码或 SSH 密钥。Workaround: Don't include the admin username, password, or SSH keys if you intend to create a VM from that image. 在其他情况下,可使用通用映像版本,并提供管理员用户名、密码或 SSH 密钥。Otherwise, use a generalized image version and supply the admin username, password, or SSH keys.

必需的参数 "osProfile" 缺失(null)。Required parameter 'osProfile' is missing (null).
原因:VM 是通过通用映像创建的,缺少管理员用户名、密码或 SSH 密钥。Cause: The VM is created from a generalized image, and it's missing the admin username, password, or SSH keys. 由于通用映像不保留管理员用户名、密码或 SSH 密钥,因此,在创建 VM 或规模集的过程中,必须指定这些字段。Because generalized images don't retain the admin username, password, or SSH keys, these fields must be specified during creation of a VM or scale set.
解决方法:指定管理员用户名、密码或 SSH 密钥,或使用专用映像版本。Workaround: Specify the admin username, password, or SSH keys, or use a specialized image version.

无法从 <resourceID> 创建库映像版本,因为父库映像中的 OS 状态(“专用”)不是“通用”。Cannot create Gallery Image Version from: <resourceID> since the OS State in the parent gallery image ('Specialized') is not 'Generalized'.
原因:映像版本是从通用源创建的,但其父定义是专用的。Cause: The image version is created from a generalized source, but its parent definition is specialized.
解决方法:使用专用源来创建映像版本,或使用通用的父定义。Workaround: Either create the image version by using a specialized source or use a parent definition that's generalized.

无法更新虚拟机规模集 <vmssName>,因为 VM 规模集的当前 OS 状态是“通用”,这不同于已更新的库映像 OS 状态(“专用”)。Cannot update Virtual Machine Scale Set <vmssName> as the current OS state of the VM Scale Set is Generalized which is different from the updated gallery image OS state which is Specialized.
原因:规模集的当前源映像是通用源映像,但你却使用专用源映像对其进行更新。Cause: The current source image for the scale set is a generalized source image, but it's being updated with a source image that is specialized. 规模集的当前源映像和新的源映像必须处于同一状态。The current source image and the new source image for a scale set must be of the same state.
解决方法:若要更新规模集,请使用通用映像版本。Workaround: To update the scale set, use a generalized image version.

共享映像库 <versionId> 中的磁盘加密设置 <diskEncryptionSetId> 属于订阅 <subscriptionId1>,不能与订阅 <subscriptionId2> 中的资源一起使用Disk encryption set <diskEncryptionSetId> in shared image gallery <versionId> belongs to subscription <subscriptionId1> and cannot be used with resource '' in subscription <subscriptionId2>
原因:用于对映像版本进行加密的磁盘加密集驻留在与用于托管映像版本的订阅不同的订阅中。Cause: The disk encryption set used to encrypt the image version resides in a different subscription than the subscription to host the image version.
解决方法:对映像版本和磁盘加密集使用相同的订阅。Workaround: Use the same subscription for the image version and disk encryption set.

创建 VM 或虚拟机规模集需要很长的时间。The VM or virtual machine scale set creation takes a long time.
解决方法:验证你要尝试从其创建 VM 或虚拟机规模集的映像版本的 OSType 与用于创建映像版本的源的 OSType 是否相同。 Workaround: Verify that the OSType of the image version that you're trying to create the VM or virtual machine scale set from has the same OSType of the source that you used to create the image version.

从映像版本创建磁盘Creating a disk from an image version

参数 imageReference 的值无效。The value of parameter imageReference is invalid.
原因:你已尝试进行从 SIG 映像版本到磁盘的导出,但使用了映像中不存在的 LUN 位置。Cause: You've tried to export from a SIG Image version to a disk but used a LUN position that does not exist on the image.
解决方法:检查映像版本,了解在使用的 LUN 位置。Workaround: Check the image version to see what LUN positions are in use.

共享资源Sharing resources

可以通过 Azure 基于角色的访问控制 (Azure RBAC) 启用对映像库、映像定义和映像版本资源的跨订阅共享。The sharing of image gallery, image definition, and image version resources across subscriptions is enabled using Azure role-based access control (Azure RBAC).

复制速度Replication speed

请使用 --expand ReplicationStatus 标志来检查是否已完成到所有指定目标区域的复制。Use the --expand ReplicationStatus flag to check if the replication to all the specified target regions has finished. 如果尚未完成,请等待作业完成,最长等待时间为 6 小时。If not, wait for up to six hours for the job to finish. 如果失败,请再次触发用于创建并复制映像版本的命令。If it fails, trigger the command again to create and replicate the image version. 如果要将映像版本复制到许多目标区域,可考虑分阶段进行复制。If there are many target regions that the image version is being replicated to, consider doing the replication in phases.

Azure 限制和配额Azure limits and quotas

Azure 限制和配额适用于所有共享映像库、映像定义和映像版本资源。Azure limits and quotas apply to all shared image gallery, image definition, and image version resources. 请确保未超出订阅限制。Make sure you're within the limits for your subscriptions.

后续步骤Next steps

详细了解共享映像库Learn more about shared image galleries.