Tag: Hyper-V 2012

Last updated by at .

VM Network Adapter

PowerShell One-liner to list IP Addresses of Hyper-V Virtual Machines

Here a very quick PowerShell command to list all the Virtual Network Adapters, including IP Addresses of Virtual Machines running on a Hyper-V Host.

This will give you a list of all Virtual Machines running on Hyper-V Server called “HyperV01”



Windows Server 2012 Hyper-V: Smart Paging

Windows Server 2012 RC Logo

If you have installed the Windows Server 8 Beta or the Windows Server 2012 Release Candidate and have tested the new version of Hyper-V, you may have seen a new feature in the Hyper-V Manager Console called Smart Paging.

What is Smart Paging and what does it do. To understand what Smart Paging is we have to go back in time, to the release of Service Pack 1 for Windows Server 2008 R2 or Hyper-V Server 2008 R2. In Service Pack 1 Microsoft added a new feature to Hyper-V called Dynamic Memory. Dynamic Memory allows to dynamically add and remove virtual memory from a Virtual Machine depending on memory demand of the VM. You can set the start up memory and the maximum memory

Hyper-V Dynamic Memory

Now in Windows Server 2012 Hyper-V Microsoft improved the Dynamic Memory feature and also added a third option the minimum memory.

  • Startup RAM – Memory during the startup process until the Dynamic Memory driver is started.
  • Minimum RAM – the minimum of RAM a VM can get.
  • Maximum RAM – the maximum of RAM a VM can get.

For example the VM needs 1GB of RAM to start all service properly, and after the start the memory demand can go down to 512MB you would set the Startup RAM to 1GB and the Minimum RAM to 512MB.

Hyper-V Smart Paging

Now with the new Minimum RAM setting there is a new problem, if the VM is running with a minimum of RAM and for example 512MB and all other memory resources of the host are used by other Virtual Machines and you restart the VM, the VM can maybe not get the full 1GB of startup memory. In this case, and this is the only case, Smart Paging is used to allocate the additional 512MB of RAM in a page file outside the Virtual Machine so all services can start properly.

 

 



Interview about new Windows Server 2012 Hyper-V Features

Windows Server 2012 RC Logo

Last week I met with Carsten Rachfahl who is a MVP for Virtual Machine and the owner of hyper-v-server.de. Carsten was visiting Switzerland and he also took the time to do some interviews and I had the chance to speak with him.

In the interview (in german) we talked about the new release of Hyper-V which is included in Windows Server 2012.

  • 01:55 – Hyper-V Replica
  • 03:10 – Hyper-V Design
  • 03:35 – SMB for Hyper-V
  • 05:50 – Hyper-V Converged Fabric
  • 07:41 – Shared Nothing Live Migration
  • 09:40 – Hyper-V for Hoster
  • 11:04 – CSV Cache
  • 12:28 – Hyper-V Converged Fabric
  • 13:45 – Hyper-V and PowerShell

You can watch the interview in better resolution on it-cast.de.

If you are interested in my sessions about Hyper-V 2012 and other great Private Cloud session covering Windows Server 2012 and System Center 2012 checkout the Geekmania 2012 website.



Hyper-V Replica – The Game Changer

Windows Server 2012 RC Logo

In Windows Server 2012 Microsoft introduced a new feature called Hyper-V Replica. In my opinion Hyper-V Replica is a true Game Changer, something like the forward pass in football or the slam dunk in basketball. In my interview with Carsten Rachfahl from hyper-v-server.de I mentioned that I think a lot of customer will choose Hyper-V Replica as Disaster Recovery solution.

What is Hyper-V Replica and how does it work?

What is Hyper-V Replica and how does it work. With Hyper-V Replica it is possible to replicate Hyper-V Virtual Machines from a Hyper-V host to another Hyper-V host or cluster. The great thing about it is that Hyper-V Replica is optimized for replication over WAN. This allows companies to replica Virtual Machines from a primary site to a secondary site, and in case of a disaster on the primary site, Virtual Machines can be failed over to the secondary site.

Hyper-V Replica

The replication is done per virtual machine, so you can also replicate VMs to two or more different locations.

