In the old Azure portal, you could simply stop a "Classic" Linux VM without doing waagent -deprovision+user
, and then create a snapshot from it.
That snapshot could then be succesfully used to create new VM instances. But, as I found out the hard way, this does not work with Azure Linux VMs through the new portal / new style VMs.
So I ended up with a VM image that can only created un-bootable VMs, AND the template VM itself could not be started anymore because it was generalized. The well-known error "Failed to start virtual machine 'templateVM1'. Error: Operation 'start' is not allowed on VM 'templateVM1' since the VM is generalized." occurs when I try to start the VM.
Luckily, I found a simple way to bypass the "since the VM is generalized" message.
1) go to the "Disks" page in the Azure Portal:
2) Click on the disk that is attached to the generalized VM.
3) Then click "Create Snapshot", and fill in the form:
4) After the snapshot is generated, go to the Disks page, and click "Add".
5) Fill in the "Create managed disk" form, and make sure to select your newly created Snapshot as Source:
6) After the new disk is created, click on it to see details. Then click the button "Create VM":
7) Create the VM as you would normally do. Done!
| Viewed 67531 times
#1 by Michael Merrell - December 14, 2017 at 3:00 PM
#2 by Jamin Shanti - February 7, 2018 at 6:47 PM
#3 by Scolo - February 26, 2018 at 3:22 PM
#4 by Manjunath - March 5, 2018 at 5:39 PM
#5 by Cafebabe - March 26, 2018 at 4:43 AM
#6 by Jason Timmins - May 31, 2018 at 3:16 PM
#7 by Daniele Peixoto de Jesus - September 28, 2018 at 6:36 AM
Thanks S2
#8 by Sukhi - October 31, 2018 at 7:44 PM
#9 by Pugazhendhi D - March 17, 2019 at 4:46 AM
#10 by Mohamed - May 19, 2019 at 1:42 AM
#11 by Bojan - August 14, 2019 at 9:39 AM
#12 by Ashish Mahure - October 23, 2019 at 4:50 PM
#13 by Anthony - April 19, 2020 at 11:51 AM
Microsoft has removed this option now on the new Azure portal. You do not get "Snapshot" option for disks of a "generalized VM". It shows the message "This VM is generalized. VM disk settings cannot be edited on generalized VMs."
Just for update.
Thanks
#14 by Paolo - June 12, 2020 at 4:24 PM
#15 by Uri - August 26, 2020 at 12:20 PM
#16 by Andres - August 26, 2020 at 11:01 PM
#17 by sean - October 12, 2020 at 9:45 PM
I did not know image creation will result in generalization.
Since I have had an image created, I can just recreate the VM from the image, essentially the same thing, I guess.
#18 by Me, in 2021 - February 18, 2021 at 8:08 PM
It was definitely a lifesaver!
All of my (okay, only four, but still) VMs setup to do testing - GONE FOREVER!!
(Say it in Buzz Lightyear's voice for more dramatic effect.)
#19 by Daniel Silva - April 5, 2021 at 5:14 PM
#20 by Staale Morten Sørensen - April 29, 2021 at 1:20 PM
#21 by Don - May 18, 2021 at 6:03 PM
#22 by Tarique - June 14, 2021 at 10:38 PM
#23 by Erik van Hoof - January 4, 2022 at 4:03 PM
#24 by Sukrath Mahajan - January 19, 2023 at 11:11 AM