The way to migrate VMware/Physical to Hyper-V / Azure: MVMC/MAT

Hi folks,

Welcome again in this third post of my blog series  The way to migrate to Hyper-V / Azure. We have seen in the previous posts the first common way to migrate and convert Virtual Machines from VMware to Hyper-V using SCVMM (You can check it HERE). We also seen that this option is not convenient for every scenario, and we saw the mandatory dependency on VMM and other requirements.

Fortunately, Microsoft provides another tool permitting not only converting VMware virtual machines but also physical machines. The tool is Microsoft Virtual Machine Converter (MVMC), and today we are at the 3.0 version. The tool can be downloaded right here

  Short history 

  • MVMC 1.0 was released in 2013 to provide a way to convert VMware virtual machines and virtual hard disks to a Hyper-V 2012 platform. It provided a CLI interface for scripting conversion.
  • MVMC 2.0 was released in April 2014 and brought new features like the support for vCenter and ESX(i) 5.5, the support of more VMware virtual hardware versions (4 to 10) , the support of converting Linux based virtual machines and the possibility of converting/migrating the VMware VMs to Azure. MVMC 2.0 also added native powershell support for more efficient automation and scripting experience.

  Today 

We all know that with the release of System Center 2012 R2, the P2V feature in VMM was removed. This was a real mess for the community, unable to find a Microsoft clean way to convert physical machines to Hyper-V.

Microsoft reacts to that and includes the P2V feature with the third release of MVMC, MVMC 3.0. But to be honest, Hyper-V 2012 R2 and VMM 2012 R2 were GA on October 2013, and MVMC 3.0 a year beyond that, so what Microsoft thought customers will do during this year (Converting the dirty way!!)

  Is MVMC free ? 

MVMC is a Microsoft tool provided at free of charge

  MVMC in action 

  Requirements 

MVMC have to be installed on an machine that meets the following requirements: Windows Server 2008 R2 SP1, Windows Server 2012, Windows Server 2012 R2, Windows 8, Windows 8.1. Before that, you must install the following requirements:

  • Microsoft .NET Framework 3.5 and .NET Framework 4 if you install MVMC on Windows Server 2008 R2 SP1
  • Microsoft .NET Framework 4.5 if you install MVMC on Windows Server 2012/2012 R2 or Windows 8/8.1
  • Install Feature Bits Compact server
  • Visual C++ Redistributable for Visual Studio 2012 Update 1

NB : Powershell commands are only supported with Windows Server 2012/2012 R2, Windows 8/8.1 because they do use Powershell 3.0

Then you can remotely convert your VMWare VMs or physical hosts. This assumes that you have network connectivity to both source and target platforms.

  What can we convert and what are the conversion paths ? 

  •   Physical to Hyper-V 

P2V path

MVMC can convert physical machines running : Windows Server 2008 / 2008 R2/ 2012 / 2012 R2, Windows Vista /7 /8 /8.1 , Linux operating systems are not supported on P2V

MVMC can convert physical machines to : Hyper-V : 2008 R2 SP1, 2012, 2012 R2

  NB 

  • Only online P2V is supported, offline P2V  is not possible using MVMC
  • As you can see, we can’t convert physical machines to Azure. As an alternative, you will need to convert them to Hyper-V then use another tool or solution to send them to Azure (This will be the topic of the next post in this series)
  • The only target disk format is VHD, MVMC will not let you choose VHDx as a target disk format even when the target hosts are running Windows Server 2012 or 2012 R2. As a (heavy) alternative, you can convert VHD to VHDx after the VM conversion, using Hyper-V (This remember me the P2V feature in VMM 2012 SP1 🙂 where only VHD format was supported too)

The following picture shows how the P2V process is triggered:

Snap 2015-03-04 at 14.41.50_thumb[4]

  1. MVMC connect to the source machine (The source OS), install the MVMC conversion agent and run a system scan to gather information about the OS (Operating system version, volumes, configuration)
  2. You select the volumes to convert, the target VM settings an the target Hyper-V host
  3. MVMC starts the conversion, triggers VSS for the volumes to be converted
  4. The data starts being copied to the target storage
  •   VMware to Hyper-V or Azure (V2V) 

Snap 2015-03-04 at 14.44.45_thumb[2]

  Update  : Microsoft published KB 2977338 to state that converting VMs running under VMware ESXi 5.5 is not possible because of an ESXi design. VCenter is needed. https://support.microsoft.com/en-us/kb/2977338

MVMC can convert VMware based virtual machines running on: ESX/ESXi 4.1, ESX 5.1, ESX 5.5 ; VCenter 4.1, 5.1, 5.5 ; Vsphere 4.1, 5.1, 5,5

MVMC will let you convert VMware VMs running on version 5, but this case in just unsupported by Microsoft.

  N    Note that unlike SCVMM, MVMC can communicate with ESX/ESXi without  the need of VCenter (Except for ESXi 5.5)

MVMC can V2V virtual machines to Hyper-V 2008 R2 SP1/2012/2012 R2 but also to Microsoft Azure

Unlike P2V, you can use VHD or VHDx as a virtual hard disk format for the 2012 and 2012 R2 target. For Azure, only VHD is supported.

  NB  Till this moment, Azure maximum supported OS VHD size is 127 GB, so if your OS disk size is greater, you have to manage to free it under the 127 GB limit

Snap 2015-03-04 at 15.29.53_thumb[3]

MVMC can convert Windows and Linux based virtual machines. For Windows, Server and client are both supported. MVMC can convert server OS from Windows Server 2008 to Windows Server 2012 R2, and client OS from Windows Vista to Windows 8.1

For Linux guest OS, MVMC can convert RHEL 5/6, Ubuntu 10.04/12.04, SLES 11, Centos 5/6, Debian GNU/Linux 7 and Oracle Linux 5/6. X64 and x86 are both supported.

  NB 

  • Additional steps may be required for Linux conversion, visit this TechNet link for detailed information
  • Not all this versions are supported when converting to Azure, only guest OSs that are supported on Azure can be converted (Look here in the  “Supported configurations for converting virtual machines” section)
  • MVMC will uninstall VMware additions before converting windows based virtual machines, you will need to manually uninstall them for the Linux virtual machines

The following picture shows the steps when converting a VMware virtual machine using MVMC

Snap 2015-03-04 at 15.53.26_thumb[1]

  1. MVMC connects to VCenter or ESX/ESXi and selects the target VM
  2. MVMC creates a VM snapshot, uninstalls the VMware tools, then stops the virtual machine.
  3. MVMC starts the copy of the data and create the VHD/VHDx in the target storage. In the Azure case, the VHD is stored on a temporary location
  4. After the conversion, MVMC restores the VMWare virtual machine (Apply the snapshot). In addition, if the target platform is Azure, the VHD is uploaded to the Azure storage (BLOB)
  •   Microsoft Automation Toolkit 

MVMC is a nice tool for converting VMware virtual machines. MVMC offers a UI wizard that let you convert only one virtual machine at a time, so what if we have hundreds or thousands of VMware virtual machines that to convert ?

Fortunately, MVMC comes with native powershell support. In this case, we can script and automate  virtual machines conversion, and trigger multiple and simultaneous conversions at at the same time. The good news is that Microsoft did the job for us, and provided a set of powershel scripts that wrapper MVMC with automation to permit parallel and batch conversion operations. You can download MAT here

  So how MAT works ? 

Snap 2015-03-04 at 16.58.52_thumb[2]

  1. You need to run MAT in a machine, normally where MVMC is installed. This machine is called the Control Machine. MAT needs a SQL server. You can use SQL server Express or an existent SQL installation. MAT will use a small database to record virtual machine conversion states.
  2. MAT will query a Vsphere server to collect the managed ESX/VCenter/VCenters managed virtual machines
  3. MAT will record this information in its database then generate a text file which contains all the VMs names. You have to open this file with a text editor and delete the VM names you do not want to convert
  4. Then MAT will start the conversion using MVMC based on the list you provided.
  5. Because a single MVMC server can only convert 3 virtual machines at a time (It’s by design for performances reasons), you can bring to your configuration other MVMC servers, and tell MAT to use them and spread the conversion tasks between them. These nodes are called helper nodes. Using helper nodes can accelerate the simultaneous conversion operations.

  Conclusion 

In this post, we seen how we can make P2V and V2V to a Hyper-V or Azure platform. The Microsoft Virtual Machine Converter  offers both physical and virtual conversion capabilities, with a great powershell support. For batch conversions, we can use MAT to convert several virtual machines at a time.

Remember:

  • Only V2V operations are possible with MAT, physical conversion is not supported with MAT
  • MVMC just copy the VHD to the Azure storage, it is for you to create and configure the virtual machine in Azure
  • MVMC will cause down time during V2V (The VMs are stopped). You have to schedule wide maintenance window for conversion. If you cannot allow downtime, you can use MVMC to P2V your VMware virtual machine. MVMC talks just with the OS during a P2V process, it will not look if this OS is really virtualized or not. But in this case you will not be able to use MAT
  • You cannot convert physical machines to Azure. If you use MVMC, you have to make a P2V, then use another tool to migrate to Azure.
  • During conversion to Azure, the VHD will be stored in a local path, then uploaded to Azure after the V2V. So you will have to provide enough local storage for the V2V. And the total V2V duration will be equal to : Conversion time + Upload time

This was the third post in this blog series, in the next coming post, I will present the MA (Migration Accelerator) solution that unable customers to migrate and convert everything to Azure.

The way to migrate VMware to Hyper-V: SCVMM V2V

In this second blog of the blog series The way to migrate to Hyper-V / Azure , i will explain the first option of how to migrate VMWare to Hyper-V using System Center Virtual Machine Manager (VMM)

System Center Virtual Machine Manager is part of the Microsoft System Center Suite (Read here the System Center Data sheet). Till the writing time of this blog, we are at the 2012 R2 version (We expect the VNext version in the first quarter of 2016).

Virtual Machine Manager (VMM) is a management solution for the virtualized datacenter, enabling you to configure and manage your virtualization host, networking, and storage resources in order to create and deploy virtual machines and services to private clouds that you have created.

VMM provides a way to manage non Hyper-V hosts like VMware ESX/ESXi and Citrix XenServer.

To be able to manage ESX hosts using VMM, you must have VCenter deployed and managing your ESX hosts. Managing ESX/ESXi hosts by VMM without VCenter is not possible. You need also to manage you Hyper-V hosts using the same VMM server. The Hyper-V servers will host the converted VMs (You can place the converted VMs in the VMM library too)

Once your VMware platform is added to the VMM management, you will be able to convert ESX/ESXi virtual machines using the V2V (Virtual to Virtual) feature.

There’s some requirements that need to be met before you can convert a VMware virtual machine using VMM:

  • VMM does not support converting VMware Workstations.
  • VMM does not support converting VMware virtual machines with virtual hard disks that are connected to an integrated drive electronics (IDE) bus.
  • Online V2V conversions are not supported. This means VMware virtual machines must be offline (powered off) –> Down time
  • You must stop any anti-virus applications that are running.
  • You must uninstall VMware Tools on the guest operating system of the virtual machine.

VMM  2012 supports the V2V machine conversion of virtual machines that are running on the following versions of VMware ESX:

  • ESX/ESXi 3.5 Update 5
  • ESX/ESXi 4.0
  • ESX/ESXi 4.1
  • ESXi 5.1

VMM  2012 SP1 and 2012 R2 support the V2V machine conversion of virtual machines that are running on the following versions of VMware ESX:

  • ESX/ESXi 4.1
  • ESXi 5.1

You can find here the list of the common V2V issues that can be encountered. You can also find here the issues/limits encountered in a real scenario.

If the requirement are met, you can start converting your VMs (From technet)