Hyper-V Replica is an asynchronous replication, Hyper-V Replica will do a initial replication of the Virtual Machine and after that changes will be replicated every 5 to 10 minutes.

How to enable Hyper-V Replica on a single host

To allow the Hyper-V host to send and receive virtual machine replications you have to enable the Hyper-V Replica feature and configure the Windows Firewall. Hyper-V Replica can be enabled via Hyper-V Manager in the Hyper-V settings. You can setup different replication settings such as which hosts can replicate to this server or which port is used for the replication and whether HTTP or HTTPS should be used.

Enable Hyper-V Replica

After you have enabled Hyper-V Replica you have to open the Windows Firewall ports for Hyper-V Replica. You can simply enable the rules in the Windows Firewall settings.

Hyper-V Replica Windows Firewall

You can also enable this firewall rules via Windows PowerShell.

How to enable Hyper-V Replica on a Hyper-V Cluster

To allow the Hyper-V Cluster to send and receive virtual machine replications you have to enable the Hyper-V Replica Broker role in the Hyper-V Cluster and configure the Windows Firewall on each host. The Hyper-V Replica Broker role enables the failover cluster to participate in virtual machine replication with Hyper-V Replica. You cannot replicate to a single host which is used in a cluster, you can only replicate to the Hyper-V Replica Broker.

First the Hyper-V Replica Broker cluster role has to be added.

Enable Hyper-V Replica Broker roleThe Hyper-V Replica Broker needs a own IP in the same subnet as the cluster. The Name of the Replica Broker role will be used as target to replicate virtual machines.

Hyper-V Replica Broker role

This can of course also be done via Windows PowerShell.

After you have added the Hyper-V Replica Broker role in the Cluster you have to enable Hyper-V Replica and set it up like the standalone Hyper-V host.

Hyper-V Replica Broker Cluster role

Hyper-V Replica Broker Cluster role settings

After you have configured the Hyper-V Replica Broker settings you also have to enable the Windows Firewall rules. This Windows PowerShell command will help you to configure the Firewall rule on every node in the cluster.

How to enable virtual machine replication

After you have enabled Hyper-V Replica on the source Hyper-V host/cluster and destination Hyper-V host/cluster you can setup the virtual machine to replicate. Right click the virtual machine and “Enable Replication”.

Enable Hyper-V Virtual Machine Replication

Specify the Replica server name to use to replicate the virtual machine. If the Replica server is on a failover cluster, specify the name of the Hyper-V Replica Broker as the Replica server.

Enable Hyper-V Virtual Machine Replication Destination

You can specify the connection parameters and set up compression for the transmitted data.

Hyper-V Replica Connection Parameters You can choose which VHDs of the virtual machine should be replicated to the destination.

Hyper-V Replica VHDConfigure the Recovery History, this allows you to choose from different recovery points when you start a failover.

Hyper-V Replica recovery pointsConfigure the Initial Replication Method. You could also move the initial replication copy via external hard drive to the destination.

Hyper-V Replica initial replicationAfter you have started the replication, Hyper-V Replica will start with the initial replication of the virtual machine, and the virtual machine will also be visible on the destination Replica server.

Hyper-V Replica sending initial replication

To do this via Windows PowerShell you could use the following commands

 

Check Replication State and Replication Health

To check the Replication State and the Replication Health you have a variety of options.

First in the Hyper-V Manager you can see the Replication State of the virtual machine.

Hyper-V Replica replication state and healt Hyper-V Manager

You can also right click on the virtual machine and view the replication health, state and other interesting information.

Hyper-V Replica replication state and healt VM

You can also use Windows PowerShell to get information about the virtual machine replication state and health.

Hyper-V Replica replication state and healt PowerShell

Failover Options

Now after the replication is setup you have different failover options for the virtual machine. This options allow you to do different failover scenarios.

  • Planned Failover
  • Test Failover
  • Failover

Planned Failover

Hyper-V Replica Planned Failover

A Planned Failover is a solution if both sites are still available it is also possible to migrate the virtual machine from on datacenter to another datacenter. A planned failover basically shuts down the source virtual machines, replicates all the latest changes and after all changes are replicated to the recovery site the virtual machines on the recovery site will start with no loss of data.

The primary server will automatic change to the Replica server and the Replica server will change to the primary server.

