Monday, January 15, 2018

Azure–Upsize VM while Maintaining VHD

Upsizing a VM which is in the same family will be easy to perform.  However, what happens if I want to upsize the VM to another category/family ?

I’m going to share the steps.

Scenario :

A VM (DC) that is in the size of Standard A1.  I’ll need to upgrade to size to Standard A1 V2.  Need to maintain the information.

In the steps I’ve created a text document and place it in the desktop of the old VM before I upsize the VM, just to show that the data is still intact.

image

Before changing the VM size.

image

The above shows the VM size

image

The above shows the VM (BK-TRN-DC01) in the resource group name rg_bkhoo_training

image

Take note of the VH VHD.  This info is needed later.

Also take note of the Network Card attach to the VM.


The Process.

image

Firstly, stop the VM just like the shown above.  The VM is stopping. 

image

Once the VM has stopped, then delete the particular VM.

image

As you can see, even though the VM has been deleted, the VHD is still intact in the storage.

image

Create a new VM with the same OS in the Resource Group that you have deleted the VM

image

Now I created a new VM.  In my example I name it as BK-TRN-DC01-A.

image

Now the VM, I select the size of A1_V2 Standard.

image

In the Settings panel, key in to the same settings as the same previous VM that was deleted earlier, then click OK

Revise the Summary, then click OK.

Once the VM is created, then click on the Virtual machine to review the size.  It’s shown as follow

image

Ensure the VM is shutdown down.

Azure Storage Explorer

Next is to launch the Azure Storage Explorer and connect to the Azure Account .

image

Take note that we’re going to remove the new VHD that has been created, and attach the previous VM VHD into the new VM.

image

Firstly, select the the new VM VHD, right-click and select Break Lease.

image

Click Yes to break the lease

image

Before the deletion, copy down the name of the new VM VHD.

Select the new VM VHD, then right-click, choose Delete the new VM VHD in the Azure Storage Explorer.

image

Select Yes to confirm the deletion

image

Right-click on the previous VM VHD and select Rename. Rename the VHD to the name that was noted earlier.

image

The end result in the Azure Storage Explorer is displayed as above for my example.

Attaching back previous Network.

The next things before firing up the VM, is to attach back the previous VM Network.  It contains the previous IP address, with it’s profile.  This is very important.

Take note the VM must be shutdown in order to perform the action

Select Virtual machine networking.

image

Select Attach Network Interface.

image

Select the previous VM network interface and click OK.

image

Next is to detach the the network interface when the new VM was created.

Select the new VM interface in the tab. Then at the top click Detach network interface.

image

Click OK to confirm.

image

Take note of the previous Private VM IP has been attached to the new VM.

image

Now can Start the VM.

RDP into the VM

image

Take note that the new VM hostname is the old VM hostname.  This is because is using the previous VHD. 

Also take note of the IP address.  It’s the previous VM IP address. 

Hope the steps has helped you on how to migrate your VMs from one size to another (from different category) without much of hassles.  The method also can be use to migrate the VMs from classic to the new Azure Portal.


keywords : Azure migration, azure up size, azure family, azure migration of different family, virtualization, azure sizing.

No comments:

Post a Comment