I believe in Hyper-V!

MicrosoftCategory Archives

Convert single .VMDK to .VHDX with Microsoft Virtual Machine Converter 2.0 (MVMC)

Hi there,

In the last couple of weeks I was on a vacation and can tell you this vacation was the best in the last ten years :) Now I’m ready for the new challenges!

In this blog post I would like to show how to convert single VMware virtual disk (.VMDK) to Hyper-V (.VHDX) with free tool, Microsoft Virtual Machine Converter 2.0 (MVMC) which you can download from here. Few months ago I wrote blog post on similar topic, but this is a new version of MVMC with lots of new features.

What is Microsoft Virtual Machine Converter (MVMC)?
Microsoft® Virtual Machine Converter (MVMC) is a Microsoft-supported, stand-alone solution for the information technology (IT) pro or solution provider who want to convert virtual machines and disks from VMware hosts to Hyper-V® hosts and Windows Azure™.
New Features in MVMC 2.0
MVMC 2.0 release of MVMC includes the following new features:

  • Converts virtual disks that are attached to a VMware virtual machine to virtual hard disks (VHDs) that can be uploaded to Windows Azure.
  • Provides native Windows PowerShell capability that enables scripting and integration into IT automation workflows.
    Note The command-line interface (CLI) in MVMC 1.0 has been replaced by Windows PowerShell in MVMC 2.0.
  • Supports conversion and provisioning of Linux-based guest operating systems from VMware hosts to Hyper-V hosts.
  • Supports conversion of offline virtual machines.
  • Supports the new virtual hard disk format (VHDX) when converting and provisioning in Hyper-V in Windows Server® 2012 R2 and Windows Server 2012.
  • Supports conversion of virtual machines from VMware vSphere 5.5, VMware vSphere 5.1, and VMware vSphere 4.1 hosts Hyper-V virtual machines.
  • Supports Windows Server® 2012 R2, Windows Server® 2012, and Windows® 8 as guest operating systems that you can select for conversion.

6

As you noticed, with Microsoft Virtual Machine Converter we can convert / migrate to Azure and to Hyper-V but only based VMs only if have vCenter server or ESXi server, but what if I have VMware Workstation based VMs.. cannot convert with MVMC. On that way can convert only .vmdk to .vhdx and then create new Hyper-V VM with converted virtual disk.
So, how to do it?

With PowerShell, of course :) In the previous version of MVMC we could do with CLI.

I know, I know… most of you will tell me; you have lots of free tools for conversion but I want use only Microsoft tools! ;)

Here is short explanation how to…

Install MVMC 2.0 (2.1 ;) ), open PowerShell as administrator and write
get-command -Module mvmccmdlet

Here you can see MVMC modules
1

If you don’t see modules, need to create user profile and to import modules

Create user profile

PS C:\Windows\system32> $env:psmodulepath -split ';'
C:\Users\rm\Documents\WindowsPowerShell\Modules
C:\Program Files\WindowsPowerShell\Modules
C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
PS C:\Windows\system32> $profile
C:\Users\rm\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
PS C:\Windows\system32>

Now we can convert .vmdk to .vhdx through PowerShell. Open PowerShell as administrator and…

ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath “D:\VMwareConvert\Windows8x64VMware\Windows8x64
.vmdk” -DestinationLiteralPath “D:\VMwareConvert\Windows8x64Hyper-V” -VhdType DynamicHardDisk -VhdFormat Vhdx

3

For a 17GB virtual drive I needed 6 minutes on SSD

4

At the end we can create Hyper-V virtual machine with converted virtual disk.

5

I’d like to thanks my great friend Aleksandar “The PowerShell Guru” Nikolic for the big help.

Also, I must mention a new book “System Center 2012 R2 Virtual Machine Manager Cookbook – Second Edition” from my Hyper-V MVP fellow Alessandro Cardoso.

Hope to see you soon ;)

Cheers,

Romeo