Test Failover

If you want to test the virtual machine on the recovery site you can use this feature. This will create a copy of the virtual machine on the recovery site which can be used for testing without interrupting the replication. You can also set the copy of the virtual machine to connect to another virtual switch or to be not connected so no IP address conflict will happen.

Hyper-V Replica Test Failover

Failover

Hyper-V Replica Failover Recovery Point

The Failover option will be used on the recovery site during a disaster where the primary site is down. This will start the virtual machine on the recovery site and the administrator will have to choose the latest recovery point. Data between the disaster recovery and the latest recovery point will be lost.

Hyper-V Replica Failover via PowerShell

 

There is also a possibility to inject another IP address configuration on the recovery site.

Hyper-V Replica inject Failover IP Address

After you have selected a Recovery Point for the Failover, the other Recovery points are still available as snapshots for this Virtual Machine. if the first Recovery Point is not working correctly you can choose another Recovery Point.

Hyper-V Replica Failover

 

Failback

Now a lot of disaster recovery solutions are easy to failover but how can you to a failback of your workload? In Hyper-V replica this is pretty easy. After a unplanned Failover the primary server is still the same and the virtual machine is now running on the recovery server. Now to failback a virtual machine with the latest data you reverse the replication so the primary server changes to the recovery server and the recovery server where the virtual machine is running after the failover will be the primary server. Now the virtual machine will be replicated in in the other way. To do failback of the virtual machine back without losing data you can now do a planned failover.

Hyper-V Replica Reverse Replication

 

Conclusion

I hope this post shows you how great Hyper-V Replica is and how easy to setup it is. If you have any question about Hyper-V Replica you should check out Microsoft TechNet or use the comment function on this post.



Hyper-V vs. VMware vSphere – Storage

Windows Server 2012 RC Logo

This is another post in my series about Hyper-V vs. VMware.

This time it is about storage in terms of virtualization. And as you could read everywhere, Microsoft did also a lot of improvements for the Windows Server 2012 release.

  • New Virtual Disk format (VHDX) – Supports up to 64 TB Virtual Hard Disks
  • Offloaded Data Transfer (ODX) – Offloads storage-intensive tasks to the SAN
  • Data De-duplication
  • Storage Spaces and Storage Pools – Data Advanced Storage Array Features to Windows Server
  • Virtual Machine boot from SAN
  • Live merging of VHDs and Virtual Machine Snapshots
  • Native 4K Disk Support – Take advantage of enhanced density and reliability
  • Virtual Fiber Channel – Connect a Virtual Machine directly to a Fiber Channel SAN
  • Support for File based Storage with SMB 3.0
  • New file system (ReFS)
  • BitLocker encryption support – BitLocker is now available for Cluster Shared Volumes to support encryption in cluster environments

 

CapabilityWindows Server 2012 RC Hyper-VVMware vSphere HypervisorVMware vSphere 5.0 Enterprise Plus
Virtual Fiber ChannelYesYesYes
3rd Party Multipathing (MPIO)YesNoYes (VAMP)
Native 4-KB Disk SupportYesNoNo
Maximum Virtual Disk Size64TB VHDX2TB VMDK2TB VMDK
Maximum Pass Through Disk SizeVariable64TB64TB
Offloaded Data TransferYesNoYes (VAAI)
Storage EncryptionYesNoNo

 

  • The maximum size of a physical disk in attached to a Hyper-V virtual machine is determined by the guest operating system and the chosen file system within the guest
  • vStorage API for Multipathing (VAMP) is only available in Enterprise & Enterprise Plus editions of vSphere 5.0
  • vStorage API for Array Integration (VAAI) is only available in Enterprise & Enterprise Plus editions of vSphere 5.0
  • VMware documentation does not suggests that their respective platforms support 4K Advanced Format Drives

Sources:

Check out my Blog post Hyper-V 2012 – Hey I Just Met You And This Is Crazy for more information about the latest version of Hyper-V.



Hyper-V 2012 – Hey I Just Met You And This Is Crazy

Windows Server 2012 RC Logo

Okay I admit it, the title is more a reference to a song than a true fact, because my first contact with the latest Hyper-V release was last September.

