How to resolve “the VM is generalized” start-up error in Microsoft Azure
This is one of the well known error with Azure VMs . Failed to start virtual machine ‘templateVM1’. Error: Operation ‘start’ is not allowed on VM ‘templateVM1’ since the VM is generalized.” occurs when try to start the VM.
Before resolving its better to understand what is ” VM Generalized” ?
In simple terms we can treat as “template server ” or the server which is used to create the golden image .Once VM is generalized you can not reverse it back.From the golden Image you can create multiple VMs.
How VM will become generalized?
There multiple ways to make VM as a ” Generalized VM ” .
* Using sysprep
* Create a managed image in the Azure portal by selecting ” Capture”
* Using powershell
At any case once VM is generalized you can not use for regular VM function . You can not start the VM again once it is generalized.Unlike AWS Image creating from running machine .
How to resolve or recover the generalized VM?
At any condition you can not recover the actual VM . The option for recovery is “snapshot” .Yes you can create a snapshot from the original source VM OS disk first . From that snapshot you will get an option “Create VM” . Then you can follow the regular process to create vm . If you like to preserve the hostname and ip before creating new VM in the same resource group delete the generalized VM.
So How to safely create image and use the original source VM for regular function?
The easy way is ” Copy an existing Azure VM” . Which means taking a snapshot of the managed OS disk . Note it will support only managed disk . When you take snapshot the original VM will not generalized . You can use for regular function.
Reference: