MVP Carsten Rachfahl Interviews Me About My Favorites Hyper-V Features In Windows Server vNext #HyperV #MVPbuzz

CNemnomInterview_2014_01

While at the MVP Global Summit 2014 in Redmond, my fellow Hyper-V MVP Carsten Rachfahl interviews me to talk about my favorites Hyper-V features in Windows Server vNext and some of the new cool features.

Enjoy a sneak peak of what’s coming Winking smile

CNemnomInterview_2014_02

Cheers,
-Chabel

Posted in Hyper-V, Video Tagged with: , , , , ,

How To Automatic Activate Windows Server 2012 R2 Virtual Machines via PowerShell? #HyperV #PowerShell

Hello folks,

Automatic Virtual Machine Activation! is pretty cool feature…

Automatic Virtual Machine Activation (AVMA) is a feature that was introduced in Windows Server 2012 R2. AVMA binds the virtual machine activation to the licensed virtualization server and activates the virtual machine when it starts up. This eliminates the need to enter licensing information and activate each virtual machine individually.

Requirements:
In order to get benefits of this feature, AVMA requires that the host is running Windows Server 2012 R2 Datacenter and that the guest virtual machine OS is either Windows Server 2012 R2 Datacenter, Windows Server 2012 R2 Standard or Windows Server 2012 R2 Essentials.

How to:
This is a one step process. Once the Hyper-V host (Windows Server 2012 R2 Datacenter) is activated and guest virtual machines are running smoothly (without activation of course!), the only remaining step is to install the AVMA client key on the guest virtual machines (Data Center, Standard or Essentials). To manually install the key using Command line use the following Syntax from an administrative Command prompt inside the guest OS:

C:\>slmgr.vbs /ipk AVMA Key

Where the generic AVMA Key is selected according to the Guest OS Edition, more information here.

Auto-AVMA01

Note:
The whole activation process does not require any network connection of any sort between the Hyper-V host and the guest OS.

This is how the manual approach to activate Windows Server 2012 R2 VM.

Scenario:
You have deployed several virtual machines from a template without SCVMM or deployment tool such as MDT where you can inject above process during the deployment, and now you want to activate all VMs.

Of course you could use the manual approach above, but the easiest way is to use PowerShell, I have created a small script that takes care of all the steps for you:

Here we go:

First we need to check what is the License Status of all Virtual Machines? you can run the following cmdlet to get all VMs on a single host:


Auto-AVMA02              

We found out that all virtual machines are not activated yet!

So let’s activate them automatically using PowerShell combined with Hyper-V Guest Services feature Winking smile

Finally, let’s check again what is the License Status of all Virtual Machines.

Auto-AVMA03

Sure enough there are different ways to accomplish the same result, but nevertheless it has worked for me and I feel that it’s a much easier than having to activate each VM manually.

Enjoy your day!

Cheers,
-Charbel

Posted in Hyper-V, PowerShell Tagged with: , , ,

Getting Started With Savision’s Cloud Reporter #SysCtr #Savision #SCOM #SCVMM #HyperV

Hello folks,

If you are building a private cloud solution, you understand that capacity planning, and virtual machine right-sizing requires an approach that takes advantage of the opportunities and features offered by the virtualization layer which is of course Hyper-V Winking smile.

One of the concerns I always face is the increase of virtual machine density, prevent overcommitting resources, and tuning the environment to build a tailored virtualized infrastructure for your business’ needs that will stand long enough. How do you know you have realized all the possible costs saving available to you? and how can you proactively budget for and acquire new cloud hardware before running out of resources?  

Get predictive capacity planning, and virtual machine right-sizing for your Private Cloud deployment.

The answer is Cloud Reporter, as an automated solution for infrastructure reviews, I definitely recommend Savision Cloud Reporter which analyzes historical data collected and stored by System Center Operations Manager to predict capacity issues on your Hyper-V environment, it does so by integrating with Operations Manager. Additionally, Cloud Reporter provides scenario based reports that allows you to identify opportunities to make better use of your existing resources, especially if you are constantly provisioning, deleting and adding new Virtual Machines. Cloud Reporter can keep track and warning you of capacity issues.

SavisionCloudReporter-01

Cloud Reporter is also capable of detecting idle Virtual Machines which are turned off in your environment, it can compare advertised allocation requirements for machines to the currently configured requirements. The reports leverage the native features of SQL Server Reporting Services (SSRS).

In this blog post, we will look at the requirements and the installation of Savision Cloud Reporter for System Center.

Cloud Reporter Supported Systems:

- Supported versions of System Center: System Center 2012, 2012 SP1 and 2012 R2.
– Supported versions of Hyper-V server: Windows Server 2008 R2 SP1, 2012 and 2012 R2.

Cloud Reporter Installation:

1. Download Cloud Reporter bits.
2. Save it to a location on the Operations Manager Console machine (i.e. C:\SavisionCloudReporter).
3. For any Hyper-V server that you wish to monitor, you must have have its System Center Operations Manager agent set to “Act as proxy”.

SavisionCloudReporter-02
4. On the Operations Manager Console, logon as OM Admin, and run the Cloud Reporter Installer.

SavisionCloudReporter-03
5. Take a note where the installer places the OM management packs.

SavisionCloudReporter-04
6. Open the Operations Manager Console, and import the relevant management packs for your environment, click on Administration and then click on Management Packs.

SavisionCloudReporter-05
7. Click on Reporting and then Open the “Cloud Reporter License Management”, but do not run it.
8. Enter the license key you have received for Cloud Reporter into the “Insert License Key” field in the report parameters section.
9. Now click “Run” the report.
10. You may now start exploring the reports, but It may take several days for a sufficient quantity of data to be collected so that all fields in the reports are populated accordingly. The recommendation is to wait 7 days before start getting accurate data.

Hope this post helps you to get started with Cloud Reporter!

In the upcoming posts we will start exploring various reports.

Until then… enjoy your day!

Cheers,
-Charbel

Posted in Operations Manager, Savision, System Center, System Center 2012 R2 Tagged with: , , , , , , , ,

How to Deploy Websense In Stand-alone Mode on a Hyper-V Virtual Machine? #HyperV #Websense

Hello folks,

Since the initial release of Hyper-V back in 2008, my hope was to move all the physical workloads to Hyper-V, however one of the role that was impossible to move is Websense Web Security!

Websense Web Filter and Security blocks web threats to reduce malware infections, decrease help desk incidents and free up valuable IT resources. More information on Websense.

I had several conversation with Websense and Microsoft folks since then, and all the feedbacks came negative Sad smile

So what is the reason that Websense cannot run on Hyper-V virtual machine?

Websense feedback was that Hyper-V server does not allow setting a virtual NIC (vNIC) to promiscuous mode, Websense does not certify and support the platform. Websense Network Agent requires a NIC set to promiscuous/stealth mode. As Microsoft does not intend to support this feature, Network Agent cannot successfully monitor traffic from other systems on its monitoring NIC.

If Websense is working with an integration mode other than Network Agent (Standalone mode), where port spanning is not necessary, then Hyper-V is a viable platform. The integration mode like Threat Management Gateway (TMG). While TMG has been officially deprecated by Microsoft, and it is still supported until April of 2020.

The high level architecture of standalone mode deployment in the physical world is showing in below figure:

HV-Websense02

Microsoft feedback was, Hyper-V virtual switch does not offer promiscuous mode on its virtual interfaces.

In short, promiscuous mode allows a network device to intercept and read each network packet that arrives in its entirety. The most typical use cases include network intrusion detection systems (NIDS), monitoring tools such as (Wireshark, Microsoft Message Analyzer, etc.), web security tools such as Websense or recording of calls in VOIP-based centers such as MiaRec. This mode of operation is given to a network server that captures and saves all packets for analysis.

The Websense deployment and configuration is already well explained elsewhere, so I’ll keep the basics to Hyper-V here.

VMware does support promiscuous mode, but I believe in Hyper-V Winking smile, so what is the solution?

Microsoft in Windows Server 2012/2012 R2 Hyper-V introduced the concept called (port mirroring) which can be enabled on any virtual machine vNIC adapter. There are quite some official documentation available if you want to setup port monitoring between two or more Virtual Machines.

How does port mirroring work?

Port Mirroring allows you to monitor virtual network traffic from one or many virtual machines (sources) to another virtual machine (destination). Port Mirroring works at the Virtual Switch level and to be precise, it’s the Hyper-V virtual switch extension capabilities that is being used to achieve port mirroring/capturing. The extensible vSwitch by itself uses port ACLs to set a rule that forwards traffic from one vNIC in a VM to another vNIC in another VM.

For example if we need to monitor all traffic sent and received by both VM1 and VM2, you can run the following PowerShell cmdlets where MonitorVM has a network monitoring tool installed i.e. Wireshark in order to capture the traffic.

This is a great feature for internal traffic between VMs on the same physical host, but this does not solve my pain point with Websense, because we need to be able to monitor the traffic from a port on the physical switch to a virtual port (vNIC) inside a VM.

What about external traffic?

Hyper-V does not support to set a “promiscuous mode” flag on a virtual port, as you need to specify if a given port is supposed to be the source or the destination of the network packets.

The interesting part is that the official documentation does not state that you can also capture traffic from an external network or from the host parent partition. Waw this is what is needed in my scenario.

The Hyper-V Extensible Switch and the PowerShell module have the bells and whistles to tackle this problem.

What are the requirements to capture external traffic?

1. Two vNICs To Websense VM (Block NIC and Monitoring NIC).
2. Set the Mirroring mode of Websense VM monitoring vNIC to “Destination“.
3. Enable Microsoft NDIS Capture on the Hyper-V Virtual Switch Extensions where Websense VM is attached to.
4. Set the Mirror mode on the External port of the Hyper-V Virtual Switch where Websense VM is attached to reflect as the “Source“.
5. Configure port mirroring on the physical switch to mirror any traffic on your firewall/router port ==> to the port that Hyper-V server is connected to.

Step 1: Add Two Virtual NICs To Websense VM

HV-Websense03a

Step 2: Set The Mirroring Mode Of  The Monitoring Virtual NIC To “Destination”

HV-Websense03b

The same can be done in Hyper-V Manager

HV-Websense04

Step 3: Enable Microsoft NDIS Capture Extension On The Virtual Switch

  1. Open the Virtual Switch Manager on the Hyper-V Host.
  2. Expand the virtual switch name “Mirroring_VM_vSwitch” and click on “Extensions“.
  3. Enable Microsoft NDIS Capture under Extensions.

HV-Websense05

Step 4: Set The Mirror Mode On The External Port Of The Virtual Switch To “Source”

The Hyper-V PowerShell module includes the following cmdlets (Add-VMSwitchExtensionPortFeature, Get-VMSystemSwitchExtensionPortFeature, Remove-VMSystemSwitchExtensionPortFeature, and Set-VMSystemSwitchExtensionPortFeature) that can be used to manage port monitoring at the host level.

We need to configure the Hyper-V vSwitch name “Mirroring_VM_vSwitch” that any traffic hits the external port “SOURCE”, has to be forwarded to the vNIC “Monitor” that we configured “DESTINATION” on Websense VM.

The following PowerShell cmdlets will help you to set the External vSwitch port to “SOURCE” Mirror mode:

Let’s validate the Monitoring mode is set to “SOURCE” by running the following cmdlet:

HV-Websense09

MonitorMode=2 is “SOURCE“, MonitorMode=1 is “DESTINATION“, and MonitorMode=0 is “NONE

Once your run the above cmdlets on the Hyper-V host, all traffic passing on the external NIC of Mirroring_VM_vSwitch will be “mirrored” to Websense VM which port monitoring mode has been set to destination.

Step 5: Configure Port Mirroring On The Physical Switch

HV-Websense06

In my demo, I am mirroring the traffic to two destination NIC interfaces where the Hyper-V host is connected to, because I am using NIC Teaming on the host and the “Mirroring_VM_vSwitch” is created on top of the team.

As soon as you start mirroring the traffic to the Hyper-V host, you can open Websense VM and observe the received traffic on the mirroring vNIC.

HV-Websense08

Once the above steps are followed, you should be able to start filtering the happy users Smile:

HV-Websense07

What are the best practices?

1. Have a separate dedicated physical NIC or team NICs on the host.
2. Have a separate external vSwitch, because Websense VM will be always available and you don’t want to flood your existing production vSwitch.

Closing thoughts

Keep in mind that all this works within the boundaries of the same physical host. Which means that if you want to move Websense VM across nodes in a cluster or to a different host, you need to configure step 3, 4 and 5 above on each node separately with the same virtual switch name. This means that when Websense VM is live migrated to a second node, it will continue monitoring the traffic. That works!

Happy filtering day!

Cheers,
-Charbel

Posted in Hyper-V, Network Tagged with: , , , ,

Get The List of All VMs in Virtual Machine Manager and Their Virtual Disks #VMM #SCVMM #HyperV #PowerShell

This post was edited/updated on January 9, 2015.

(The update includes a new version of the PowerShell VMM Reporting Script that populate the free disk space for all Virtual Machines VHDs).

In today’s blog post I will show you how to get the list of all Virtual Machines in System Center Virtual Machine Manager including their virtual disks.

If you select any host managed by VMM and you look into one of the VM hardware configuration, you will see a similar figure as below:

Get-SCVMVirtualDisk-01

The most concern hardware configuration is the virtual hard disk of the VM such as type (dynamic, fix or differencing), Maximum disk size, the current disk space used, and the storage location.

The challenging question is, what if you have a large VMM deployment, and you want to track all virtual machines and enumerate their virtual disks?

Unfortunately SCVMM on it’s own doesn’t have any reporting capability to accomplish this task Sad smile

Luckily enough PowerShell will come to the rescue once again Smile

I have created the following tool that will help you to get the list of all VMs in VMM server Or all VMs in a particular VMM Host Group and enumerate all their virtual drives, and then send you a nice formatted email report Winking smile

Get-SCVMVirtualDisk-02

And here you go the report in your inbox.

Get-SCVMVirtualDisk-03

A couple of areas that could definitely be improved though, would have to check the disk space used versus the maximum disk size, and then highlight the virtual disk that reaching its limits, etc…

Do you want additional features? please feel free to leave a comment below:

Enjoy your day!

Cheers,
-Charbel

Posted in PowerShell, System Center, System Center 2012 R2, Virtual Machine Manager Tagged with: , , , , , ,

Time To Say Goodbye 2014! Welcome 2015… #NewYear #HyperV

2014 ends and I am ready for 2015 to start… Thank you for the support and comments through the year!

Wrapping2014

My 2014 was a great year! I will try to summarize it in this blog post.

Kick-off the year by passing the Microsoft® Virtualization exam.

Wrapping2014-0a

The first conference kick-off meeting, I was speaking at the annual SABIS® IT conference for 2 consecutive days with my fellow MVP Romeo Mlinar. The topics covered: Hyper-V deep dive and Microsoft Cloud OS.

Wrapping2014-07

In June, the Hyper-V Server User Group – UAE & Gulf was born, which provides a one-stop center for people to learn about Hyper-V, System Center, and Azure.

Wrapping2014-10

In October, I was awarded with the Microsoft® Most Valuable Professional (MVP) for Hyper-V, which is a great honor. As a First time MVP, I am greatly humbled and gracious for all those in the community that have found my contributions meaningful.

Wrapping2014-01

The fantastic Microsoft MVP Summit in Redmond (Seattle), where MVPs and members of product groups get together for several days. One of the great things is the networking.

Wrapping2014-04

I was speaking at the Microsoft Dubai for the first Microsoft TechDays #1 in the Gulf. The topic covered Hyper-V best practices and top functionalities.

Wrapping2014-05

In November, my first book is reviewed: Hyper-V Best Practices.

Wrapping2014-06b

Some of the work I really enjoyed in 2014, was the building a Microsoft private cloud using the Cloud OS stack on top of HP Blades, 24 Cores, 10Gb, 3PAR storage and 1TB RAM Smile

Wrapping2014-11

Wrapping2014-11a

Last but not least, ending the year by passing the Microsoft® cloud exams.

Wrapping2014-08

As a blogger in the Microsoft virtualization space it was fun Smile. The traffic to my site growth significantly, unfortunately my blog went offline couple of times due to reaching my bandwidth limit, eventually I increased the bandwidth in order to sustain maximum availability as possible.

So let’s start wrapping up 2014.

Where did the readers come from?

Wrapping2014-02

The top 10 countries:

Wrapping2014-03

The concert hall at the Sydney Opera House holds 2,700 people. This blog was viewed about 59,000 times in 2014. If it were a concert at Sydney Opera House, it would take about 22 sold-out performances for that many people to see it.

The busiest day of the year was October 1st with 611 views, and the most popular post was Deploying HP StoreVirtual VSA On Hyper-V 2012 R2 Cluster.

Wrapping2014-09

OK, now what people are reading or more interesting in 2014:

1: Performance Tuning for Virtual Machines
2: Step By Step: Create a Converged Network Fabric in VMM 2012 R2
3: How To Enable and Configure VMQ/dVMQ on Windows Server 2012 R2 with Below Ten Gig Network Adapters
4: Auto Update The Installation of Hyper-V Integration Services via PowerShell
5: Cannot copy files into VM with Allow Enhanced Session Mode in Hyper-V 2012 R2

Another great thing I could do in 2014 was working with my partners in several different projects. I really have to thank all my sponsors here Savision, Altaro, and StarWind Software.

So how do I summarize all of this? People interest in Hyper-V continues to rise more and more…

Thank you all for reading my blog and may you all have a wonderful, healthy and successful new year!

See you in 2015…

Cheers,
-Charbel

Posted in Microsoft, Review Tagged with: , , , , , , , , ,

Enjoying The End of Year 2014 With Last Microsoft Exams :) #Microsoft #MCS #MCSA #O365 #Azure

Let’s end the year with last Microsoft® certificates for 2014!

- Microsoft® Certified Solutions Associate: Office 365.
– Microsoft® Certified Specialist: Implementing Microsoft Azure Infrastructure Solutions.

70-346-347-533

Lessons learned:

Practice, practice and practice… I cannot stress enough that hands-on experience will help you to pass both exams, however the Microsoft Azure Infrastructure Solutions exam was tough. Winking smile

Good luck for everyone who plan to take the same.

Happy New Year Party smile

Cheers,
/Charbel

Posted in Certificates, Microsoft Tagged with: , , , ,

How to Set Hyper-V Storage Quality of Service (QoS) on All Virtual Hard Disks via PowerShell? #HyperV #PowerShell

Hello folks,

As we are approaching the holidays, and being busy preparing for the new year! I would like to share a script with you.

Hyper-V Storage QoS!

Killer feature… Microsoft introduced in Windows Server 2012 R2, Hyper-V storage Quality of Service (QoS). Storage QoS enables you to manage storage throughput for virtual hard disks that are accessed by your virtual machines.

Storage QoS enables you to specify the maximum and minimum I/O loads in terms of I/O operations per second (IOPS) for each virtual disk in your virtual machines. Minimum and maximum IOPS are measured in 8 KB increments

Now If you are concerned about a specific virtual hard disk for a particular VM is not receiving sufficient disk I/O, then you can set a minimum IOPS level. Remember that minimum is a soft reserve (best effort) which means it might fail but an event will be logged that things are going wrong. On the other hand, if the virtual hard disk is accommodating a very high I/O then you may want to populate the Maximum IOPS field as a way of limiting the total number of IOPS that the virtual hard disk can consume, and ensure that the storage throughput of one virtual hard disk does not impact the performance of another virtual hard disk on the same Hyper-V host.

For more information on what’s new in Storage QoS in Windows Server 2012 R2, click here.

Best Practices: Hyper-V Storage QoS!

If you identify a VM that is using more resources than you want it to use, then you can go ahead and apply a limit to it right away, this what we call a reactive approach.