Last September Microsoft showed the newest release of Hyper-V at the build conference. Back then I wrote a blog post about the new version of Microsoft Hypervisor Hyper-V called “Hyper-V: Version 3 kills them all“.

Now Microsoft released the Windows Server 2012 and Microsoft Hyper-V 2012 Release Candidate last week. They made a lot of changes since September 2011 and I tried to show this in another blog post (What’s new in Windows Server 2012 Release Candidate Hyper-V: Scale). With these changes I decided to upgrade my blog post from September 2011 with the latest changes made with Windows Server 2012 Release Candidate.

Windows Server 2012 the Cloud OS

Windows Server 2012 Management

First let’s start with Windows Server 2012 as the base of Microsoft cloud strategy. Windows Server 2012 is probably the most significant release of the Windows Server platform ever. Microsoft’s focus in Windows Server 2012 was to make it easy for all to build public, private or hybrid cloud solutions. Microsoft has used the experience and learning from their own Cloud services like Hotmail, Messenger, Office 365, Bing, Windows Azure, and Xbox Live. There are a lot of improvements to manageability, security, scalability, extensibility, predictability and reliability which will also improve the possibilities with Hyper-V. The Power of Many, The Simplicity of One – In technical terms Microsoft made a lot of improvements how you can manage a lot of servers and services, Storage, Networking and PowerShell. Of course there is a lot more, but this are the parts I think are the most important. And here are some keywords to the improvements in Windows Server 2012:

  • Storage improvements – SMB 3.0, SMB transparent Failover, data de-duplication, Storage Spaces, online filesystem repairs, 64TB NTFS volumes, ReFS volumes, etc.
  • NIC Teaming
  • NIC Naming and CDN (consistent device naming)
  • PowerShell v3 – You can now just do everything in PowerShell and even more with 23000 PowerShell cmdlets.
  • Server Dashboard – The new Dashboard lets you manage all servers, or even better, all Services from one place.
  • Multi-tenant – everything seems to be made for that
  • Performance Counters
  • IP address management (IPAM)

Hyper-V Host improvements

Windows Server 2012 Hyper-V Manager

The Hyper-V Host gets a lot of improvements in terms of features and scale.

  • up to 320 logical CPUs
  • supports up to 4 TB RAM
  • no more vCPU:pCPU ration limit
  • up to 2048 Virtual CPUs per Virtual Machine

Hyper-V Virtual Machine improvements

Windows Server 2012 Hyper-V Virtual Machine

Microsoft did a lot to extend the existing Virtual Machine hardware to support even high workload Virtual Machines. Most of the time you were talking with VMware consultants, they tried to say that Hyper-V is not made for Enterprise workloads. Now with the release of Hyper-V 2012 scale should not be an argument anymore.

Hyper-V Networking improvements

Windows Server 2012 Hyper-V Networking

Hyper-V got a lot of improvements in terms of networking. Microsoft realized that networking features are really important if you start to create private and public cloud scenarios and now even create a mix of public and private cloud scenarios without creating a lot of work for the IT teams to reconfigure Virtual Machines.

  • QoS and flexible bandwidth allocation
  • Single-root I/O virtualization or SR-IOV (Direct Access to the physical Network adapter)
  • Network Virtualization
  • PVLAN support
  • Dynamic Virtual Machine Queue (D-VMQ)
  • Receive Side Coalescing (RSC)
  • DHCP Guard
  • Router Guard
  • Port mirroring
  • Port ACLs
  • Trunk mode Allows directing traffic from a group of VLANs to a specific VM
  • IPsec Task offload
  • Integrated Network Adapter Teaming
  • Better Network Adapter Naming and Consistent Network Device Naming
  • Hyper-V Extensible Switch (for example Cisco Nexus 1000v)
  • Data Center Bridging (DCB) – eliminates loss due to queue overflow and to be able to allocate bandwidth on links
  • Network Metering

Hyper-V Clustering improvements

Hyper-V gets also a lot of Cluster improvements. Microsoft is working on Cloud solutions which will give great availability to low cost. For example Hyper-V Replica or Shared-Nothing Live Migration, which allows you to move a Virtual Machine from one Hyper-V host to another host over the Ethernet without the need for a shared storage or a Cluster.

  • supporting up to 4000 VMs per cluster
  • supporting up to 64 Cluster nodes
  • improved Cluster Manager Console
  • Application Monitoring – Application health detection inside the virtual machine
  • New Placement policies – Virtual Machine Priority and enhanced placement
  • Storage Live Migration
  • VM Failover Prioritization
  • Cluster Wide Task Scheduling
  • Hyper-V Replica supporting clustering – replicate a Virtual Machine from one Cluster to another Cluster or Standalone Hyper-V Host
  • No need for Block Storage – you can use SMB Shares
  • Support for Storage Spaces
  • Automated Node Draining – like Maintenance mode in SCVMM
  • Cluster Aware Updating (CAU)
  • Cluster Shared Volume Improvements – BitLocker support, a lot of performance improvements, Self-Healing
  • CSV Block Cache
  • CSV 2.0 (No Redirected I/O for Backup
  • CSV 2.0 Block Level I/O redirection
  • CSV enabled volumes now appear as “CSVFS”
  • No Active Directory dependencies
  • Live Migration Queuing
  • Migrate multiple Virtual Machine at the same time
  • Anti-Affinity VM Rules
  • Dynamic Quorum
  • Guest Clustering via ISCSI, SMB or Fibre Channel

Hyper-V Storage improvements

VHDX

A I mentioned earlier Microsoft made a lot of improvements in terms of storage in Windows Server 2012 and Hyper-V can take advantage of those which are quiet impressive. For example with the new features in SMB 3.0 you can now use SMB file shares to store your Virtual Machines.

  • New Virtual Disk format (VHDX supports up to 64 TB Virtual Disks)
  • Offloaded Data Transfer – ODX (Open Diagnostic Data Exchange)
  • Live merging of VHDs and Snapshots
  • RDMA
  • SMB 3.0 – Transparent Failover
  • SMB 3.0 Direct
  • SMB 3.0 Multichannel
  • Native 4 KB sector disks support
  • Data De-duplication
  • Virtual Fibre Channel inside the Virtual Machines
  • VM boot from SAN
  • Storage Spaces (Pool Disks or LUNs)
  • New File system ReFS

Hyper-V Management Improvements

Hyper-V Powershell

As everywhere in Windows Server 2012 PowerShell is the key. And the new Server Manager Dashboard Microsoft enables to create Server Groups to manage multiple servers from a single console.

  • PowerShell cmdlets for Hyper-V
  • PowerShell Workflows – commands and tasks across servers
  • Hyper-V Extensible Switch – lets vendors to create “plugins”.
  • Server Manager Dashboard – lets you manage multiple Hyper-V hosts from a single console.
  • System Center Virtual Machine Manager 2012 SP1 – not a part of Windows Server 2012 but will add great management solutions.
  • Improved VM Import
  • Local Hyper-V Administrator Group
  • Client Hyper-V

Hyper-V Live Migration and Disaster Recovery

Windows Server 2012 Hyper-V Replica

Now I think this is maybe the greatest new feature. You can migrate Virtual Machines from one Hyper-V Host to another without Shared Storage or Cluster configuration. This feature is called Shared-Nothing Live Migration. Microsoft also included a new feature called Hyper-V Replica which includes the option to replicate Virtual Machine to another host which can be hosted in the same datacenter, secondary datacenter or even in the cloud.

  • Improved Live Migration
  • Unlimited Simultaneous live migrations
  • Live Storage Migration
  • Shared-Nothing Live Migration – Live Migration to another Hosts (Not clustered) over Ethernet
  • Hyper-V Replica – Replicated Virtual Machines to another Hyper-V host on-premise or public cloud over LAN or WAN connections.

You can get more information and the download link about Windows Server 2012 Release Candidate and Hyper-V Server 2012 Release Candidate.

The Windows Server Team and especially the Hyper-V Team did a great job, and I am sure Hyper-V will gain significant market share in the future.



Windows Server 2012 Release Candidate downloads and links

Windows Server 2012 RC Logo

This is a quick list of all the downloads Microsoft made available with the release of the Windows 8 Release Preview and Windows Server 2012 Release Candidate.

Downloads:

Useful links:

Hyper-V links:

You should also checkout my blog posts about Windows Sever 2012 and Hyper-V.