Showing posts with label Azure. Show all posts
Showing posts with label Azure. Show all posts

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.

Wednesday, January 10, 2018

Azure Storage Explorer–Release 0.9.3

The Microsoft Azure Storage Explorer was release in December 2017.

Can download from the link  here

image

keywords : Azure Storage Explorer, storage, azure, cloud storage

Saturday, September 3, 2016

Azure–Powershell (Updated)

Recently the PowerShell for Azure, there’s an update that you can download from the GitHub

The Link is located in here.

You need to have the Azure SDK installed first.  The installation file can be download from this link.

image

Hope this helps.

keywords : Azure, powershell, azure command-line,

Thursday, June 9, 2016

Azure – Removing / Deleting Resource Group with PowerShell

Since Azure introduced the new portal, the recommendation to create is as below :

  1. Create Resource Group
  2. Create Azure Storage Account
  3. Create Azure VNET

That is the 3 basic items that MUST be created first before creating any VMs.

So now I face the “horror of cleaning up” after conducting some demos. The cleaning up is quite a challenge through the GUI Management Portal.  Therefore I need to clear the entire Resource Group.  Before I can delete that, I need to delete all the contents in the resource group. It’s very tedious.

Now I’ve found a way that I would like to share.

Step 1

Update your local PowerShell with the Azure SDK.   If not download it from here.

[image12.png]

Step 2

Once it’s installed, then you should have the Azure commands added into your PowerShell.

Launch the Run ISE as Administrator

Minimize the PowerShell Window.

Step 3

SNAGHTML5584fe7

  • Expand the left panel
  • Browse to the Resource Group

SNAGHTML5603fb3

  • Take note of the PowerShell command (which is going to help later).

Step 4

  • Maximize the PowerShell that was launch earlier (ISE) in Step 2
  • Login using the command of Login-AzureRMAccount

SNAGHTML562ddbf

  • Take note of the SubscriptionId
  • The command to remove the entire Resource Group is as follow :

Remove-AzureRMResource –ResourceId /subscriptions/SubscriptionId/resourceGroups/resourcegroupname/ –ApiVersion 2014-04-01 –Force

Note : Only make changes to the pink colour syntax.  The first is your subscription ID information that you get from the top when you login to Azure and the second one is the resource group name. 

  • If you’re not so sure of the command, then refer to the command that you noted earlier in Step 3 from the Azure Resource Explorer.
  • As example I would like to delete off the entire Resource Group of RG-CANADA-CENTRAL-01 in my subscription then I type the following :

image

  • Once it’s completed removing the Resource Group, a True word is indicated.

image

So hopefully the above helps you as it has helped me in cleaning up the Resource Group.

keywords : azure, resource explorer, manage azure, azure portal , resource group, housekeeping resource group, new azure portal, manage azure portal

How to Remove Azure Account (Cached) using PowerShell

Recently I’ve done quite a lot of testing using various accounts to Azure.  All the commands are executed in the PowerShell ISE (Run ISE are Administrator).

The PowerShell should have the Azure Commands in it already.  If not, can download from here.

Select the Install from the Command-line tools

image

When I tried to Get-AzureAccount, it displayed more than one account and subscriptions

image

I need to remove the other subscriptions.  Therefore I perform as follow :

image

Execute the command as below :

  • Get-AzureAccount | format-table id

Once displayed, I execute to remove the account using

  • Remove-AzureAccount account-name

Note : Just replace the account-name with the account that needs to be deleted.

Another way is to remove all the accounts then re-add it back. 

To do this execute it as below to remove all the accounts :

  • Get-AzureAccount | ForEach-Object {Remove-AzureAccount $_.ID -Force}

To add the account that I’m working on, use :

  • Add-AzureAccount

 

keys : add azure account, remove azure account in cache, Azure powershell command line, command-line, azure subscription, AzureSubscription, get-azureaccount, remove-azureaccount, Azure SDK

