How To Migrate Virtual Machines From One Logical Switch To Another Logical Switch in Virtual Machine Manager? #SCVMM #SysCtr #HyperV

Hello folks,

A few blogs ago I showed you how to migrate from Standard Virtual Switch to Logical Switch in Virtual Machine Manager.

In today’s post I will show you how to migrate your virtual machines from an existing logical switch to another logical switch.

But before start doing this, let’s see in what scenario you might require this migration.


1- You have upgraded your Hyper-V host with higher network adapters and now you want to move all your VMs workload over the new NICs.

2- You are using converged virtual network within Hyper-V deployments that is managed by System Center Virtual Machine Manager, and now you need to move all your VMs traffic off the converged vSwitch and use a dedicated logical switch.

More information on how to create a Logical Switch in VMM.

In order to move your virtual machine from one logical switch to another one is very simple.

To choose a logical switch
> Open the VM and Services workspace.
> Choose any host group, and then select the desired virtual machine.
> On the Virtual Machine tab, click Properties.
> The Virtual Machine window properties opens.
> Choose the Hardware Configuration, and then browse to Network Adapters.
> Select the desired Virtual Network Adapter, and then change the Logical Switch as showing in below figure.


Select the Logical Switch for virtual machines in VMM. (Image Credit: Charbel Nemnom)

Now the challenge is, what if you need to migrate 50 VMs and each VM has multiple vNICs and each is on different VLAN? 

Because when you change the Logical Switch in the UI, you need to select again the port classification and enable the VLAN ID.


Changing the Logical Switch for virtual machines in VMM. (Image Credit: Charbel Nemnom)

This indeed a long homework! Crying face

So what is the solution then?

The answer is PowerShell of course Winking smile

I have created the following tool that will help you to migrate all Virtual Machines on a particular Hyper-V host from an existing logical switch to another logical switch, while preserving all the existing configuration:


Do you have any other scenarios? please feel free to leave a comment below.

Hope this helps!


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

StarWind V2V Converter Update, Newly Released Technical Paper, Tap Room Meeting, and Free Webinar #StarWind #HyperV

Hello folks,

I am glad to share with you the latest StarWind news!

StarWind V2V Converter Update


StarWind V2V Converter allows the user to convert VMs from one format to another, basically “cloning” them and keeping the original copy intact. It comes either with any version of StarWind Virtual SAN, or as a standalone free tool. We have just updated StarWind V2V Converter to version V8 Build 161, adding a number of convenient features.

Here is the list of latest improvements:

· Added support for MS VHDX container format. It requires running on Windows 8/2012 or higher version of Windows.

· Windows Repair Mode may be activate for converted image, allowing virtual machines to adapt to hardware environment of new hypervisor automatically.

· Command-line utility extended to support VHDX format and repair mode option.

· New style of GUI in V2V Converter Wizard.

· Help file added to installation.

Download StarWind V2V Converter V8 Build 161 here!

Newly Released Technical Paper “Near-FT Support of ‪OLTP Applications using StarWind Virtual SAN and a Hyper-V Cluster”

‪OLTP Applications using StarWind Virtual SAN

If you consider yourself to be an advanced StarWind user, please check this technical paper out and find out how to use StarWind Virtual SAN in OLTP applications and what the best configurations for this case are.

Moreover, the analysis contains testing data that’s completely relevant to real business conditions.

It is worth reading!

Tap Room Meeting: How to get more from Microsoft SoFS with StarWind


(26 Feb, 11 am PT / 2 pm ET)

Host: Anatoly Vilchinsky, Head of Support Department of StarWind Softwarу

Imagine there is no CapEx, Neo.
This Thursday we will taste the single malt scotch while discussing how exactly StarWind helps to improve the IT infrastructure for Microsoft fans and users. Our base line here – piece of cake.
*The only place where it’s allowed to put the elbows on the table while dining*

Order your table here!

Webinar: 10x faster back-ups: Virtual Tape Libraries


