New-AzVM: Cannot attach an existing OS disk if the VM is created from a platform, user or a shared gallery image #24884
Labels
bug
This issue requires a change to an existing behavior in the product in order to be resolved.
Compute - VM
customer-reported
Service Attention
This issue is responsible by Azure service team.
Description
Trying to delete an unmanaged disk VM and export it's properties as JSON and then recreate it, recreation fails with:
New-AzVM: Cannot attach an existing OS disk if the VM is created from a platform, user or a shared gallery image.
ErrorCode: InvalidParameter
ErrorMessage: Cannot attach an existing OS disk if the VM is created from a platform, user or a shared gallery image.
ErrorTarget: osDisk
StatusCode: 400
ReasonPhrase:
OperationID : 0de7d270-15e4-4650-9f1c-3d5fc1abd618
Issue script & Debug output
Environment data
Module versions
Error output
The text was updated successfully, but these errors were encountered: