Generation 2 VMs – The new type of virtual machine.

With the release if Microsoft Windows Server 2012 R2 there will be two options when you come to create your VMs – Generation 1 or Generation 2 VMs.

Generation 1 VMs are the ones you have been use to since the release of Hyper-v with Windows Server 2008. With Windows Server 2012 R2 you will have the option of choosing a generation 2 VM, this will give you several benefits including:

  • Emulated devices have been removed
  • Allows for boots from virtual SCSI
  • You can boot from synthetic network adapters
  • Boot from UEFI instead of BIOS
  • UEFI secure boot is enable
  • You can run Gen1 and Gen2 VMs side by side#
  • No performance improvements on Gen2 VMs. Having said that booting is around 20% faster and OS install can be 50% faster.

If you look at a Gen1 vs. a Gen2 settings screen below (Gen1 is on the left with Gen2 on the right) for Hyper-V you will notice a lot of the options you are use to appear to be ‘missing’. This is because things such as the IDE controllers are no longer needed – you can use the SCSI controller to boot! Other options that are no longer needed for Gen2 is the COM and Floppy ports. Also there are no longer any emulated devices.

Gen2 machines now fully support UEFI rather than the traditional BIOS – you can see on the Gen1 settings on the left you have the usual ‘BIOS’ options and on the Gen2 you have ‘Firmware’. With UEFI secure boot has been enabled by default to protect your VMs during the boot process.

One thing that will please a huge number of Hyper-v users will be the ability to do full PXE booting – you no longer need to use the emulated network adaptor (emulated network no longer exists) you have the full network bandwidth.


As mentioned above, Hyper-v Gen2 machines no longer need emulated devices. You can see this below with the device manager. Again Gen1 is on the left with Gen2 on the right. The Gen1 clearly shows the emulated devices under the PCI to ISA bridge (Microsoft used the ISA bridge to prevent the need to consider Plug n Play).  With the Gen2 device manager you can see all the devices are running through the native VM Bus.


Finally one feature that I have been waiting for since working with Hyper-v although very trivial is copy and paste. Hyper-v will now allow you to copy and paste text and even files both ways between VMs (just like with RDP). Sound is also now available within the VM – play a video in the VM and hear the sound on the local machine.

As always though there are some gotta’s with this new technology. You must be running at least Windows Server 2012 or Windows 8 x64 operating systems and once you have made the decision on the generation of VM you want to use you can’t change it.

Due to some of these limitations Microsoft have stated they are aware people will need Generation1 VMs for quite some time so these traditional virtual machines you are use to and all the settings that go along with them are not going away anytime soon. Having said that if you are using Windows Server 2012 (R2) or Windows 8 (.1) Generation 2 is worth a look.


Hyper-V Management Pack Extensions 2012