The circle is closed (Hyper-V evangelism – Spring 2014)

Three conferences in three weeks ;) In the last three weeks I was a speaker on three different conferences, from Sabis IT Meeting (Abu Dhabi, UAE), WinDays 14 (Umag, Croatia) to MS NetWork 4 (Banja Vrućica, BiH) and I can’t tell you where was better :).
The first IT conference was in Abu Dhabi (29. & 30. 3.2014.) where I held two days Hyper-V training with my good fellow Charbel Nemnom for Sabis administrators from Gulf Region. One great and awesome experience for me. Thank you Charbel!

IMG_6470IMG_6529
IMG_6699

The second conference was the biggest Microsoft IT conference in our region, WinDays 14 from 7.-10.4.2014. I had one session, Hyper-V over SMB and one small part on a technology keynote where I mentioned few cool features in Windows Server 2012 R2 as well cool features in the Hyper-V role. Many thanks to great guys, Marin, Robert, Tipsi etc.

WD WP_20140407_003
wd1

The third conference was MS NetWork 4, the biggest Microsoft IT conference in Bosnia and Herzegovina. I had session Hyper-V from H to V. Great conference with great people and lots of Bosnian humor :) Thank you all, especially to Damir Dizdarević and Enis Šahinović for a great moments.

MS ms1

For now it is enough conferences and let’s back to work.

Cheers,

Romeo

Hyper-V Cluster for the Lab – Part 1

In this blog post I’d like to explain how to configure Hyper-V Cluster using only Microsoft tools.
First off all I have to describe my hardware environment, one old PC with a bunch of disks (JBOD), two servers for clustered storage spaces and SOFS and two servers for the Hyper-V cluster. Every physical machine has four network adapters and Windows Server 2012 R2 installed. All servers are a domain members!

At the end lab environment will look like in the picture below
ToJeToSMB

After we prepared hardware let’s go to the software. On every server in the environment I created NIC Team and vSwitches. How to create NIC Team and vSwitches you can read here.

1

Now I need to configure the few major things and that’s Storage Pool, virtual disks (one for the Quorum and one for the Cluster Shared Volume on which will be virtual machines), iSCSI Target on a Storage side and iSCSI Initiators on the Hyper-V hosts side.

Storage Pool and Virtual disks (Storage Server)

I have one available disk ready and now I’ll be create storage space and two virtual disks from that pool.

1 1 1 1
We’re done with Storage Pool and we need to create Virtual Disks

1 
1

The first virtual disk will be for a Hyper-V Cluster Quorum

1 This virtual disk will be Simple, Thin and will be 5GB big. This is enough for Quorum disk.
1
After we are done with virtual disk creation need to create a volume!

1

1

Here is quorum disk configuration.

1

Now I’ll do another virtual disk for a Virtual Machines (Cluster Shared Volume)

1 

iSCSI Virtual Disk

On the storage server now we need to configure iSCSI Target (iSCSI Virtual Disk…) for a Hyper-V hosts on the both previously created disks.

1 2
Shift to the Hyper-V hosts and let’s configure iSCSI initiators. On the both (or on the all Hyper-V hosts) Hyper-V hosts under Server Manager console open iSCSI Initiator and connect to the storage server.

1
1

On the Hyper-V host open Disk Management to view disks!
1

The next steps are; Bring disks Online, Initialize Disk and Format Disk

1

Now we have everything what we need for a Cluster creation, network, storage and Hyper-V hosts. Let’s create cluster.
Open Failover Cluster Manager console and click on Create Cluster

1

Follow the steps below

1 
1 
1 1

At the end we have our Hyper-V Cluster created ;)

1

Don’t forget to do Cluster Validation after you are finished. If you have some warnings fix them and go ahead.

SMBclusterValidation

In the next blog post we will se how to configure disks, network, Virtual Machine Role (Configure Role) as well as how to create highly available virtual machines and lots of beautiful things such as Live Migration etc.

Cheers,

Romeo