Trouble with type of OS with VM.

Sreenu Sanam 60 Reputation points
2024-02-05T06:47:10.9033333+00:00

I have a virtual machine on azure, It was imported from hiper-v. But , when It was loaded the o.s type stayed badly. 272966-screenshot-1.png That Virtual machine has Windows Server 2019, but the type stayed defined like as Linux, and the backup failed for the agent can't connect with Virtual machine . I need know , how I can yo change it as type Windows. Thank you

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
6,794 questions
0 comments No comments
{count} votes

Accepted answer
  1. v-vvellanki-MSFT 2,335 Reputation points Microsoft Vendor
    2024-02-05T08:35:17.2233333+00:00

    Hi @Sreenu Sanam,
    Thanks for contacting Microsoft Q&A platform. I understand you have an imported VM that is a Windows Server but is showing as OS type Linux. If possible I would recommend redoing the migration you can follow the steps here. Another option is to copy the OS disk and update it to the correct OS type. You can then create a new VM using this updated disk.

    #Get the source managed disk  
    $managedDisk= Get-AzDisk -ResourceGroupName myRG -DiskName mydisk  
      
    $diskConfig = New-AzDiskConfig -SourceResourceId $managedDisk.Id -Location $managedDisk.Location -CreateOption Copy -Ostype Windows  
      
    #Create a new managed disk in the target subscription and resource group  
    New-AzDisk -Disk $diskConfig -DiskName newdisk -ResourceGroupName myRG
    

    Once the new disk has been made you can select it then select Create VM. Hope this helps. Let me know if you are still facing issues or have further questions.

    0 comments No comments

0 additional answers

Sort by: Most helpful