To measure a VM, you can use Measure-VM cmdlet but first you must enable VMResourceMetering. The virtual machine metrics infrastructure have been extended with storage related attributes in Windows Server 2012 R2, so you can monitor the performance. To do this Microsoft use what they call “normalized IOPs” where every 8K of data is counted as an I/O.

HV12R2StorageQoS-01

The reactive approach is not really ideal, because you are reacting since you have a problem.

What I recommend doing is to take a proactive approach earlier.

So as you are deploying your virtual machines, you can start applying a default limit to all individual VM’s VHDs and then you can raise based on workload demand.

As best practices, consider tiers based on planned usage as Virtual Machines are deployed as the following:

  • VDI VMs: Max 100 IOPs limit
  • General VMs: Max 500 IOPs limit
  • High Performance VMs: > 500 IOPs limit

How can you limit individual VM’s VHD?

The answer is straight forward, the new Storage QoS feature is available under Advanced Features for each individual virtual hard drive as shown in below figure:

HV12R2StorageQoS-02

Automation: Hyper-V Storage QoS!

Now the challenging question is what if you have hundreds of VMs already deployed and you need to start using the proactive approach?

The answer is simple, open each VM settings and limit the maximum IOPs to 500.

And what if each VM has 4 virtual hard disks attached to it? so 400 VHDs Crying face

The answer is PowerShell of course Winking smile

I created the following tool script that will help you to limit all individual VM’s VHDs to a default IO number you specify.

HV12R2StorageQoS-04

Here you so go Hyper-V storage QoS Maximum IOPs is set for all virtual machines Smile, I feel it’s a much easier than having to set the limit individually for each VM’s VHD.

HV12R2StorageQoS-05

If you have more scenarios, please feel free to leave a comment below:

Demo: Hyper-V Storage QoS!

Would you like to see Hyper-V Storage QoS in action? Then make sure to watch this short demo:

Hyper-V Storage QoS In Action!

And now It’s time to sign-off and prepare for the holidays… Airplane 

HV12R2StorageQoS-03

Until then… See you in 2015!

Enjoy the holidays… Party smile

Cheers,
/Charbel

Posted in Hyper-V, PowerShell Tagged with: , ,

FREE Guide: The Journey of a System Center Consultant Implementing BSM #Savision #SysCtr

As more and more organizations adopted the ITIL framework and they soon realized that their monitoring solution needed to be aligned with the ITIL view on how IT services should be delivered and monitored. This had a great impact on the future requirements of IT monitoring solutions.

Savision is happy to announce that in conjunction with Approved Consulting, they have produced a Business Service Management Guide written by CEO and Microsoft Specialist, Jonas Lenntun.

Are you interested to find out how you can reduce 80% of the time spent in the Operations Manager distributed applications designer, lower monitoring costs and a obtain more pro-active IT department that is aligned with the needs of your business needs?

Then feel free to download the guide from here:

BSM-guide-header-website

Enjoy reading!

Cheers,
/Charbel

Posted in Hyper-V, Savision Tagged with: , ,

My First Book Reviewed: Hyper-V Best Practices 2012 R2 #HyperV #PacktPub

Hello folks,

For the past few months, I’ve been busy working as “Technical Reviewer” for the book title: “Hyper-V Best Practices

And guess what? I Just received good news that it is finally published by Packt Publishing.

The book is authored by my fellow Hyper-V MVP Benedict Berger.

6091EN_HyperV_BestPractices_Cov

This book is intended for those who already have some basic experience with Hyper-V, and now want to gain additional capabilities and knowledge of Hyper-V.

Here is a sneak peak of how the book page looks like Winking smile:

When you click on “Credits” link, you will see my name:- (Under Reviewers)

HV-BP-PG01HV-BP-PG02

Here is my acknowledgement:- (Charbel Nemnom)

HV-BP-PG03

Here is the detailed table of contents and what to expect to learn after reading this book:

Chapter 1: Accelerate Hyper-V Deployment
Why Hyper-V projects fail?
Planning your environment
Preparing your host systems
Creating unattended installation files
Adding basic components
Which edition to install
To GUI or not to GUI
Hyper-V hosts in Active Directory domains
Activating Hyper-V features
Post-installation tasks
Antivirus on a Hyper-V host
Setting the Pagefile
Creating virtual machines
Summary

Chapter 2: High Availability Scenarios
Preparing for High Availability
Summary

Chapter 3: Backup and Disaster Recovery
Protecting a Hyper-V environment
Hyper-V Replica
Azure Site Recovery
Backup of virtual machines
Summary

Chapter 4: Storage Best Practices
Storage overview
SANs versus SOFS
Storage Spaces and tiering
Multipath I/O
Cluster Shared Volumes
Data deduplication
Storage Quality of Service
NTFS versus Resilient File System
The iSCSI target
Summary

Chapter 5: Network Best Practices
Networking overview
NIC Teaming
Converged networking
Storage network
SMB Direct
Advanced networking options
IPAM
Summary

Chapter 6: Hyper-V Performance Tuning
Measuring performance
Performance tuning
Hyper-V benchmarking
Hyper-V for virtual desktops
Summary

Chapter 7: Management with System Center
Microsoft System Center
Summary

Chapter 8: Migration to Hyper-V 2012 R2
Upgrading single Hyper-V hosts
Migrating VMware virtual machines
Summary

Do you want to accelerate and deploy Hyper-V right from the first time? Then I strongly encourage you to grab a copy of this book here.

Enjoy reading!

Cheers,
/Charbel

Posted in Books, Hyper-V Tagged with: , ,

Demo: Storage Spaces Tiering in Action #StorageSpaces #HyperV

Hello folks,

In today’s blog post, I will demonstrate the Storage Spaces Tiering feature that was introduced in Windows Server 2012 R2.

If you want a quick overview on how to optimize Storage Tiered Spaces, make sure to check my previous blog post here.

Enjoy the demo!

Cheers,
/Charbel

Posted in Storage Spaces, Windows Server, Windows Server 2012 R2 Tagged with: , ,

How To Migrate from Standard Switch to Logical Switch in VMM 2012 R2? #SCVMM #VMM #SysCtr #HyperV

Hello folks,

In today’s blog post, I will show you how to migrate from VMM Standard Switch to VMM Logical Switch in System Center Virtual Machine Manager 2012 R2.

As of today 5/December/2014, SCVMM 2012 R2 doesn’t have a magic button to migrate between the two worlds Winking smile.

In Virtual Machine Manager you can choose between two Virtual Switches; You can use either the new Logical Switch or you can use the Standard Virtual Switch.

The question is, what if we already have Hyper-V deployed with Standard Virtual Switch, and is managed by SCVMM, but we need to migrate to Logical Switch, would be possible?

The answer is “Yes!”.

In a nutshell, let’s have first an overview of Standard Switch vs. Logical Switch:

VMM Standard Switch

The Standard Virtual Switch is basically the normal Hyper-V Virtual Switch that has all the default Virtual Switch functions, and the configuration is the same as in the Hyper-V Manager. If you add a Hyper-V Host to VMM and you have previously created the Virtual Switch using Hyper-V Manager or PowerShell.

Existing Virtual Switches will be shown as Standard Switches in SCVMM as shown in below figure, you have to recreate the configuration if you want to use the Logical Switch which is our talk for today.

Standard-Logic-vSwitch01

Standard-Logic-vSwitch03

VMM Logical Switch

A Logical Switch includes Virtual Switch Extensions, Uplink Port Profiles which define the underlying physical network adapters used by the Hyper-V Virtual Switch for example for teaming and the Virtual Adapter Port Profiles mapped to Port Classifications which are the settings for the Virtual NICs of the virtual machines.

You can create multiple vNICs (vEthernet Adapters) as shown in below figure, for example a Hyper-V Converged Networking setup. Port Classifications and Virtual Adapter Port Profiles bring support for Bandwidth Management and Quality of Service (QoS).

Standard-Logic-vSwitch02

Standard-Logic-vSwitch04

So without further ado, let’s start the migration plan.

First question to ask, do you have Hyper-V Cluster host or Hyper-V Standalone host?

I will walk through both scenarios.

Scenario 1: Migration Plan from Standard Switch to Logical Switch in Hyper-V Cluster Host:

1. Prepare your environment before assigning a “Logical Switch”.

2. Clean up your Hyper-V cluster host (carefully…)
– Place your host in Maintenance Mode in VMM (move all Virtual Machines to a different host, because you will have network outage!).
– If you don’t have Hyper-V cluster and you have more than one host, then move all Virtual Machines to a different host using Shared-Nothing Live Migration (because you will have network outage as well!).
– Remove the Virtual Switch.
– Remove NIC Teaming (The IP will be moved to MGT NIC, so make sure your MGT adapter still has an IP address before you proceed).
– Refresh the Host in VMM, make sure Virtual Machine Manager has the same level of information, no virtual switch and no teaming.
– Apply your logical switch, and then create the Virtual Network adapters (vNICs) according to the plan you have, click OK and you are done!
– Stop Maintenance Mode in VMM (when you bring a host out of maintenance mode, VMM does not automatically restart the virtual machines and does not automatically move any migrated virtual machines back on to the host).

3. Virtual Machine Migration
– Relocate your VMs from the host with the Standard to the Logical Switch, because the other host is still probably has the standard vSwitch.
The name of the Standard and Logical Switch should be the same!
○ What about the Virtual Machines network when you move back the migrated VMs?
○ The answer is “Yes”, It will work and connect to the right Logical Switch.
– Planing for this
○ Warning! Downtime impact
○ Automation with PowerShell

Scenario 2: Migration Plan from Standard Switch to Logical Switch in Hyper-V Standalone Host:

1. Prepare your environment before assigning a “Logical Switch”.

2. Clean up your Hyper-V single host (carefully…)
– Planning for this
Warning! You will have downtime
○ Automation with PowerShell
– Document all your vmNICs of all virtual machines (IP Address, VLAN ID).
– Shutdown all virtual machines.
– Remove vmNICs from all virtual machines.
– Remove vNICs from the ManagementOS if you are using Hyper-V Converged Networking (Make sure your MGT adapter still has an IP address before you proceed).
– Remove Ethernet Resource Pool if you are using “VMResourcePool”.
– Remove Hyper-V Standard Virtual Switch.
– Remove NIC Teaming (IP moved to MGT NIC).
– Refresh Host in VMM.
– Apply your logical switch and then add the Virtual Network adapters (vNICs) according to the plan you have.

