How to update/extend expirationDate of an existing DevTest lab VM that already has one set?
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 25/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- azure, powershell
- 领域
- cloud
调研方向
从使用 Get-AzureRmResource 检索 VM 后报告的 Set-AzureRmResource 失败开始,并将 ARM 模板中的 SharedImageID 和 SharedImageVersion 与所需的 customImageId 和 galleryImageReference 属性进行比较。完成的标准是确定一种受支持的方式来更新 expirationDate,同时不会为 image 字段触发 MissingRequiredProperties 或 CannotSetProperty 错误。
由索引模型根据 Issue 内容生成。
描述
Hi,
Searching the internet we found some articles regarding how to use Azure PowerShell to extend a date on a lab VM for expiry.
Examples:
- https://github.com/Azure-Samples/virtual-machines-powershell-auto-expired/blob/master/README.md
- https://social.msdn.microsoft.com/Forums/azure/en-US/72034bf9-37c9-464e-8c2f-2ca9b9424a4c/how-to-change-or-postpone-a-vm-expiration-datetime-?forum=AzureDevTestLabs
- https://feedback.azure.com/forums/320373-lab-services/suggestions/34793482-postpone-expiration-date-for-individual-vms-if-nee
- https://azure.microsoft.com/en-gb/blog/set-expiration-date-for-vms-in-azure-devtest-labs/
etc.
So, a lab user created a VM with 24 hr expiry and now wishes to keep it longer due to testing which has not concluded.
Whatever we try we just get the following error back on the Set-AzureRmResource command:
Set-AzureRmResource : MissingRequiredProperties : One of the following properties must be specified: customImageId, galleryImageReference.
Note our lab VM is created from an ARM template and from a lab attached shared image gallery (so a custom image in our private shared image gallery, not a public/marketplace image). As it's a private shared image gallery, it's not a true lab custom image either as such. So, in our ARM template we do not provide gallery reference or custom image ID, but more SharedImageID and SharedImageVersion.
We have tried to provide null values, or what we think may be suitable values for the "missing" properties but then we get error Set-AzureRmResource : CannotSetProperty : Cannot set or update property galleryImageReference. or Set-AzureRmResource : CannotSetProperty : Cannot set or update property customImageId.
Using AzureRm 6.13.1 but also tried Az in pwsh core and same issue.
Note that we get this error if we just get the VM object (using Get-AzureRmResource) change no properties and then set it back using Set-AzureRmResource.
Thanks!
- 主要语言
- PowerShell
- 星标
- 465
- 派生
- 595
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Azure/azure-devtestlab 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 82/100
Azure/azure-devtestlab#911 ·
-
难度 5/5 一周以上 新手友好度 35/100
Azure/azure-devtestlab#914 ·
-
难度 3/5 1-2 天 新手友好度 35/100
Azure/azure-devtestlab#912 ·
-
难度 4/5 3-5 天 新手友好度 25/100
Azure/azure-devtestlab#909 ·
-
难度 4/5 3-5 天 新手友好度 35/100
Azure/azure-devtestlab#905 ·
查看 Azure/azure-devtestlab 的全部 Issue
相似的 Issue
-
fix(storage-resize-images): kit/extension parity – BUCKET_REGION offers europe-north2 and northamerica-south1, which can't deploy可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭kits type: bug
难度 2/5 1-3 小时 新手友好度 72/100
firebase/extensions#3268 ·
维护者通常 1 天内回复
-
Needs: Triage :mag: Product: Terraform (AVM)
难度 2/5 1-3 小时 新手友好度 68/100
Azure/Azure-Landing-Zones#4313 ·
-
bug needs-triage service/dms
难度 2/5 1-3 小时 新手友好度 74/100
hashicorp/terraform-provider-aws#50542 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
farion1231/cc-switch#8554 · 1 条评论 ·
维护者通常 1 天内回复
-
Coverage
难度 2/5 1-3 小时 新手友好度 62/100
aws-cloudformation/cloudformation-coverage-roadmap#2590 · 6 个 reaction ·