Although the Hyper-v 2012 management pack available for SCOM 2012 is very good at monitoring Hyper-v ( people over at CodePlex (a site dedicated to open projects you can participate in) have released another management pack with some additional features.

Some of these additional features are:

    • VMs Integration Services Version monitor
    • Hyper-V Replica Health Monitoring Dashboard and States
    • SMB Shares I/O latency monitor
    • Hyper-V Hypervisor Logical processor monitoring
    • Hyper-V Hypervisor Virtual processor monitoring
    • Hyper-V Dynamic Memory monitoring
    • Hyper-V Virtual Networks monitoring
    • NUMA remote pages monitoring
    • SLAT enabled processor detection
    • Hyper-V VHDs monitoring
    • Physical and Logical Disk monitoring
    • Host Available Memory monitoring
    • Stopped and Failed VMs monitoring
    • Failed Live Migrations monitoring

Find the management pack here >>

As usual with this type of software – you should test it fully before being used in a production environment.

Microsoft Announced Windows Server 2012

No great surprises really but at TechEd North America Microsoft has announced that System Centre R2 and Windows Server 2012 R2 will be made available.

When Windows Server 2012 RTM was introduced, Microsoft announced it as their ‘Private Cloud’ operating system. With Windows Server 2012 R2 they have started to introduce more of a ‘hybrid cloud’ feel making it much easier to migrate from on premise to off premise and into, surprise, surprise Windows Azure.

What’s new or improved!?

This is just an overview of some of the new or improved features:


Hyper-v Network Virtualization:


With Windows Server 2012 Microsoft addressed a long outstanding problem – NIC teaming. Until 2012 RTM Microsoft did not support any kind of 3rd party NIC teaming so instead they built their own. It had some great features (have a look here for a full list) and has been heavily used by Windows Server 2012 customers. R2 brings new functionality such as “Flowlets” (Microsoft’s name for it) – traffic is now spread evenly over all NICs in the team.

Extended ACLs

Windows Server 2012 RTM featured the ability to block or allow traffic based on the source and destination VM. In 2012 R2 you will be able to take this a step further and block or allow traffic based on the actual workload. This works by having the ability to perform stateful packet inspection on the fly. The traffic can now be accessed on network address, protocol or even port.

Network Virtualization

There have been great improvements in the network virtualization capabilities within 2012 R2. Windows Server 2012 was really built (and marketed) for Private Cloud, with R2 there is much more focus on service providers and making it easier for them to host multiple tenants. The advances in network virtualization really prove this. I’ll look more at what has been done here in another post as there is so much.

One big problem with 2012 was how to break out of your virtualized network and into the ‘real world’. For network virtualization Microsoft opted to use the NVGRE protocol which needed an expensive gateway device – this is now built in and part of 2012 R2 you deploy your own gateway device onto Hyper-v! This will also support site to site VPN access to allow you to get your internal network talking to your service provider hosted VMs.


Improvements in Storage Spaces

For a while now Microsoft has been trying to provide a way for people to move away from large & usually very expensive SAN devices (although SANa are fully supported with features such as trim and ODX), an example is Microsoft Exchange – Its been encouraged for a while not to use a SAN and instead use DAS and DAGs for your mailbox storage. Storage spaces are another example of this. A good definition of a storage space is that it’s just like – well a SAN. In the background you have your disks (something I found interesting was that 15k SAS disks are generally 5x as expensive as 7.5k disks but only have 2x the IOPS – in other words use SSD for performance and 7.5k disks for capacity). In the foreground you have your Windows fileserver with storage spaces to carve up the disks, perform the management, provide the ability to set redundancy options such as RAID levels.

A traditional SAN storage device

A traditional SAN

A Windows Server 2012 (R2) file server with spaces


Of course with R2 there are a lot of new features such as:

    • Storage Tiring (New feature) – Allows you to use traditional HDD’s and SSD which allows high priority files to use the faster SSD while less important files can use the traditional HHD.

    • Data duplication (enhanced) – allows for online data duplication even when VMs are running.

    • Persistent write-back cache (new feature)

    • SMB Copy Offload (new feature)

    • Snapshots of the space


    Improvements in Hyper-v Replica –

    Hyper-v replica was a hugely popular feature of Windows Server 2012 Hyper-v 3.0. Some of the competitors in the virtualisation market aka VMware have allowed for replication of VMs to another site for DR for a while using products such as SRM but this is very expensive and complicated to setup. Hyper-v in 2012 had this built inbox – for FREE!

    Microsoft have improved Hyper-v replica in R2 as you would expect. You can now perform synchronization every 15 minutes, 5 minutes or even every 30 seconds. This means if you lost your primary site you would only be 30 seconds behind! Loosing 30 seconds of data would be more acceptable for many businesses especially businesses that have yet to make this jump are are still doing the old fashioned tape backups each evening – yes there are still some out there!

    Another new feature of R2 is that you can extend the replication to a tertiary site. This will be useful if you want another backup of your data ‘just in case’ but is aimed more towards service provides who offer a service for a customer to replicate to The service provider can then they can then backup your data to their DR site too.


    Server 2012 R2 offers some fantastic new features and really builds upon 2012 which was already a great server operating system. This new release is aimed to get service provides on board and allows you to really work towards the Microsoft vision of the cloud – that involves your provide cloud, the service providers and its Azure service.

    Change the VMSwitch of all VMs on a host.

    I had a requirement today to change the VMSwitch associated to all the VMs on my Hyper-v host. Obviously if you had time on your hands an really wanted to you can go through and change each one individually with the mouse but far more efficient would be to use PowerShell!

    I started off with a:

    Get-VM | Connect-VirtualNetworkAdapter –SwitchName “MySwitchName”

    This won’t work though as you can see here the -VMName does not accept a piped input.

    All you need to do though is just use a wildcard (*) for the VMName instead:

    Connect-VirtualNetworkAdapter –SwitchName “MySwitchName” -VMName *

    And instantly all your VMs will be on the new adaptor.

    The Power of PowerShell 😀

    Hyper-V Replica Capacity Planner

    Windows Server 2012 introduced a new feature for  Hyper-v  – the Hyper-v replica. As discussed here Hyper-v replica allows you to replicate virtual machines to a secondary or offsite data centre to allow for easy disaster recovery.

    Microsoft have now released a capacity planner which will be useful especially if you are working with a third party so you can keep costs for offsite hardware to a minimum.

    You can download the capacity planner for here >>

    Error (0x0107, 0x0000) when trying to view a VM Console

    I wanted to create a quick post about this just in case anyone else  ever has a  (0x0107, 0x0000) message when trying to view a VMs console session using VMM 2012.


    This happens when you have a untrusted Hyper-V host in VMM 2012 such as a machine sitting in your DMZ (perimeter host). You will be able to see the Hyper-V host, the VMs and manage the VM properties but not connect to the console.  When you try to connect to the VM you will be asked to authenticate against the host and then you will see a warning about an un trusted certificate and once you click OK you will receive the (0x0107, 0x0000) message.


    To resolve this issue you need to import the certificate from the Hyper-V host onto the machine where you are running the VMM console.

    Logon to your Hyper-V Server and create a new MMC Console. Select the Certificates Snap-In to add use the ‘Services Account’


    Locate the ‘Windows Remote Management (WS-Management)’ service account and complete the wizard with the rest of the defaults.



    If like me your Hyper-V host is running Windows Serer Core mode instead of using certutil.exe you can use a snap-in on another machine (you will be asked to authenticate against) to remotely manage your certificates.

    Once you have the console setup you need to find your server certificate which will be located under ‘WinRM\Trusted Root Certificate Authorities’. Right click on the certificate and follow the export wizard.


    On your VMM console machine you need to import the certificate you have just exported into the ‘Trusted Root Certificate Authorities’ of the computer account.


    You should now be able to connect to the console of the VM. You will still need to enter your authentication details but you won’t be presented with the certificate warning.

    Hyper-V & SMB Direct (RDMA)

    Windows Server 2012 brings an update to SMB which has so many new features in it Microsoft have bump it up an entire version and call it SMB 3.0. Many of the new features included in are there to directly improve your experience with Hyper-V.

    Hyper-V now supports your using SMB storage for your virtual machines which opens up whole new possibility for deployment scenarios, which will benefit not only large corporates but will also make highly available virtual infrastructures available for the smaller customer without the costs of dedicated SANs and complexity of fibre and iSCSI LUNs.

    One of these new SMB 3.0 features is SMB Direct which makes use of RDMA (Remote Direct Memory Access). RDMA  allows for computers on the network to send and receive data without having to use processor time, interrupt the OS or cache. This obviously aids with VM density – you will be able to have more VMs on your host machine as the processor won’t be so tied up with network operations but also allows for data transfer with very high throughput with ultra low latency.

    RDMA works by using a protocol on the NIC (you need to make sure you purchase an RDMA NIC – both servers will need an RDMA compatible NIC) if this hardware is in place is makes it possible for one computer to directly read data and write data to another computers memory.

    As mentioned above you need to have the correct hardware in place and that involves having the right NIC which re sometimes known as R-NIC. There are currently three different types available from various different manufacturers. The three types are: iWARP, RoCE an Infiniband.

    Setting up your server infrastructure to support this could not be simpler – you don’t need to do anything! When two computers start to talk they make a standard connection via TCP, once the connection is established they share information about what they are capable of doing (data transfer also beings at the same time so there is no overhead or latency) once both computers have decided they are both capable of running SMB 3.0 and have RDMA capable hardware they will seamlessly switch.

    Using some of the new NICs that are available from vendors such as Mellanox (the ConnectX-3) you are able to get incredible speeds up to 56Gb/s!!! when using Infiniband. These are some amazing speeds but when you start to pair this with SMB 3.0’s new multi channel feature and Windows Server 2012 network teaming capabilities the speeds possible really are incredible. Jose Barreto who works on the file server team at Microsoft has a blog post on how to configure the Mellanox.

    Microsoft presented some stats on how using SMB data storage with RDMA performs which are defiantly worth having a look at.

    I would be very interested to hear from people who have started to play with technology and see how you are finding it in a real world environment.

    RDMA compatible NICs are defiantly something to add to your shopping list next time you are purchasing server infrastructure.