It does not allow me to start my Azure virtual machine

Paul Mella Belmar 25 Reputation points
2023-07-18T23:20:55.2533333+00:00

It does not allow me to start my Azure virtual machine, the Start button appears not active in gray, it also says that it is deallocated.

I don't know what to do to fix it.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,139 questions
{count} votes

Accepted answer
  1. S.Sengupta 15,191 Reputation points MVP
    2023-07-19T00:49:15.52+00:00

    To start a deallocated Azure virtual machine using PowerShell, you can use the Azure PowerShell module. Here's a step-by-step guide on how to do it:

    Install and import the Azure PowerShell module: If you haven't installed the Azure PowerShell module, you can download and install it from the PowerShell Gallery by running the following command in an elevated PowerShell session:

    powershellCopy code
    Install-Module -Name Az -Force
    

    Then, import the Az module:

    powershellCopy code
    Import-Module Az
    

    Sign in to your Azure account: Run the following command to sign in to your Azure account. This will open a pop-up window for you to enter your credentials.

    powershellCopy code
    Connect-AzAccount
    

    Start the deallocated virtual machine: Now that you are connected to your Azure account, you can start the deallocated virtual machine using the Start-AzVM cmdlet. Replace "ResourceGroupName" and "VMName" with the appropriate values for your virtual machine.

    powershellCopy code
    Start-AzVM -ResourceGroupName "ResourceGroupName" -Name "VMName"
    

    After running the command, it will start the virtual machine, and you should see the virtual machine's status change from "Deallocated" to "Running."

    See also this thread:

    https://learn.microsoft.com/en-us/answers/questions/574969/whats-the-difference-between-deallocated-and-stopp

    1 person found this answer helpful.

3 additional answers

Sort by: Most helpful
  1. Paul Mella Belmar 25 Reputation points
    2023-07-21T20:34:48.3733333+00:00

    Thank you the answers, what i did was create a new VM from the image created before and the deallocated VM i deleted it, along with the associated disk and network interface.

    1 person found this answer helpful.

  2. kobulloc-MSFT 23,491 Reputation points Microsoft Employee
    2023-07-20T16:06:16.2533333+00:00

    Hello, @Paul Mella Belmar !

    Why can't I start my VM after running Sysprep or generalizing my VM?

    Sysprep removes all personal account and security information so your virtual machine can be used as an image. This process is known as generalizing a VM. The process is not reversable once completed and you will be unable to restart the VM:

    https://learn.microsoft.com/en-us/azure/virtual-machines/generalize#windows

    If you need to keep the original VM, you can create a copy of the VM and then generalize the copy instead of the original:
    https://learn.microsoft.com/en-us/azure/virtual-machines/attach-os-disk?tabs=portal#option-3-copy-an-existing-azure-vm

    It may be possible to recreate the VM by taking a snapshot of the OS disk, creating a disk with the snapshot, and then deploying a new VM (the blog is shorter and easier to follow while the documentation has more information that you may find valuable):


    I hope this has been helpful! Your feedback is important so please take a moment to accept answers.

    If you still have questions, please let us know what is needed in the comments so the question can be answered. Thank you for helping to improve Microsoft Q&A!

    User's image

    0 comments No comments

  3. Ying Tse 0 Reputation points
    2024-04-17T19:53:14.7933333+00:00

    when I stop (deallocated) the VM, when will my files saved on the desktop be? will it be still there if i start the VM again? and how long can I leave the vm in the stop (deallocated) state without getting deleted or lost custody of it? if you have an URL for reference would be great about the VM in different states and data in the vm