3. Virtual Machine
– Add vmNICs for all virtual machines.
– Assign the same static IP address for each VM according to the plan you have.
– Start all your virtual machines.

OK, so having the plan in place, let’s start the automation process with PowerShell Winking smile

I will automate scenario 2 since it’s more existing and it requires more manual intervention than scenario 1.

Standard-Logic-vSwitch05

<#
.SYNOPSIS
Migrating from VMM Standard Switch to VMM Logical Switch.

.DESCRIPTION
Migrating from VMM Standard Switch to VMM Logical Switch in Hyper-V Standalone Host.

.NOTES
File Name : VMM-SwitchMigration.ps1
Author      : Charbel Nemnom
Version    : 1.0
Requires  : PowerShell Version 3.0 or above, VMM IP Pools defined
OS          : Windows Server 2012 R2 with System Center Virtual Machine Manager 2012 R2

.LINK
To provide feedback or for further assistance please visit:

http://charbelnemnom.com

.EXAMPLE
./VMM-SwitchMigration -VMMServerName <VMMServerName> -HostName <HyperVHostName>
This example will migrate <HyperVHostName> from VMM Standard Switch to VMM Logical Switch inluding all Virtual Machines.
#>

[CmdletBinding()]
param(
[Parameter(Mandatory=$true, HelpMessage=’VMM Server Name’)]
[Alias(‘VMMServer’)]
[String]$VMMServerName,

    [Parameter(Mandatory=$true, HelpMessage=’Hyper-V Host Name’)]
[Alias(‘HVHost’)]
[String]$HostName
)

# Document All Virtual Machines vmNICs including IPAddress and VLanID
$VMs=Get-SCVirtualMachine -VMHost $HostName | Get-SCVirtualNetworkAdapter | Select Name, IPv4AddressType, IPv4Addresses, VLanID, SlotID

# Shutdown all Virtual Machines
Get-SCVirtualMachine -VMHost $HostName | Stop-SCVirtualMachine

# Remove vmNICs from all Virtual Machines
foreach ($VM in $VMs)
{
$VirtualNetworkAdapter = Get-SCVirtualNetworkAdapter -VM $VM.Name
$VirtualNetworkAdapter | Remove-SCVirtualNetworkAdapter
}

# Verifiy vmNICs on all Virtual Machines that are removed
foreach ($VM in $VMs)
{
Get-SCVirtualNetworkAdapter -VM $VM.Name
Read-Host “Press Enter to Continue”
}

# Remove vNICs from the ManagementOS if you are using Hyper-V Converged Networking
# You may lose network connection to the host,  make sure your MGT adapter still has an IP address before you proceed
# Remove Ethernet Resource Pool if you are using VMResourcePool
# Remove Hyper-V Standard Virtual Switch
# Remove NIC Teaming

Invoke-Command -ComputerName $HostName -ScriptBlock {
Remove-VMNetworkAdapter -ManagementOS
Get-VMResourcePool | ?{$_.Name -match ‘Eth’} | Remove-VMResourcePool
Get-VMSwitch | Remove-VMSwitch -Confirm:$false -Force
Get-NetLbfoTeam | Remove-NetLbfoTeam -Confirm:$false
}

# Refresh the Hyper-V Host in VMM!
Get-SCVMHost $HostName | Read-SCVMHost

# This step is done manually in VMM UI!
Read-Host “Apply the Logical Switch on the Host in VMM!”

# Select Logical Switch and Port Classification
$VirtualNetwork=Get-SCVirtualNetwork -VMMServer $VMMServerName|Out-Gridview -PassThru -Title ‘Select Logical Switch’
$PortClassification=Get-SCPortClassification -VMMServer $VMMServerName|Out-GridView -PassThru -Title ‘Select Port Classification’

# Add vmNICs to all Virtual Machines and set the IP Address according to the plan
foreach ($VM in $VMs)
{
$IPAddresses=$VMs | where {$_.Name -eq $VM.Name} | select -ExpandProperty IPv4Addresses
$NICs=Get-SCVirtualNetworkAdapter -VMMServer $VMMServerName -VM $VM.Name
$CountedNics = $NICs.Count
for ($i=0; $i -lt $CountedNics ; $i++)
{
$VMNetwork=Get-SCVMNetwork -VMMServer $VMMServerName|Out-Gridview -PassThru -Title “Select the virtual network for $VM.Name”
New-SCVirtualNetworkAdapter -VM $VM.Name -VMNetwork $VMNetwork -VirtualNetwork $VirtualNetwork -Synthetic -PortClassification $PortClassification
Set-SCVirtualNetworkAdapter -VMMServer $VMMServerName -VirtualNetworkAdapter $NICs[$i] -IPv4AddressType Static -IPv4Addresses $IPAddress[$i]
}
}

