How to update/extend expirationDate of an existing DevTest lab VM that already has one set?
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- azure, powershell
- Lĩnh vực
- cloud
Hướng nghiên cứu
Bắt đầu với lỗi Set-AzureRmResource đã được báo cáo sau khi truy xuất VM bằng Get-AzureRmResource, và so sánh SharedImageID cùng SharedImageVersion của mẫu ARM với các thuộc tính bắt buộc customImageId và galleryImageReference. Được xem là hoàn thành khi xác định được một cách được hỗ trợ để cập nhật expirationDate mà không gây ra lỗi MissingRequiredProperties hoặc CannotSetProperty đối với các trường image.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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!
- Ngôn ngữ chính
- PowerShell
- Star
- 465
- Fork
- 595
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Azure/azure-devtestlab
-
CopyAzVHDFromVMToLab.ps1 - warn that source VM will be stopped for as long as the copy takesĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
Azure/azure-devtestlab#911 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Azure/azure-devtestlab#914 ·
-
Node 10 Deprecation WarningĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
Azure/azure-devtestlab#912 ·
-
windows-domain-join-newĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
Azure/azure-devtestlab#909 ·
-
Copy custom images across DTLĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Azure/azure-devtestlab#905 ·
Tất cả issue của Azure/azure-devtestlab
Issue tương tự
-
fix(storage-resize-images): kit/extension parity – BUCKET_REGION offers europe-north2 and northamerica-south1, which can't deployCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởkits type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
firebase/extensions#3268 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Needs: Triage :mag: Product: Terraform (AVM)
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Azure/Azure-Landing-Zones#4313 ·
-
bug needs-triage service/dms
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
hashicorp/terraform-provider-aws#50542 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
farion1231/cc-switch#8554 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Coverage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
aws-cloudformation/cloudformation-coverage-roadmap#2590 · 6 reaction ·