Cloning Azure VM

Fernando Gutierrez 240 Reputation points
2024-11-19T12:08:47.3966667+00:00

Dear

I have a problem that is occurring when cloning a virtual machine.

I perform the entire cloning process, then I understand that in order to avoid conflicts, you have to perform Sysprep, after doing so the VM agent does not start again.

The agent remains disabled and not started.

Thanks!

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

1 answer

Sort by: Most helpful
  1. Sai Krishna Katakam 1,105 Reputation points Microsoft Vendor
    2024-11-20T16:43:45.31+00:00

    Hi Fernando Gutierrez,

    Thank you for the details. Based on your response, it seems the issue might be related to the Azure VM Agent not re-initializing properly after cloning. You can try reinstalling the Azure VM Agent by downloading the latest version from the Azure VM Agent GitHub page or by running the following PowerShell command:

    Set-Service -Name "WindowsAzureGuestAgent" -StartupType Automatic
    Start-Service -Name "WindowsAzureGuestAgent"
    

    Also, ensure that the WindowsAzureGuestAgent service is set to automatic and running, which you can verify through the Services panel or by running:

    Get-Service -Name "WindowsAzureGuestAgent"
    

    Please refer to below screenshot: User's image

    When using Sysprep, make sure you're using the /generalize and /oobe options, and that the process completes without errors. If the agent still doesn’t start, you can check the logs at C:\WindowsAzure\Logs\WaAppAgent.log for any specific error messages.

    Since you are cloning via snapshot and creating a VM image version, you might want to try creating a custom image of the VM before cloning, as this method could provide a more reliable process.

    For more details, please refer to the below documentation:
    Azure VM Agent Overview
    Sysprep (Generalize) a Windows installation

    If an answer has been helpful, please consider accept the "Answer" and "Upvote" to help increase visibility of this question for other members of the Microsoft Q&A community. 

    User's image

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.