VMM V2V

  1. Open the VMs and Services workspace.
  2. On the Home tab, in the Create group, click the Create Virtual Machine drop-down arrow, and then click Convert Virtual Machine.The Convert Virtual Machine Wizard opens.
  3. On the Select Source page, next to the Select the virtual machine that you would like to convert box, click Browse.
  4. In the Select Virtual Machine Source dialog box, click the VMware virtual machine that you want to convert, and then click OK.
  5. On the Select Source page, click Next.
  6. On the Specify Virtual Machine Identity page, either keep or change the virtual machine name, enter an optional description, and then click Next.
  7. On the Virtual Machine Configuration page, configure the number of processors and assign the amount of memory in megabytes or gigabytes, and then click Next.
  8. On the Select Host page, select a Hyper-V host for placement, and then click Next.
  9. On the Select Path page, do the following, and then click Next:
  10. In the Storage location box, configure the storage location on the host for virtual machine files. By default, the default virtual machine paths on the target host are listed. To select a different location, click Browse, click a folder, and then click OK.
  11. To add the path to the list of storage locations on the virtual machine host, select the Add this path to the list of default storage locations on the host check box.
  12. On the Select Networks page, select the logical network, the virtual network, and the virtual LAN (VLAN), if applicable, to use for the virtual machine, and then click Next.
  13. On the Add Properties page, configure the settings that you want, and then click Next.
  14. On the Summary page, review the settings. Optionally, select the Start the virtual machine after deploying it check box. To start the conversion process, click Create.The Jobs dialog box appears to indicate the job status. Verify that the job has a status of Completed, and then close the dialog box.
  15. To verify that the virtual machine was converted, do the following:
    1. In the VMs and Services workspace, locate and then click the Hyper-V host which you selected during placement.
    2. On the Home tab, in the Show group, click VMs.
    3. In the VMs pane, verify that the virtual machine appears.

Conslusion

Maybe Microsoft has provided a way to convert VMware virtual machines to Hyper-V using VMM, but honestly, we are faced to many constraints here:

  • You need to purchase VMM to to it : No one will invest in VMM just to make some V2V operations (unless this concerns thousands of VMs)
  • You need VCenter to do it. Customers not using VCenter will not be able to make V2V operations using VMM
  • Not all the VMware ESX/ESXi versions are supported
  • Offline V2V is not possible causing a considered downtime (Tens of minutes to hours depending on the VM size and the network/storage performances)

So i think that using VMM to make V2V operations is suitable when/for:

  • Customers how already meet the V2V requirement regarding the VMware integration: VCenter, ESX/ESXi versions…
  • Customers with wide maintenance window to stop the VMware VMs during V2V operations

So, this was the first option to convert virtual machines from a VMware virtualization platform to Hyper-V.  In the next blogs i will continue discussing:

  • The way to migrate VMware/Physical to  Hyper-V / Azure: MVMC/MAT
  • The way to migrate from anywhere to Azure: Migration Accelerator (MA)

The way to migrate to Hyper-V / Azure : Introduction

Today, i’m going to talk about the ways to migrate to a  Microsoft virtualization technology from a no-Microsoft Virtualization technology.

The two Microsoft technologies i’m talking about are:

  • Hyper-V
  • Microsoft Azure

And the no-Microsoft technologies are:

  • VMware
  • Physical servers
  • Public Cloud Platforms (AWS…)

Let’s begin with a short history. VMware was always and still the leader of the virtulization market share. But with the release of Hyper-V in 2008 (With Windows Server 2008), rules changed. I’m not saying that Hyper-V 2008 was perfect or was competitive regards VMware, but i’m saying that this was the beginning of a new two horses course.

The real competition began with the announcement of Windows Server 2012 (Hyper-V 3.0) and the competitive advantages of Hyper-V 2012 compared to VMware, in scalability, performance or on a feature perspective. ( See here)

Hyper-V become a first class enterprise visualization technology that enterprises can trust, deploy and use to run production and sensitive enterprise workloads. The following picture shows the hypervisor share growth, and how Hyper-V is gaining in share of shipment while VMware declines.

Hypervisor share growth

Also Gartner recognizes Microsoft as a leader along with VMware in the x86 Virtualization Magic Quadrant (See here)

Gartner 2014 Virtualization MQ

Also, regarding the Public Cloud platforms, today Microsoft is a leader in the Iaas (Infrastructure as a Service), PaaS (Platform as a Service) and Storage services. The following are the Gartner 2014 MQ results (See here)

Gartner 2014 Public Cloud IaasS MQ

Gartner 2014 Iaas MQ

Gartner 2014 Public Cloud PaasS MQ

 Gartner 2014 PaaS MQ

Gartner 2014 Public Cloud Storage MQ

Gartner 2014 Storage Services MQ

As a result, and to provide users a way to pass from all these technologies to Hyper-V, Microsoft started delivering tools and solutions to perform such migrations. In this blog series, i will talk about those tools and try to explain the options of using them.

The series is divided into 4 parts:

  1. The way to migrate to Hyper-V / Azure : Introduction
  2. The way to migrate  VMware to Hyper-V: SCVMM V2V
  3. The way to migrate VMware/Physical to  Hyper-V / Azure: MVMC/MAT
  4. The way to migrate from anywhere to Azure: Migration Accelerator (MA)

Does my processor support Hyper-V : Coreinfo

Hi all,

Last June, i have been on a customer site to deliver a Windows Server 2012 RDS VDI PoC platform. They were not prepared so they give me two very old servers (and i mean it). No matter, it’s a PoC. I told them to install Windows Server 2012 on these servers and to enable Hyper-V. After one day, they report me that they were unable to enable hyper-V due to a missing virtualization feature. mmmm, i checked the processor technical specifications, but i was unable to find details. I rebooted the server to check the BIOS, i didn’t find any window where i can enable or disable the Hardware-assisted virtualization feature. (The processor must meet the following requirements)

I took a moment of reflection : The processor does not support it or the BIOS needs update !!

I have no time for BIOS update (even if i have time, updating a 8 year old server BIOS is a nightmare), so i rapidly decide to check if the processor supports or not virtualization. I downloaded the Coreinfo tool made and tailored by the Mark Russinovich Windows ninja.

You need to just run the tool from a command line.

  • The following is what i got when running the tool:

SNAG-0001

The legend is : ( * =  present,    –  =  not present)

You can see that the VMX feature is not present, VMX means “Supports Intel hardware-assisted virtualizaion”. Since my processor was an Intel one, i affirmed directly that this server is unfortunately useless in our case 😦

IMPORTANT NOTE : Hyper-V must be not enabled when making this verification, for a consistent result the Hypervisor should not be present. A (   ) must follow the HYPERVISOR feature

  • The following is the result of running Coreinfo in a Hyper-V production server. The tool indicates that the VMX feature is not present because the hypervisor is present

SNAG-0003

  • The same case is when running the tool in a virtual machine : In the case of a Hyper-V virtual machine, the VMX feature is not inherited to the virtual processor of the VM, so the VMX feature is not present for a VM processor. But, we can’t say that the tool result is valid because the tool indicates that the Hypervisor is present. Results are not consistent.

SNAG-0003

  • Finally, this is the result for a valid processor and result that supports virtualization

SNAG-0004

Don’t forget that Hyper-V (2008 R2 and 2012) needs in addition of the Virtualization feature, the Hardware-enforced Data Execution Prevention (DEP) feature. In the Intel case, it’s called NX bit. (NX in CoreInfo)

Note : For Hyper-V to run on a Windows 8 Pro or Enterprise machine, the processor must support SLAT feature. You can easily tape Coreinfo -v to display virtualization related features.

SNAG-0005

Windows hangs when accessing a Cluster Shared Volume

Windows Server 2008 R2 SP1 has a key feature in Clustering and Hyper-V called CSV (Cluster Shared Volume).

One day, we notice that we are experiencing hang issues when accessing the a CSV Volume.

The following events are logged into the cluster event log and the system log.

#1 – Cluster Shared Volume ‘Volume1’ (‘Cluster Disk 2’) is no longer available on this node because of ‘STATUS_CONNECTION_DISCONNECTED(c000020c)’. All I/O will temporarily be queued until a path to the volume is reestablished.

#2 – Cluster Shared Volume ‘Volume1’ (‘Cluster Disk 2’) is no longer available on this node because of ‘STATUS_WAIT_0(0)’. All I/O will temporarily be queued until a path to the volume is reestablished.

#3 – Cluster Shared Volume ‘Volume1’ (‘Cluster Disk 2’) is no longer accessible from this cluster node because of error ‘ERROR_TIMEOUT(1460)’. Please troubleshoot this node’s connectivity to the storage device and network connectivity.