Thursday, May 26, 2016

Reset Local Administrator Password for Azure VM

Recently I had set up quite a couple of VMs in Azure and one of the VMs local administrator’s password I’ve keyed in wrongly and totally forgotten what is it anymore.

So in the Azure new portal there’s a feature to reset the password.

Local Administrator username : bkhoo

The steps taken are as below :

    image

    • On the left menu bar click on the Virtual Machines
    • In the Virtual Machines, select the specific Virtual Machine that want to reset the local administrator password.

    image

    • In the settings menu on the right, click Reset password .

    image

    • Key in the new password and confirm password, then click on Reset 

    Then I test it, I can now RDP into the VM using the new reset password .

    keywords : forgot password,local administrator password, Azure VM, Virtual machine password, how to reset local administrator password in virtual machine, VM, VMs, virtual machines

    Tuesday, November 3, 2015

    How to Remove Azure Account (Cached) using PowerShell

    Recently I’ve done quite a lot of testing using various accounts to Azure.  All the commands are executed in the PowerShell ISE (Run ISE are Administrator).

    The PowerShell should have the Azure Commands in it already.  If not, can download from here.

    Select the Install from the Command-line tools

    image

    When I tried to Get-AzureAccount, it displayed more than one account and subscriptions

    image

    I need to remove the other subscriptions.  Therefore I perform as follow :

    image

    Execute the command as below :

    • Get-AzureAccount | format-table id

    Once displayed, I execute to remove the account using

    • Remove-AzureAccount account-name

    Note : Just replace the account-name with the account that needs to be deleted.

    Another way is to remove all the accounts then re-add it back. 

    To do this execute it as below to remove all the accounts :

    • Get-AzureAccount | ForEach-Object {Remove-AzureAccount $_.ID -Force}

    To add the account that I’m working on, use :

    • Add-AzureAccount

     

    keys : add azure account, remove azure account in cache, Azure powershell command line, command-line, azure subscription, AzureSubscription, get-azureaccount, remove-azureaccount

    Friday, October 30, 2015

    Azure–Token Error when execute from Powershell

    I was doing the following :

    • Connect to a Azure from a Computer A
    • Execute the connection from PowerShell and connecting to Azure
    • Everything was ok.

    Then I went to another location.  Executing the same process by connecting to Azure through the PowerShell.  I had no issue when executing the Add-AzureAccount but when I check I tried to get the subscription, I had the error as below :

    image

    After some finding, it seemed the token in the second location has expired.  Therefore I did the following :

    • The User I login is Administrator, therefore I go to :

    C:\Users\Administrator\AppsData\Roaming\Windows Azure Powershell

    Note : Change only the value in the PINK, with whatever credential you use to login to the PC.

    • Delete all the content in the directory

    image

    • Proceed back to PowerShell and Add-AzureAccount
    • Then execute the Get-Subscription will display with no issue.

    keywords : failed to refresh token, no service namespace, the server returned an error (400), AadAuthenticationFailedExecption, Bad Request

    Thursday, August 13, 2015

    Azure Recovery Services–backup increased to 54TB limit

    Earlier last month I shared on how to configure the DPM 2012 R2 with Azure Recovery (Backup Vault)

    Microsoft Azure recovery Services team has officially released the backup per protection group from 1.7TB limit and now to 54TB limit on 12th Aug 2015.

    You need to have the Azure Recovery Services Agent 2.0.8715.0 or higher in order for the backup to exceed the limitation of 1.7TB.

    image

    The news release is here.

    keynote : Azure limit, ASR, Azure Recovery Services, DPM, SCDPM, storage limit.backup limit

    Friday, July 31, 2015

    Class 20409B - Server Virtualization with Windows Server Hyper-V and System Center

     

    Just finished conducting a 5-days class on Server Virtualization using Hyper-V and System Center.  During class, I shared real life scenarios on how it was implemented, what are the obstacles they will face if planning were not done properly in the first place before rolling out.

    Feeling happy that the students went back with knowledge.

    keywords : 20409, Hyper-V, virtualization, backup, protection, VMM, virtual machine manager, dpm, azure, cloud, vmmlibrary,

    Tuesday, July 14, 2015

    DPM 2012 R2 with Azure Recovery (Backup Vault)

    I would like to share my experience on how to configure DPM 2012 R2 with Azure Recovery.  Which means I’ve already had a Disk to Disk backup in place in the DPM.  I would like to extend my backup to the Azure.

    Firstly the DPM 2012 R2 needs to patch with at least UR5 and the Hotfix for UR5

    The Download Links are as follow :

    UR5

    http://catalog.update.microsoft.com/v7/site/search.aspx?q=3021791

    Hotfix for UR5

    http://www.microsoft.com/en-in/download/details.aspx?id=45914

     

    The blog will cover the following :

    • Creation in Azure Recovery (Backup Vault)
    • Register DPM into Azure Recovery
    • Manage Certificate
    • Install Microsoft Azure Backup Agent (MARS)
    • Attach Vault Credential to DPM

    Azure Recovery

    image

     

    image
    • Key in the Name (must be unique) and select the region
    • Click Create Vault to finish it.

    image

    • Should have the screen something like the above.

    Manage Certificate

    In the DPM Server, launch the command prompt in elevated mode

    C:\>makecert.exe -r -pe -n CN=ICG-AP-SCDPM01 -ss my -sr localmachine -eku 1.3.6.1.5.5.7.3.2 -len 2048 -e 01/01/2017 ICG-AP-SCDPM01.cer

    Change the values in pink and yellow only.  The rest of the syntax stays.

    Pink = The DPM server that will be register into the Backup Vault
    Yellow = Not more than 3 years for the validity of the certificate.

    image

    It should look something like the above in the DPM Server command prompt.

    Next must upload the certificate to the Windows Azure backup vault.  Launch the Windows Azure Management Portal.

    image

    • Click on the Recovery Services | Select the backup vault | Click on Manage Certificate

     

    image

    • In the Manage Certificate, click Browse for the certificate file that was created using the command prompt of makecert.
    • Click on the Tick to confirm

    image

    • Progress will show it has been successfully uploaded.

    Install Microsoft Azure Backup Agent

    image

    • Still in the manage Windows Azure Portal, click on the Download Agent for the DPM. Left click on it.

    image

    • Click Save or Run (according to your preference)
    • If Save, then double-click on the file and execute it.

    image

    • Click Next

    image

    • Click Next if not using Proxy.
    • Then click Install .

    image

    • Click Close once it’s completed.

    Attach Vault Credential to DPM

    The next step is to attach the Backup Vault for the DPM.

    From Windows Manage Azure Portal | Recovery Services | the specific backup vault.

    image

    • Click on the Download vault credentials.image

     

    • Save the File

    Then back to the DPM Console

    image

    • Click on the Management | then click on Register

     

    image

    • Click Next.

    image

    • Next is Backup vault  section, click Browse
    • Next in the following of the Backup Vault, click Browse
    • Select the certificate file and click Next.

    image

    • Once it’s done, click Next.

    image

    • Next is the Throttling Setting, input the necessary badwidth allocated, else click Next.

    image

    • In the Recovery Folder Settings, key in or browse the Restore Folder assigned to the DPM server, then click Next.

    image

    • In the Encryption section, click Generate passphrase (or you can key in your own)
    • Click Copy to clipboard
    • Open Notepad, then paste and save the file.
    • Then the Encryption Setting, click Register.

    image

    • Click Close once the Register Server for Azure Backup is completed.

    image

    • Click on Management in the left panel.
    • In the Online, verify it is registered,

    Hopefully the above steps helps.

    keys : System Center Data Protection, DPM, SCDPM, Azure Backup, Azure Recovery, Backup vault, Cloud backup, disk to disk to cloud.