Search This Blog

Sunday, January 25, 2015

Migrate VmWare Virtual Machine to Microsoft Azure–Using Microsoft Virtual Machine Convertor


Hi reader, do you have an existing Vmware Virtual Machine and would like to move it to Azure?

If yes, please read further on how we use MVMC 3.0 to perform migration from Vmware to Microsoft Azure.

[Requirement on Vmware]

  • Vmware vSphere 5.5, 5.1 and 4.1
  • Vcenter 5.5,5.1 and 4.1

[ Supported guest operating system on Microsoft Azure]

  • Windows Server 2012 R2
  • Windows Server 2012
  • Windows Server 2008 R2
  • Ubuntu 12.04
  • Suse Linux Ent 11
  • Centos 5, 6
  • Debian 7
  • Oracle Linux 5, 6

[ Microsoft Azure]

Get an Azure subscription

  • identify Azure Subscription ID


  • identify management certificate thumbprint. Make sure  MVMC machine has installed the management certificate and store in Personal Certificate folder. Use makecert to create a management certificate and upload to Azure.


[ Configuration ]

  • Select virtual machine conversion. It will convert Vmware to VHD first.
  • Migrate to Microsoft Azure after conversion complete



  • Enter Azure subscription ID and certificate thumbprint
  • Select destination Azure Storage to store VHD



  • Connect to Vmware Vcenter or ESX Host
  • Select Vmware VM
  • Select temporary storage to hold the virtual disk during conversion and click Finish to start the conversion before upload to Azure







[ End result]

We leave the system run overnight. On the next day, we found that the vmware has completed the conversion and uploaded to Azure. Virtual disk has successful transfer to Azure Storage. Our next step is create a VM by clicking on + NEW | Compute | Virtual Machine | From Gallery |


Select MY DISK | Select your virtual disk and create your VM on Microsoft Azure


That’s all for now. We have just completed using MVMC 3.0 to

Migrate VMware to Azure. Feel free to check out other capabilities of MVMC 3.0:

Saturday, January 24, 2015

Virtual to Virtual Machine Conversion (V2V)–Using Microsoft Virtual Machine Convertor 3.0


We move further by  P2V test to V2V (Vmware to Hyper-V Conversion) test. MVMC 3.0 support conversion of virtual machine from

  • Vmware vSphere 5.5, 5.1 and 4.1
  • Vcenter 5.5,5.1 and 4.1

Before conversion, make sure the guest operating system on VMware is running

  • Windows Server 2012 R2
  • Windows Server 2012
  • Windows Server 2008 R2 with SP1
  • Windows Vista (Ent)
  • Windows 7 (Ultimate, Professional, Ent)
  • Windows 8 (Pro, Ent)
  • Windows 8.1 (Pro, Ent)
  • Red Hat 5, 6
  • Ubuntu 12.04, 10.04
  • Suse Linux Ent 11
  • Centos 5, 6
  • Debian 7
  • Oracle Linux 5, 6

You can perform online or offline VM conversion. Just remember this following tips

  • perform online conversion – Uninstall Vmware before conversion
  • perform offline conversion – Uninstall Vmware tool after conversion

Let have a quick look on the screenshot:

  • Select V2V
  • Select Migrate to Hyper-V
  • Enter destination Hyper-V




  • Enter final path to store virtual disk, virtual disk type and format


  • Enter Vmware Vcenter or ESX Host


  • Select Vmware virtual machine that you would like to V2V
  • Enter the state of the VM after conversion
  • Enter a temporary location to hold virtual disk during conversion






That’sall for today. We will show how to migrate Vmware VM to Microsoft Azure in our next article. Stay Tuned.

Tuesday, January 20, 2015

Physical to Virtual Machine Conversion–Using Microsoft Virtual Machine Convertor 3.0


We just tested MVMC 3.0 (updated on 2 Dec 2014) to perform P2V for the following guest operating system:-

  • Windows Server 2008 R2
  • Windows Server 2012
  • Windows Server 2012 R2
  • Download MVMC 3.0 – Click here

    Make sure MVMC is installed on the host which has installed the following requirements:-

  • .Net Framework 3.5 and .Net 4 (if host running Win 2008 R2 SP1)
  • .Net framework 4.5 (if host running Win 2012 or Win 8)
  • Visual C++ Redistribution for Visual Studio 2012 Update 1. Download Update 4 from here
  • Install BITS feature. Make sure BIT-Compact Server. We forget to install Compact Server features, causing us to fail P2V a server. So remember, to drill into BIT and tick Compact Server features.
  • a Shared folder (refer to screenshot)
  • a Working Folder (refer to screenshot)
  • [ Configuration ]

    Select “Physical machine conversion”


    Enter your source (physical server) details and authentication


    MVMC will install an agent into the source machine


    Once detected, the system will list down and allow you to select partition to convert to Hyper-V Virtual disk. You can select to convert all disk or selected disk. Here it also allow you to specify VHD type format: dynamic or fixed disk.


    Enter new VM name and VM specification (CPU and Memory)


    Next is enter your destination Hyper-V Server detail and credential to hold the virtual machine result.


    Specify a temporary share folder to host the conversion data . Make sure you have sufficient hard disk space.


    The end result will store in working folder


    On the next page, you can define to connect to virtual switch or remain unconnected


    Review the summary before begin the P2V process.


    The end result, MVMC will convert to

    • VHD format
    • Size remain the same after conversion. Mean if your existing size is 1 TB and use space only 30GB, the end result will create 1 TB size. You still need to perform own shrinking to reduce the size.
    • Additional data disk will remain in offline state. You need to manually online the disk. The disk will located in SCSI controller.
    • Virtual disk will name according to drive letter. Example: C.vhd, D.vhd.

    Friday, January 16, 2015

    Backup Azure Virtual Machine By Using Blob Snapshot


    We have setup Virtual Machine Azure. Next question you may wonder on how to backup Azure Virtual Machine. Too bad at this moment, we cannot using System Center Data Protection Manager or Azure Backup to backup virtual machine. However can use these backup to backup application data.

    Then we have search around and found out that we can use Blob Snapshot to perform backup by referring to Keith Mayer guide. You can refer to here.

    There are four (4) steps that you need to in order to backup Azure Virtual Machine.

    • Select virtual machine to back up
    • Identify virtual hard disks
    • Create cloud storage container for storing backups
    • Back up virtual machines in Windows Azure to cloud storage
    • Backup VM Configuration by using Export-AzureVM

    Well, we follow the guide provide by Keith Mayer and summarize it in this script:-

    #to list down entire VM in Azure

    #Select 1 VM. Example: MS4UDir
    $VM = Get-AzureVM -ServiceName "MS4UDIR" -Name "MS4UDIR"

    #Temporary shutdown to a state when the virtual machine is not running but its configuration  is kept in a provisioned state
    $VM | Stop-AzureVM -StayProvisioned

    #to get os disk

    $VMOsDisk = $VM | Get-AzureOSDisk

    #to get data diskname and media link
    $VMDataDisks = $VM | Get-AzureDataDisk

    #determine the name of Windows Azure Storage Account by using MediaLink property
    $storageAccountName= $vmOSDisk.MediaLink.Host.Split('.')[0]

    #Setting the current storage account
    Get-AzureSubscription | Set-AzureSubscription -CurrentStorageAccount $storageAccountName

    #Creating a new Windows Azure Storage Container
    $backupContainerName ="backupvhd"
    New-AzureStorageContainer -Name $backupContainerName -Permission Off

    #Confirming creation of storage container

    #Backup virtual machine
    $vmOsBlobName = $vmOsDisk.MediaLink.Segments[-1]
    $vmOsContainerName = $vmOsDisk.MediaLink.Segments[-2].Split('/')[0]
    Start-AzureStorageBlobCopy -SrcContainer $vmOsContainerName -SrcBlob $vmOsBlobName -DestContainer $backupContainerName

    #Get-AzureStorageBlobCopyState to confirm that the copy process completed
    Get-AzureStorageBlobCopyState -Container $backupContainerName -Blob $vmOsBlobName -WaitForComplete

    #Backup Data Disk
    ForEach ($vmDataDisk in $vmDataDisks) {
    $vmDataBlobName = $vmDataDisk.MediaLink.Segments[-1]
    $vmDataContainerName = $vmDataDisk.MediaLink.Segments[-2].Split('/')[0]
    Start-AzureStorageBlobCopy -SrcContainer $vmDataContainerName -SrcBlob $vmDataBlobName -DestContainer $backupContainerName -Force
    Get-AzureStorageBlobCopyState -Container $backupContainerName -Blob $vmDataBlobName -WaitForComplete

    #Confirm that a copy of each virtual hard disk now exist in the backup storage container location.
    Get-AzureStorageBlob -Container $backupContainerName

    #Start VM after backup complete
    $vm | Start-AzureVM







    The process is length but at last we managed to backup the virtual machine.

    Tuesday, January 13, 2015

    Backup VMM Database By Using Orchestrator


    Let have a look on how to configure Runbook to assist us on perform VMM backup based on schedule.



    [ Activities ]

    • Monitor Date/ Time – runbook execute based on predefine schedule
    • Run .Net Script – execute powershell command
    • Send Event Log Message – display status of the backup in event log

    [ Monitor Properties ]


    [ Run .Net Script Properties]



    Install VMM Administrator Console on the machine that you need to use execute and enter the following into Run .Net Activity

    $session =New-PSSession -ComputerName 'ICG-AP-VMM01'
    Invoke-command -session $session -scriptblock {

    import-module 'VirtualMachineManager'
    Get-VMMServer "ICG-AP-VMM01" | backup-vmmserver -path D:\Backup
    Remove-PSSession $session
    Remove-Module 'VirtualMachineManager' -force

    [Send Event Log Properties]


    Check in the runbook and click RUN. The runbook will run based on the schedule that you’ve configure.

    Configure Active Directory Federation Services (ADFS) and Web Application Proxy

    Configure Active Directory Federation Services (ADFS) and Web Application Proxy

    We have look on how to use AAD Connect (Azure Active Directory) to configure
    However the tool is still under preview 1 and not suitable for production use. Well, in this post let look into the supported configuration on configure Active Directory Federation Services (ADFS) and Web Application Proxy for single sign-on purpose.
    1.Create the Distribution Services KDS Root Key using Windows Powershell in Windows Server 2012 DC.
    Add-KdsRootKey –EffectiveImmediately
    Wait 10 hours or longer depend on DC replication.
    2.Create Group Manage Service Account.  A security group to hold ADFS server has created. Example:- ADFSGroup.
    New-ADServiceAccount –Name MyAdminAccount –DNSHostname myAdminAccount.ms4u.local –PrincipalsAllowedToRetrieveManagedPassword “ADFSGroup”
    Command format:-
    New-ADServiceAccount -name <ServiceAccountName> -DNSHostName <fqdn> -PrincipalsAllowedToRetrieveManagedPassword <group>
    Patient and wait ! Do not configure ADFS first!!!  Wait few hours till Managed Service Account appear from Active Directory Administrative Center.
    3. Install the certificate to ADFS server farm and Web Proxy. (We are using fs.ms4u.local) . You can refer to here if you want to setup for lab purpose by using Internal CA.
    [ Add roles ]
    • ADFS VM – install Active Directory Federation Services
    • Web Proxy – install Web Application Proxy from Remote Access roles
    • MUST separate both roles into two different VMs. Do not put ADFS and Web Proxy into the same VM.
    [ Configure ADFS –1st farm ]
    After install ADFS roles, next step is start the wizard from Server Manager. Follow below simple step
    • Select Create 1st federation
    • Select Domain Admin ID that has permission on AD
    • Select public certificate that you’ve generated and installed
    • Define the Group Managed Service Account that you’ve defined in earlier step
    • Select database. For small scale, you can select Windows Internal Database. Meanwhile, for more than 5 servers, it is recommended to setup SQL Server
    [Add 2nd ADFS Server to server farm]
    On subsequent ADFS Server Farm, select Add a federation server to a existing federation server farm.
    • Specify domain admin account
    • Enter your  primary Federation Server info
    • Select the same public certificate that you’ve installed on 1st server
    • Select the same Group Managed Service Account
    [ Configure Web Application Proxy ]
    Web Application proxy provides proxy functionality for Active Directory Federation Services (ADFS) to help system administrator secure access to an ADFS.
    • In the Federation service name box, enter the fully qualified domain name (FQDN) of the AD FS server; for example, fs.ms4u.local
    • Define local admin right on the federation server
    • Select the same public certificate used by federation server
    Voila !. That’s all the configuration. Now you’ve ADFS server farm and Web Application proxy server setup in your production environment.
    Hope this simple guide assist and provide you a simple step to more forward.
    Good luck on your setup!