Search This Blog

Monday, February 2, 2015

Restore Azure Virtual Machine Configuration

It is time for us to look on how to restore Azure Virtual Machine Configuration. We assumed that you probably has accidentally delete the VM configuration however the virtual disk is still intact.

[Configuration]

Use Import-AzureVM cmdlet to restore and create backup VM Service Name and bind to existing virtual network. By default, Export-VM cmdlet does not export the configuration of the virtual network

Import-AzureVM –Path “E:\Testbackup01.xml” | New-AzureVM –ServiceName “TestBackup01” –VnetName “ms4uvnet-azure”

Condition for import to be successful:-

  • Cloud Services is still exist
  • Virtual Network is still exist

Error if import without vnet : “The virtual network ID cannot be null or empty”

image

[Result ]

Result after import

image

image

VM Configuration has successfully imported and VM will automatically power on. In our next round, we will check out on how to restore a virtual disk.

More information:-