When these events happen, all the virtual machines on that volume hang and restart.

After a day of troubleshooting (forums, blogs, event logs) I have the following result : The problem occurs when accessing a CSV Volume from a non-coordinator node.

We suspected many culprits : DPM, VSS, CSV Networks…

Finally, the solution was in a hot-fix that we installed and the problem was gone.

Unfortunately, the time the issue was solved, i installed 4 hot-fixes:

KB2494016

KB2639032

KB2685891

KB2674551

I don’t know which update fixes the problem, but i suspect it’s the KB2639032

Wish that helps!

Hyper-V MAC Addresses Duplication or Collison

Networking in Hyper-V is one of the main feature in a virtual infrastructure.

like physical dimension, for each virtual machine ( for each virtual NIC) assigned a MAC address (classic and logic networking).

The question is:

– How these MAC addresses are created ?

– How these MAC addresses are assigned to Virtual machines ?

– How can i avoid MAC addresses collision ?

– Static Mac addresses or Dynamic MAC addresses ?

John Howard -MSFT has written an excellent blog about how MAC addresses are generated and assigned in Hyper-V.

http://blogs.technet.com/b/jhoward/archive/2008/07/15/hyper-v-mac-address-allocation-and-apparent-network-issues-mac-collisions-can-cause.aspx

What can we learn from John:

1- MAC addresses are generated based on the Microsoft IEEE Organizationally Unique Identifier 00-15-5D and the last 16 bytes from the Host IP address: MAC address RANGE = 00-15-5D-(Hex(last 16 bytes of Host IP))+00 to 00-15-5D-(Hex(last 16 bytes of Host IP))+ff

Example:

If my host IP address is 192.168.20.1, the last 16 bytes are 20.1, in hex 14-01 and the MAC address range is [00-15-5D-14-01-00;00-15-5D-14-01-ff]

2- How MAC addresses are assigned: Each new created virtual machine NIC receives the next available MAC address.

Example: (NIC1, 00-15-5D-14-01-00), (NIC1, 00-15-5D-14-01-01), (NIC1, 00-15-5D-14-01-02) …

3– If MAC addresses range is saturated: Virtual machine with virtual NIC will be unable to boot

4- Dynamic or Fixed MAC range:

  • In production environment, it’s recommended to fix your MAC      addresses range. This will simplifie management, tracking, avoid collision.
  • If your environment is large, and it’s possible to have two hosts      with the same last 16 bytes, think to fix your MAC addresses range
  • Try to manage your Virtual environment with SCVMM, it automatically      avoid MAC collision, it has global view of all your hosts.

Hyper-V console alternative

Using the Hyper-V console may be sometimes impossible or dificult to realize. The most cases are when you are facing a Windows server 2008 R2 core edition or a Windows Hyper-V server 2008 R2.

Others possibilities are when you are unable to open the Hyper-V console.

Regardless what is your reason, an Hyper-V console alternative exists, and for FREE

5nine Manager for Hyper-V  provides an EASY_Monitoring for Hyper-V and a local Graphical User Interface to Microsoft Hyper-V R2 server. It supports Hyper-V technology on Full and Core installations of Windows Server 2008 R2, as well as on Microsoft Hyper-V Server 2008 R2, which is the Microsoft’s standalone FREE Hypervisor! You can use it when Microsoft SC VMM, or even Hyper-V Manager are not available for Core or Free versions of Server 2008 R2. It also provides Value-Add functions, such as advanced network bindings, performance monitoring, and a hardware profiling for all flavors of Server 2008 and Free/Core Hyper-V installations.

Download 5nine (You must register before downloading it, but for free too )

Hyper-V Remote and Local management troubleshooting

Sometimes, you encounter issues when connecting to Hyper-V console. Problems may occur for different reasons:

– Insufficient permissions

– Firewall exceptions

– Configuration issues

To troubleshoot and resolve this, John Howard -MSFT has written an excellent blog about that.

Hyper-V Remote Management: You do not have the required permission to complete this task. Contact the administrator of the authorization policy for the computer ‘COMPUTERNAME’

– If you want to rapidly configure your Hyper-V remote parameters, see the excellent HVremote script: HVremote