Clone VMs that are allocated in different tenants

Elsemary, Hadeer 41 Reputation points
2022-03-30T11:41:09.007+00:00

Clone VMs that are allocated in different tenants. VMs are SQL Virtual machine Instances on Azure. and i have copied the vhds of both OS and Data vhds on storage account blob. then created image from both vhds(OS and data)then create a normal WindowsVM using this image... but i faced one problem during the deployment:

"status": "Failed",
"error": {
    "code": "OSProvisioningClientError",
    "message": "OS Provisioning for VM 'AA-CR' did not finish in the allotted time. However, the VM guest agent was detected running. This suggests the guest OS has not been properly prepared to be used as a VM image (with CreateOption=FromImage). To resolve this issue, either use the VHD as is with CreateOption=Attach or prepare it properly for use as an image:\r\n * Instructions for Windows: https://azure.microsoft.com/documentation/articles/virtual-machines-windows-upload-image/ \r\n * Instructions for Linux: https://azure.microsoft.com/documentation/articles/virtual-machines-linux-capture-image/ "
}

}

Anyone have an idea.. i can also start up the machine but with the same error ?

SQL Server on Azure Virtual Machines
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. deherman-MSFT 38,021 Reputation points Microsoft Employee Moderator
    2022-03-30T20:39:33.347+00:00

    @Elsemary, Hadeer
    I understand you are trying to copy a VM to another tenant and facing the above error.

    Prior to creating the VHD and copying it to the new storage account you need to run Sysprep on the VM and generalize it. After you have run Sysprep on a VM, that VM is considered generalized and cannot be restarted. The process of generalizing a VM is not reversible. If you need to keep the original VM functioning, you should create a copy of the VM and generalize its copy.

    Please try this and see if it resolves your issue.

    -------------------------------

    Please don’t forget to "Accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

  2. Elsemary, Hadeer 41 Reputation points
    2022-03-31T17:32:26.913+00:00

    @deherman-MSFT

    VM is SQL virtual machine with unmanaged Disk .. i have changed from unmanaged disk to managed disk then copy disks to another storage accoutn in new tenant then create a vm from managed disk

    is this good solution

    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.