(3 Mar, 11 am PT / 2 pm ET)

Speaker: Max Kolomyeytsev, Product Manager, StarWind Software Inc.

Tapes will never die. They are ideal for long-term vaulting and are an absolute winner in the capacity/price competition versus any disk storage.

But even being long lasting and cost-effective, tapes are considerably slower compared to even commodity hard disks. As amounts of data used by companies are constantly growing, tape backup speed becomes a major vulnerability in modern BC and DR strategies. As soon as a backup job exceeds its backup window, it starts consuming application performance during business hours. The problem is solved by rebuilding and extending the tape backup infrastructure, but it’s extremely cost-consuming. Or you can implement Virtual Tape Library to complement physical tape storage.

Join StarWind Product Manager Max Kolomyeytsev and learn how to:

-          Shrink backup window by implementing Disk-to-Disk-to-Tape strategy using fast and cost-effective SATA as a primary backup storage,

-          Keep up with regulatory requirements without disrupting IT infrastructure work

-          Replace physical tape with VTL completely

Register here!


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

Slide Deck: Hyper-V Know-Your-Tech #3 @ Microsoft Gulf IT Pro #HyperV #KnowYourTech #Microsoft

I would like to thanks Microsoft® and all the IT Pros who attended my session today at the Ramada Hotel, Abu Dhabi.

After a successful Know-Your-Tech#1 event in November last year, we continue our journey with Know-Your-Tech#3.


The session was focused on Hyper-V history, features, top functionalities and what’s coming in the next release of Windows Server.

The main topics were discussed are the following including 20 live demos Fingers crossed:

  • Hyper-V Evolution and Overview.
  • Failover Clustering in Depth: Windows Server 2012 R2.
  • Hyper-V Replica in Depth: Windows Server 2012 R2.
  • Getting Started with Azure Site Recovery (ASR).
  • What’s new in Hyper-V Technical Preview?
  • Q & A

At the end of this article, I’ve included a downloadable copy of the session deck 188 slides for offline review Winking smile


The attendees enjoyed the training and the feedback was awesome! Open-mouthed smile



Until the next one!

Enjoy your day…Cheers,


Posted in Microsoft, TechDays Tagged with: , , , , ,

Newly Released Whitepaper, Tap Room Meeting and Webinar: Hyper-V Failover Clustering: Virtualizing ROBO without Breaking the Bank #StarWind #HyperV


Hello folks,

Here are the latest news at StarWind Inc:

1. Newly Released Whitepaper

Read a new featured ‎whitepaper by Jon Toigo “Microsoft Clustered Storage Spaces and ‪‎StarWind Virtual SAN for a Complete Software-Defined Storage Solution”

Feel free to download it here.

2. Tap Room Meeting (Thu, Feb 19, 2015 6:00 PM – 7:00 PM EET)

Topic: Microsoft Clustered Storage Spaces, StarWind and a clear head in the morning


To blend or not to blend, that is the question!
Whether its Nobler in the mind of suffer, the I/O blender and bottlenecks of outrageous Fortune, Or to take StarWind against a Sea of troubles? …the only tap room that welcomes laughing out loud from under the table.

Book your table now here!

3. Webinar: Hyper-V Failover Clustering: Virtualizing ROBOs without Breaking the Bank

