The Deployment Bunny

OS Deployment, Virtualization, Microsoft based Infrastructure…

  • Archives

  • Meta

Archive for the ‘Hyper-V’ Category

Nice to Know–Microsoft Virtual Machine Converter 3.0 released to web

Posted by Mikael Nystrom on October 13, 2014


Now with P2V, yes!

New Features in MVMC 3.0
The 3.0 release of MVMC adds the ability to convert a physical computer running Windows Server 2008 or above server operating systems or Windows Vista or above client operating systems to a virtual machine running on Hyper-V host.

Standard stuff is:

  • Converts virtual disks that are attached to a VMware virtual machine to virtual hard disks (VHDs) that can be uploaded to Microsoft 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.
  • Converts and deploys virtual machines from VMware hosts to Hyper-V hosts on any of the following operating systems:
  • Windows Server® 2012 R2
  • Windows Server® 2012
  • Windows Server 2008 R2 SP1
  • Converts VMware virtual machines, virtual disks, and configurations for memory, virtual processor, and other virtual computing resources from the source to Hyper-V.
  • Adds virtual network interface cards (NICs) to the converted virtual machine on Hyper-V.
  • Supports conversion of virtual machines from VMware vSphere 5.5, VMware vSphere 5.0, and VMware vSphere 4.1 hosts to Hyper-V.
  • Has a wizard-driven GUI, which simplifies performing virtual machine conversions.
  • Uninstalls VMware Tools before online conversion (online only) to provide a clean way to migrate VMware-based virtual machines to Hyper-V.
    Important MVMC takes a snapshot of the virtual machine that you are converting before you uninstall VMware Tools, and then shuts down the source machine to preserve state during conversion. The virtual machine is restored to its previous state after the source disks that are attached to the virtual machine are successfully copied to the machine where the conversion process is run. At that point, the source machine in VMware can be turned on, if required.
    Important MVMC does not uninstall VMware Tools in an offline conversion. Instead, it disables VMware services, drivers, and programs only for Windows Server guest operating systems. For file conversions with Linux guest operating systems, VMware Tools are not disabled or uninstalled. We highly recommend that you manually uninstall VMware Tools when you convert an offline virtual machine.
  • Supports Windows Server and Linux guest operating system conversion. For more details, see the section “Supported Configurations for Virtual Machine Conversion” in this guide.
  • Includes Windows PowerShell capability for offline conversions of VMware-based virtual hard disks (VMDK) to a Hyper-V–based virtual hard disk file format (.vhd file).
    Note The offline disk conversion does not include driver fixes.

Posted in Hyper-V, SCVMM | Tagged: , | 1 Comment »

Nice to Know–Deploying Windows Server Technical Preview on HP Proliant Microserver Gen 8

Posted by Mikael Nystrom on October 11, 2014

I use the HP Microserver Gen 8’s at home, since they are quiet and act as a full-grown server with full iLO support, dual network adapters and then some. I can basically do all kinds of testing with new operating systems and system center management platforms without upsetting my family to much and that is very practical.

During the deployment of Windows Server Technical Preview everything worked as expected. After the installation I added the Hyper-V role to start testing to deploy VM’s. I booted up the MDT Boot image, selected the Task Sequence and the install was working great, but hey, the network performance???

According to ImageX it will take 45 minutes to lay down the image! That cannot be correct, there is something wrong here. That kind of slow performance over the network just have to be an issue.. and it is…

You need to update the network driver for the built-in network adapters in HP Proliant Microserver Gen 8.

The built in driver is a Broadcom Nextreme driver and that does not work correctly with Hyper-V

Download the HP Ethernet 1 GB 2-port 332i Adapter driver from HP and install that instead, the 45 minutes is now just 5 minutes…



Happy Deployment.

Posted in Drivers, HP, Hyper-V, Windows Server vNext | Tagged: , , , | 2 Comments »

PowerShell is King – vNext Hyper-V gets support for Network Device Naming

Posted by Mikael Nystrom on October 4, 2014

And that my friends is GREAT. Basically that means you can create a a VM Network Adapter in Hyper-V while the VM is running (also a new feature), give it a name and enable Device Naming on the VM Network Adapter and then inside the VM find the Network Adapter using PowerShell and configure it without using the Mac Address as the identification.

Create the Network Adapter:

  • Create the NIC while the VM is running (just for the fun of it) using PowerShell
    • Add-VMNetworkAdapter -VMName SRV101 -SwitchName UplinkSwitch -Name MikesNIC01 -Verbose
  • Enable Device Naming
    • Set-VMNetworkAdapter -VMName SRV101 -Name MikesNIC01 -DeviceNaming On -Verbose
  • Verify Device Naming using PowerShell, or Settings, or directly in the Hyper-V Manager
    • Get-VMNetworkAdapter -VMName SRV101 | Format-List Name, DeviceNaming


Log in to the VM:

Using PowerShell you can now get the network adapter name in the VM with the name gave network adapter in the parent partition.

  • Get-NetAdapterAdvancedProperty -Name * | Where-Object -FilterScript {$_.DisplayValue -LIKE “Mike*”}

You can also see this as properties in the Network Adapter.



This gives us an easier way to automate the creation/configuration of VMs when it comes to handing over a task from the host to a VM when building solutions.


Posted in Hyper-V, PowerShell, Windows Server vNext | Tagged: , , | Leave a Comment »

Issue – Emulex Nic in Windows Server 2012 R2 with VMQ still does not work

Posted by Mikael Nystrom on September 3, 2014

Today, working at a customer deploying Hyper-V hosts with Emulex CNA1100 we run into issues (did not surprise me, since the issue have been around for more than a year, but I still try and test to see if it ever gets better).

The issue is that VMQ still needs to be disabled on every Emulex NIC. That bad thing is that the issue has been around for a very, very long time. It took a very long time for the vendor to acknowledge the issue and now they state that there is a solution soon to be released. I really hope that, but I have heard it before…

Read more here:

My simple recommendation is to disable VMQ in all Emulex Network adapters if they are installed in Windows Server 2012 R2 or buy something that works and use VMQ.

When they release something that actually works I will remove this blog post.


Posted in Hyper-V | Tagged: | 5 Comments »

PowerShell is King – Create the “missing” VM on all the lab machines

Posted by Mikael Nystrom on July 9, 2014

Lets assume that you are running a class and suddenly someone raise the hand and say “I’m missing one of the VMs…” That is far from god, but wait a minute, what about PowerShell to the rescue?, of course, so here it is:


Code snip below:

$servers = 1..21 | ForEach-Object {
“VIAMONSTRA{0:D3}” -f $_

foreach ($Server in $Servers)
Invoke-Command -ComputerName $Server -ScriptBlock {
$VMName = “FS01″
$VMMemory = 2048MB
$VMDiskSize = 60GB
$VMNetwork = “Internal”
$VMLocation = “C:\VMs”
New-VM -Name $VMName -Generation 2 -MemoryStartupBytes $VMMemory -SwitchName $VMNetwork -Path $VMLocation -NoVHD | Out-Null
New-VHD -Path “$VMLocation\$VMName\Virtual Hard Disks\$VMName-Disk1.vhdx” -SizeBytes $VMDiskSize | Out-Null
Add-VMHardDiskDrive -VMName $VMName -Path “$VMLocation\$VMName\Virtual Hard Disks\$VMName-Disk1.vhdx” | Out-Null


Posted in Hyper-V, PowerShell | Tagged: , , | Leave a Comment »

Nice to Know–After a long time, Emulex now finally admit that there is an issue in the firmware and help is soon to appear

Posted by Mikael Nystrom on June 22, 2014

The combo of Hyper-V, VMQ, Emulex and lost network connectivity has been a nightmare for a long time. We have tried it all and the ONLY solution that works has been to disable VMQ, which sucks. Just a couple of days ago Emulex posted a note where they state that “some customers” (that is BS!) have reported loss of network connectivity. But there is light in the tunnel, they are working on new firmware so stay tuned for that. The new firmware is about to released mid-July 2014.

You should read the entire story and you can do that here:


Posted in Emulex, Hyper-V, VMQ, Windows Server 2012 R2 | Tagged: , , | Leave a Comment »

TechEd NA 2014 – The Scripts from my session – DCIM-B309 – Bare Metal OS Deployment in Microsoft System Center 2012 R2 Virtual Machine Manager

Posted by Mikael Nystrom on May 15, 2014

Here is the sample scripts from my session at TechEd NA 2014 (DCIM-B309 – Bare Metal OS Deployment in Microsoft System Center 2012 R2 Virtual Machine Manager: This Is How It Is Done!)


Channel 9:


Posted in Deployment, Hyper-V, SCVMM, System Center Virtual Machine Manager 2012, TechEd | Tagged: | Leave a Comment »

PowerShell is King – Simple resource Metering using PowerShell

Posted by Mikael Nystrom on March 25, 2014

This morning the Big Boss sent an email “There is something wrong, it’s slow, fix it.”

Yes, Sir, no problem Sir, absolutely Sir (you get the picture). Anyway, I know we could have problems, since we are moving around all VM’s to change basically everything from design to hardware, so I needed a fast way to find out on what server, what VM and why. The first thing that comes to mind is the most valuable thing you have in a virtualized platform and that is IOPS, so for a few servers that could be having issues I run this:


$ServerNames = "HOST01","HOST02","HOST03","HOST04"

foreach ($ServerName in $ServerNames)


Get-VM -ComputerName $ServerName -Verbose| Enable-VMResourceMetering -Verbose

Get-VM -ComputerName $ServerName | Measure-VM | select VMname,AggregatedAverageNormalizedIOPS,AggregatedAverageLatency,AggregatedDiskDataRead,AggregatedDiskDataWritten | ConvertTo-Html > "$ServerName.html" -Verbose




Posted in Hyper-V, PowerShell, Windows Server 2012 R2 | Tagged: | 1 Comment »

Recording–Windows Server 2012 Hyper-V

Posted by Mikael Nystrom on January 27, 2014

(In Swedish)

För Microsofts räkning så spelade jag in en serie korta filmer, varsågod.

“Mikael Nyström, expert inom setup & deployment och konsult på TrueSec, lär dig att konfigurera Hyper-V och upptäcka alla fördelar med att köra virtuella maskiner i Windows Server 2012. “


Posted in Hyper-V, Recording, Windows Server 2012 | Tagged: | Leave a Comment »

PowerShell is King – Convert WIM to VHD/VHDX with support for Gen 1 and Gen 2 (BIOS/UEFI) and then some…

Posted by Mikael Nystrom on December 19, 2013

In my line of work, automation is important, since time is the only thing I don’t have. Many years ago I created the WIM2VHD script and that was ok, so when R2 came out I needed to update it to support UEFI. That was easier said then done. The problem is that the UEFI boot process requires fat32, GPT and a bunch of partitions and when using PowerShell to create them the OS will immediately start protecting them after creation which makes it impossible to copy files to the boot partition since it is “protected”, but since I’m a very creative person I found the solution in diskpart. (read about it further down)

Mounting the ISO

I actually have to scripts in this case, one is to mount the ISO that will return the drive letter, kind of handy to have since I need to know the path to the wim file


The script to mount the ISO


The script to mount the ISO (Text)


# Mount ISO and get driveletter
[parameter(mandatory=$true,HelpMessage="Please, provide a path to ISO.")]
Mount-DiskImage -ImagePath $ISO
Write-host (get-date -Format u)" – Mounting =" $ISO
$ISOImage = Get-DiskImage -ImagePath $ISO | Get-Volume
$ISODrive = [string]$ISOImage.DriveLetter+":"
Write-host (get-date -Format u)" – Driveletter is now =" $ISODrive


Getting the correct Index number in the WIM

After the ISO is mounted you can use the Get-WindowsImage commandlet to see what Indexes you have in the WIM file.
The Command Get-WindowsImage – Path d:\sources\install.wim will give me this list.



Converting the WIM file to the VHDX file

Besides converting the WIM to a VHDX file it also creates the UEFI style disk layout or the BIOS style disk layout. It also give you the opportunity to add the SXS folder to the drive (makes it a bit easier to add .Net framework without internet access or media access) and it will also ask you to add a Tools folder, if you do it will end up in c:\Tools, extremely handy, I usually put things in there that I need, NP++, Sysinternals, 7-Zip, and such.

If you open the script you will one thing that is a bit strange (actually two), when creating the UEFI style disk partition we create the first partition with the WRONG GUID number and that is the way we need to do it, otherwise windows will start protecting the drive, so we create the partition with the GUID for data drive, later on we create a text file and we let diskpart run against that text file that will then change the GUID number to the correct one. scary…

Sample command to create a BIOS based VHDX

.\Create-VHDX.ps1 -SourceFile d:\sources\install.wim -DestinationFile C:\Test\RWS2012R2BIOS.vhdx -Disklayout BIOS -Index 2 -PathtoSXSFolder d:\sources\sxs -PathtoExtraFolder C:\HYDV4\Tools –Verbose

Sample command to create a UEFI based VHDX

.\Create-VHDX.ps1 -SourceFile d:\sources\install.wim -DestinationFile C:\Test\RWS2012R2BIOS.vhdx -Disklayout UEFI -Index 2 -PathtoSXSFolder d:\sources\sxs -PathtoExtraFolder C:\HYDV4\Tools –Verbose

When running it looks like this

I have tested the script on WS2012R2/W8.1 with Hyper-V but it should work on WS2012/W8 as well, just that I don’t have any of those old systems running at home anymore…

Since the script is 255 lines of POSH, you better download it from here

Posted in BIOS, Deployment, Hyper-V, PowerShell, UEFI, Windows 8.1, Windows Server 2012 R2 | Tagged: , | 10 Comments »


Get every new post delivered to your Inbox.

Join 4,036 other followers