# Verifiy vmNICs on all Virtual Machines that acquire an IP Address
foreach ($VM in $VMs)
{
Get-SCVirtualNetworkAdapter -VM $VM.Name | ft Name, IPv4AddressType, IPv4Addresses -a
Read-Host “Press Enter to Continue”
}

# Start all Virtual Machines
Get-SCVirtualMachine -VMHost $HostName | Start-SCVirtualMachine

# End
# Enjoy :)

Sure enough there are different ways to accomplish the same result Just kidding, but nevertheless it has worked for me and I feel that it’s a much easier and less downtime than having to do each step manually, so that’s that version 1.0 and expect more enhancements on upcoming versions Winking smile

I’d like to shout big thanks to my great friend Mark Scholman for reviewing my script!.

Hope this helps.

Until then, enjoy your weekend!

Cheers,
/Charbel

Posted in Networking, System Center, System Center 2012 R2, Virtual Machine Manager Tagged with: , , , , ,

StarWind End-of-the-Year Special Offers and Upcoming Webinars #StarWind #HyperV

Hello folks,

The year is almost over Party smile. StarWind provides 2 special offers:

1. Buy Now, Pay Later! – Special Payment Terms Net 90! To help meet your business goals but stay within your payment schedule and tight budget, StarWind provides financial flexibility by offering special payment terms – 90 days net upon signing the invoice!
Buy any StarWind product edition to build a fault-tolerant, high-performing Virtual SAN by December 31, 2014 and pay later!

2. Order Safely! Unprecedented 30-Day Money Back Guarantee!
We are so confident in the quality of our product and its functionality that we grant unconditional 30-day money back guarantee – no hassles, no questions asked!
This cooling-off period is designed to ensure that you are 100% satisfied with your purchase of StarWind Virtual SAN solution and to remove any risk from your purchase. So go ahead, sign up!
The offer is valid for StarWind Virtual SAN editions purchased December 1, 2014 – December 31, 2014. Request must be postmarked within 30 days after order placement.

So go ahead, and sign up below:

StarWind-DecemberPromos-2014

Upcoming free webinars:

1. Fighting the “I/O Blender” Effect in Virtual Environments, StarWind Software’s Weapon of Choice is a Log Structured File System (LSFS), December 11, 11:00AM PT / 2:00PM ET

Speaker:
Jon Toigo, Toigo Partners International.

A side effect of the massive server workload consolidation enabled by hypervisor-based virtualization has been the addition of 7 to 16 I/O ports per machine to handle the I/O requirements of the hosted apps. But, before the data can be sent to and from storage devices, virtualization administrators often confront a more challenging problem that some have taken to calling the I/O Blender Effect. The I/O Blender effect is seen when multiple virtual machines send their I/O streams at the same time to a hypervisor for processing, increasing random accesses and increasing latency. Some software-defined storage (SDS) architectures are actually making the problem worse by caching raw small logical block writes using flash memory devices, leading to accelerated wear of the device and contributing virtually no improvement in storage I/O performance.

The solution isn’t bigger or faster flash memories, but rather a log-structured file system that better organizes, writes and enables a return to sequential accesses. Don’t look for log structuring technology (yet) in the SDS offerings of leading hypervisor vendors–it is still on their product roadmaps. To get it today, you need to look at SDS innovators like StarWind Software whose approach to virtual SAN enables small writes to coalesce before writing them to flash-based caches and that enables most read requests to be handled from the cache directly.

If you are considering software-defined storage, this is a webcast you don’t want to miss.

Special Offer: Attend the webinar and win a free NFR license of StarWind Virtual SAN! Smile

Registration: starwind_logo_new

2. Scale Up is History! Is Scale Out the Future for Storage, December 18, 2:00PM GMT

Speaker:
Chris M. Evans, Independent Consultant, Langton Blue Ltd.

For many years, the dominant architecture for both compute and storage involved building bigger, faster “scale up” hardware as demand grew. However, efficient web scale companies like Google and Facebook have demonstrated there’s a place for scale-out architectures too.

Join us for a discussion on the difference in design and approach between scale-up and scale out solutions, focusing on the benefits and disadvantages of each. The presentation will cover both storage and hyper-converged solutions, with a review of the products in the marketplace today, including leading vendors such as Microsoft and VMware.

Sign up for this webinar to learn:

•    What are scale out solutions?
•    Differences and benefits of scale out vs. traditional scale up solutions
•    Challenges in delivering scale out architectures
•    How scale out helps deliver hyper-converged compute and storage solutions
•    How to decide whether scale out or scale up is right for you
•    Vendor roundup – scale out hardware and software offerings in the marketplace today

Registration: starwind_logo_new

Until then… Enjoy the hot offers Winking smile

Cheers
/Charbel

Posted in Hyper-V, StarWind Tagged with: ,

Microsoft MVP Profile

Sponsor – ALTARO

Sponsor – Savision

Sponsor – StarWind

Technical Reviewer

Visitors!

Thanks for visiting!

Copyright Warning

All material is copyrighted by me or by its respective owners. To use any of it, full or in part, you must contact me or owner of the material. You may quote few paragraphs from this blog only if you link to the original blog post.
Follow

Get every new post on this blog delivered to your Inbox.

Join other followers: