Issues when trying to create a snapshot of a Uniform VMSS OS disk in AzureCLI
See original GitHub issueThis is autogenerated. Please review and update as needed.
Describe the bug
Command Name
az snapshot create
Errors:
(ResourceNotFound) The Resource 'Microsoft.Compute/disks/datadiskvmss1_datadiskvmss1_0_OsDisk_1_dca81669e5884c35ad5150dfd854934e' under resource group 'DATADISK' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix
Code: ResourceNotFound
Message: The Resource 'Microsoft.Compute/disks/datadiskvmss1_datadiskvmss1_0_OsDisk_1_dca81669e5884c35ad5150dfd854934e' under resource group 'DATADISK' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
- `vmssosdisk=$(az vmss show -g {} -n {} --instance-id {} --query storageProfile.osDisk.managedDisk.id -o tsv) //this command DOES pull the correct resourceURI if you run it by itself without turning it into a variable
az snapshot create -g {} -n {} --source $vmssosdisk --debug
Expected Behavior
I am trying to replicate the steps to create a snapshot of a VMSS instance OS disk in CLI. The PowerShell steps are listed here: https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-faq#how-do-i-take-a-snapshot-of-a-virtual-machine-scale-set-instance-
Environment Summary
Linux-4.4.0-22000-Microsoft-x86_64-with-debian-bullseye-sid, Ubuntu 20.04.3 LTS
Python 3.6.10
Installer: DEB
azure-cli 2.30.0
Extensions:
interactive 0.4.5
maintenance 1.3.0
resource-graph 2.1.0
vm-repair 0.3.8
Additional Context
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Support for cross-region copy of incremental snapshots #19773
Cross-region copy of snapshot: Azure CLI calls DiskRP's Create ... create : Fix creating a snapshot of a Uniform VMSS OS disk #20306....
Read more >FAQ for Azure Virtual Machine Scale Sets - Microsoft Learn
Azure Files (SMB shared drives); Azure shared disks; Operating system drive ... how to create and use a custom VM image, you can...
Read more >How to Replace an Azure Scale Set VM OS Disk (restore from ...
You can take a snapshot of a virtual machine scale set instance and create a managed disk from that snapshot. Steps to achieve...
Read more >VM Broken? Use OS disk swap in Azure to fix and restore
Process for fixing issues. Let's walk through the process I typically use in cases where I need to swap the OS drive: Take...
Read more >Understanding the Benefits of the Azure Virtual Machine Scale ...
Learn all about Azure's Virtual Machine Scale Sets (VMSS), what they include, ... are created from the same base OS image and configuration....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@evelyn-ys thank you very much! This worked.
Hi @nameier, I have raised a PR to fix this. For now, you can specify
--copy-start false
to bypass this issue. Sorry for the inconvenience.