(Wed, Feb 18, 2015 at 11:00 am PT / 2:00 pm ET
Speakers: Howard Marks, Founder and Chief Scientist, DeepStorage


Ryan Post, Inside Systems Engineer, Veeam Software, Inc.

Max Kolomyeytsev, Product Manager, StarWind Software
Regardless of whether you call them stores, branch offices, plants or something else, remote sites present a unique set of engineering challenges. Customer facing applications require high availability but replicating the solutions we use in the data center to tens, or thousands of sites would cost more than the GDP of a small country.
Hyper-converged architectures, which turn server local storage into highly available, shared storage, promise to be more affordable, but some appliance solutions cost as much or more than the traditional server and SAN solutions.
This webinar will explore how StarWind Virtual SAN can fulfill the promise of hyper-convergence providing a highly available platform for virtual machines while Veeam Backup and Replication protects it from the unexpected.

Register here!



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

Update Rollup 5 for System Center 2012 R2 is Now Available #SysCtr #SystemCenter

Hello folks,

I am glad to share with you that Microsoft just released the Update Rollup 5 for System Center 2012 R2.

Here is the description of the components that are updated in UR 5 for System Center 2012 R2:

App Controller

There are no updates to this component in this rollup.

Data Protection Manager

See the following Knowledge Base article for more information about these fixes and installation instructions:

3021791 Description of Update Rollup 5 for System Center 2012 R2 Data Protection Manager

Operations Manager

See the following Knowledge Base article for more information about these fixes and installation instructions:

3023138 Description of Update Rollup 5 for System Center 2012 R2 Operations Manager


There are no updates to this component in this update rollup.

Service Manager

See the following Knowledge Base article for more information about these fixes and installation instructions:

3009517 Description of Update Rollup 5 for System Center 2012 R2 Service Manager

Service Provider Foundation

There are no updates to this component in this update rollup.

Service Reporting

There are no updates to this component in this update rollup.

Virtual Machine Manager

See the following Knowledge Base article for more information about these fixes and installation instructions:

3023195 Description of the security update for Update Rollup 5 for System Center 2012 R2 Virtual Machine Manager

Windows Azure Pack

See the following Knowledge Base article for more information about these fixes and installation instructions:

3023209 Description of Update Rollup 5 for Windows Azure Pack

Windows Azure Pack websites

There are no updates to this component in this update rollup.

How to obtain and install Update Rollup 5 for System Center 2012 R2.

Please see each component KB article above to obtain specific installation instructions for each component.

Warning: Please remember that you must try the update first in a dev/test environment before you install them in production!

Happy testing Smile


Posted in System Center, System Center 2012 R2 Tagged with: ,

What’s New in PowerShell For Hyper-V In Windows Server Technical Preview? #HyperV #PowerShell #vNext

Hello folks,

In October last year, Microsoft released Windows Server Technical Preview 1 bits along with System Center Technical Preview and Windows 10 Technical Preview.

On Friday evening January 3rd, 2015 Microsoft made the latest Windows 10 Technical Preview 2 available to the public. I see that 2015 will be an exciting year, however the final release of Windows Server vNext and System Center is not until 2016!    

In today’s blog post we will look at what’s new in PowerShell for Hyper-V in Windows Server vNext.

The Hyper-V PowerShell module includes several significant features that extend its use, improve its usability, and allow you to control, automate and manage your Hyper-V environment.

Hyper-V in Windows Server 2012 R2 ships with 178 PowerShell cmdlets. These cmdlets allow a Hyper-V administrator to handle very simple, basic tasks to advanced ones such as setting up a Hyper-V replica for virtual machine disaster recovery.

If we look into PowerShell on Windows Server 2012 R2 and count the Hyper-V cmdlets that are available under our disposal.


As you can see we have 178 cmdlets, let’s do the same on Windows Server TP1:


As you can see we have 186 cmdlets in Hyper-V TP1 versus 178 in Hyper-V 2012 R2, so we have 8 new cmdlets so far.

What are these new cmdlets? Let’s compare the two modules side by side and explore the difference.

I will run the following cmdlets on a Hyper-V Technical Preview host:


The result above will be a table telling you what’s different. Every PowerShell cmdlet that’s in the reference set (HyperV-2012R2-Reference.xml), but not in the difference set (HyperV-TP1-Compare.xml), will have a <= indicator (which indicates that the cmdlet is present only on the left side). However If a process is on the difference Hyper-V TP1 host but not on the reference 2012R2 host, it’ll have a => indicator which is our case here with 8 different cmdlets on the right side. Finally, PowerShell cmdlets that match across both sets won’t be included in the difference output.

All the previous PowerShell cmdlets that are available in Windows Server 2012 R2 Hyper-V are available as well in Windows Server Technical Preview in addition to the following:

Let’s deep dive and read the help for each of these new cmdlets.

I- Update-VMConfigurationVersion


Microsoft in Windows Server technical preview introduced a new configuration file format for Virtual Machines which is designed to increase the efficiency of reading and writing virtual machine configuration data. It is also designed to reduce the potential for data corruption in the event of a storage failure. The new configuration files use the .VMCX extension (Replaced the old .XML files) for virtual machine configuration data, and the .VMRS extension (Replaced the old .VSV/.BIN files) for VM runtime state data.

The upgrade process is only through PowerShell no UI!

Let’s see the update VM configuration version in action.


To upgrade the VM Configuration File for a Virtual Machine, you need to turn off the VM first, and then from an elevated Windows PowerShell command prompt run the following:

Let’s see now the difference after we update the configuration version for “FS01” Virtual Machine.


II- Get-VMVideo, Set-VMVideo


The Get-VMVideo and Set-VMVideo are used to modify the Synthetic Display Controller (Microsoft Hyper-V Video Resolution) for the virtual machine.

Let’s see how it works, first I will query the current Video settings for the VM.


As you can see the Horizontal and Vertical Resolution is set to default 1920 X 1200.

In order to change the display resolution, you need to turn off the VM first, then change the resolution type as shown in above figure.

Let’s login to the virtual machine now and see the difference before and after we changed the display resolution.

Default @ 1920X1200:


Custom @ 1024X768


As you can see the resolution settings is grayed out now, and cannot be changed, it’s fixed to 1024 X 768.

One important point to mention, that this settings will take effect only when you login to the Virtual Machine without leveraging the Enhanced Session Mode feature that was introduced in Windows Server 2012 R2.

III- Get-VMAssignableDevice, Add-VMAssignableDevice, Remove-VMAssignableDevice

The Get-VMAssignableDevice, Add-VMAssignableDevice and the Remove-AssignableDevice are probably used to assign devices for Virtual Machines by either the Instance ID or the Location Path.


IV- Mount-VMHostAssignableDevice, Dismount-VMHostAssignableDevice

The Mount-VMHostAssignableDevice, and Dismount-VMHostAssignableDevice are probably used to mount/dismount a device globally for the Hyper-V host, and this is by either the Instance ID or the Location Path as well.

However the help file is not completed and no PowerShell examples are available yet.


I will update this blog post as soon as the next Technical Preview will come out Winking smile

Note: This is the current release of Technical Preview 9841 build, so we’ll have to wait and see the changes in the next bits…

Enjoy your day!


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

What’s New In Altaro Hyper-V Backup V5? #Altaro #HyperV

Hello folks,

I am glad to share with you that finally ALTARO Hyper-V Backup Version 5 is here.

What’s new in ALTARO Hyper-V Backup Version 5.0?

A Brand New Look
Managing backup and restoring VMs, has never been easier. The product now offers the user a more logical and intuitive approach to the various configurations and tasks that an administrator can execute across all hosts/VMs, in a given environment.

Multiple Backup and Office Locations
Altaro Hyper-V Backup now allows the configuration of Multiple Backup and Offsite Locations, meaning if you wish to backup a set of VMs to one location, and a different set of VMs to a different location – this is now possible, and really easy to setup too! Backing up to multiple backup locations offers users additional flexibility to back up their VMs to multiple storage destinations.


Job Queuing and Management
Altaro Hyper-V Backup now allows for concurrent backup/restore/offsite copy job. Job queuing and pausing as needed also allows operations to be queued when another task is already in progress. Operations will show in the Dashboard under Active & Pending Operations. Jobs can also be skipped while queued.

Centralized Configuration and Management of Multiple Hosts
With a user interface built for scalability, managing and configuring backup/restore jobs across multiple hosts has never been simpler. You can control all your VMs from one single console, without the need to manage configurations for individual hosts.


Automated Deletion of Sandbox Restores
A new option will allow you to schedule the automatic deletion of Sandbox restored Virtual Machines so as to fully clean up after automated scheduled Sandbox Testing.

You can now verify the integrity of your backup data without needing to restore the data to another location, both manually and on an automated schedule.


Improved Performance
Altaro Hyper-V Backup’s performance has improved significantly, making backup and restore speeds faster. We have also added the ability to run backups from multiple hosts concurrently, thus drastically reducing the time taken to backup multiple Host and Hyper-V Cluster scenarios.

What are the main features in ALTARO Hyper-V Backup?

  • Hot Backups – MS VSS Integration
    Back up live VMs with zero downtime by leveraging the Microsoft VSS Hyper-V Writer.
  • Restore Clones
    Restore VMs to the same Hyper-V Host but with a different name.
  • Restore to different Hyper-V host
    Restore an individual or a group of VMs to a different Hyper-V Host.
  • Reverse Delta Incremental Backup
    Incremental Backup Technology for hyper-speed efficiency.
  • File/Item Level Restore
    Mount backed up VHDs and restore files without having to restore a whole Virtual Machine.
  • Backup schedules
    Set different backup schedules for different VMs.
  • Restore different versions
    Restore from multiple points in time rather than ‘the most recent backup’
  • Sandbox Restores & Verification
    Build a plan to make automatically verify the integrity of your backup data. This is awesome feature, while you are sleeping at night, the system will restore and verify your backup integrity in an isolated environment Winking smile
  • Supports Free Microsoft Hyper-V Server
    Works with the free Microsoft Hyper-V Server.
  • Backs up Hyper-V Checkpoints (a.k.a Snapshots)
    If your VMs have snapshots than you can back up the snapshots as well.
  • Offsite Backup with WAN Acceleration
    Backup to an offsite Altaro Backup Server over a WAN connection for added redundancy.
  • Remote Management
    Manage your Altaro Hyper-V Backup from another machine.
  • Backup Compression Encryption
    Get smaller and faster backups by enabling compression on your backup drive
  • Backup Encryption
    Secure your backup data with military grade AES encryption.
  • Microsoft Exchange backup and Item Level Restore
    Backup your Microsoft Exchange server and restore at Item level from within the Exchange database.
  • VHD Exclude
    Choose which VHD(X) files you wish to include/exclude in your VMs backup
  • Backs up support for Hyper-V clusters
    Cluster support for larger installations.

Do you want a reliable backup for your Hyper-V environment?

So without further ado, start here by downloading the unlimited free edition.      

Enjoy your day!


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

Announcing The 3rd Know-Your-Tech Session Focused on Hyper-V #HyperV #Microsoft


Hello folks,

I am glad to announce that I am presenting at the 3rd Know-Your-Tech Session Focused on Hyper-V. The Microsoft Know-Your-Tech is a series of technical sessions conducted by Microsoft in United Arab Emirates focused on different technologies, and purposely capped to just limited number of attendees so that nobody gets lost in the crowd. The presenter have time to meet and answer your questions.

The 3rd Microsoft Tech Days will take place on February 21st, 2015 from 10.00AM to 4.00PM at the Ramada Hotel in Abu Dhabi.

Make sure to book your seat now.


Posted in Microsoft, TechDays Tagged with: , , , ,

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


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 peek of what’s coming Winking smile



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.

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.


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.

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:


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.


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!


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.


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”.

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

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

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

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!


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:


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


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


The same can be done in Hyper-V Manager


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.


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:


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


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.


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


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!


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:


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


And here you go the report in your inbox.


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!


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

Microsoft MVP Profile

Microsoft Ignite

Sponsor – StarWind

Sponsor – ALTARO

Technical Reviewer


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.

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

Join other followers: