Category Archives: Hyper-V

Getting Hyper-V guest OS information without logging in to guest OS/VM

The other day it was necessary for me to confirm Windows OS build in  Hyper-V guest VM without logging in into it. I simply received VM from the client but no credentials which I could use, but it was necessary to quickly confirm guest OS build. I was certain that there is a way to query such data from Hyper-V host without logging into guest and with no credentials. After some googling I was not able to find some simple command or one liner to pull this data (opening PS session into VM was not an option as it requires credentials), but I’ve found good function which does exactly what I need on Yusuf Öztürk blog, here it is:

Once you have this function, you can use it like this:

Sample output from this function:

Facebooktwittergoogle_plusredditpinterestlinkedinmail

Windows 10 Hyper-V: What is “Upgrade Configuration Version…” option?

Recently I imported some old VM into my Windows 10 Hyper-V and noticed that unlike VMs I created with latest version of Hyper-V it has an extra option named “Upgrade Configuration Versions..”:

Hyper-V Upgrade Configuration Version

To me option name is a bit confusing (which sometimes happens in MSFT products out of best intentions in attempts to simplify their wizards and wording). I was confused by this option name as it makes me think about configurations versioning and management rather about what it really means.  To put it simply it is equivalent of what you can see in VMware Workstation as “Upgrade Virtual Hardware”/”VM hardware compatibility” (isn’t it more appropriate name? but I guess there is also differentiation needs which software vendors may have 🙂 ).

What you should know about this is in the past (prior to Windows 10) your VMs have been upgraded automatically to new configuration version, but now you have more control over this and have upgrade it manually via GUI (see screenshot above) or using Update-VMVersion cmdlet.

“Upgrade Configuration Version…” option presented in VM properties only when your VM is in offline state. Operation is almost instant and unfortunately it doesn’t give you that VMware Workstation wizard which explains available versions and why you may want to upgrade/added features. But essentially Hyper-V no longer upgrades VMs by default to allow you to move them back to older versions in case it will be necessary and upgrade is needed to enable new features for VM (see table below):

Hyper-V Upgrade Configuration Version - Features Table

Features available/added in different VM versions. Source: Ben Armstrong’s Virtualization Blog – Upgrading your Virtual Machine version

Virtual machines created on Windows 10 use version 6.2 configurations, and the highest value for now is 8.0 (Served 2016/Windows 10 Anniversary update). You can use this table to get an idea of configuration versions in different base OS versions:

Hyper-V Upgrade Configuration Version - Versions Table

To check configuration versions of VMs on your Hyper-V host:

To get configuration version supported by your host use (add –Default parameter to see default one):

You can read more in official MSFT documentation: Upgrade virtual machine version in Hyper-V on Windows 10 or Windows Server 2016

Facebooktwittergoogle_plusredditpinterestlinkedinmail

Internet access slowness on host after installing Windows 10 Client Hyper-V

I’ve recently switched from VMware Workstation to Windows 10 Client Hyper-V and I really pleased with capabilities I get so far. But after awhile I noticed extreme sluggishness of web browsing on my host machine which I had not linked initially with Hyper-V. Issue has not crop up immediately after I installed and started using it, but seemingly after I added Internal Virtual Switch. So I spend day and a half blaming slowness on my ISP before trying to investigate and fix the problem.

In case if you not recognize whether you have the same problem or not here is somebody’s YouTube video demonstrating it along with fix valid for Window 8/8.1 (note that adapter names may vary from case to case). Windows 10 fix can be found below.

Essentially when you create External Hyper-V switch it sorts of hijacks your physical NIC unbinds IPv4 from it and passes its IPv4 config onto External vEthernet adapter in some obscure way. But slowness crops up due to the wrong connections priority which was easy to adjust in Win 8 as described in this TechNet blog post – you just navigate to Network Connections (ncpa.cpl) > Press Alt on keyboard to access Advanced Settings as depicted below and from there just reorder your connections making sure that External vEthernet adapter is listed first.

Problem is that in Windows 10 you no longer have this GUI because as one person put it “There are no longer any components that utilize the binding order. The only known component that used the binding order was DNS ordering. By default, Windows uses the Route Metric + Interface Metric to determine which route has the highest priority by choosing the route with the lowest value.” This is explanation which I got here.

Long story short what you likely have to do to bring your browsing speed back to normal is issue Get-NetIPInterface cmdlet to get list of your interfaces along with their Index and Interface Metric values. It should return you something like this:

Get-NetIPInterface

Now you want to make sure that your vEthernet gets highest priority by issuing the following cmdlet:

If I use example with interfaces listed above it would be something like this:

This should fix your browsing speed.

Facebooktwittergoogle_plusredditpinterestlinkedinmail

Windows Server 2012: scaling

Though most powerful capabilities of latest Windows Server 2012 release to my mind are related with its accomplished feature set and new usage scenarios I should admit that we people like to look at numeric metrics and increased figures. Incidentally, some of new things/scenarios available in Windows Server 2012 wouldn’t have been possible without significant scaling up of possible workloads and used resources. So you may find comparative table of scaling for nodes and workloads for WS2008R2 & WS2012RC below (sorry if you are cyrillically challenged, but only Russian version of table was available at my disposal).

WS2012-workloads

Facebooktwittergoogle_plusredditpinterestlinkedinmail

Hyper-V: What will happen with my VMs when I restart Hyper-V host

Running virtualized environment is so convenient that at times you may even forget that hardware on which all your VMs are running or Hyper-V host may need to be restarted… At this point reasonable question to ask is “What will happen with my VMs during host restart?” If we set aside clustered high-available Hyper-V implementations what actually will happen is defined on a per VM basis in VM properties (for stand-alone Hyper-V servers not participating in Hyper-V cluster or managed by SCVMM). Options which define this behavior on a per VM basis called “Automatic Stop Actions” and “Automatic Start Actions” respectively.

By default your running VM will save state & start automatically after reboot if they were started before Hyper-V restart. See screenshot of corresponding VM Settings section below.

Hyper-V_Auto_Stop_Actions

As for other options you may configure in VM properties these are “Save the VM state (default)”, “Turn off the VM”, “Shut down the guest OS” (Automatic Stop Actions) and “Nothing”, “Automatically start if it was running when the service stopped”, “Always start this VM automatically” (Automatic Start Action). In Hyper-V v3 (part of Windows Server 2012) even more additional VM startup control options available to address “VM boot storms” and some other related issues (e.g. you may set startup memory allocation to be greater than memory allocated to VM when it up and running)…

As for logging you may find loads of Hyper-V related events under in Event Viewer > Applications and Services Logs > Microsoft > Windows. In particular when you shutdown your Hyper-V host event 14100 is recorded in Hyper-V-VMMS > Admin logs (“Shut down physical computer. Stopping/saving all virtual machines…”), and if you just Stopped VM Management Service via Stop button in Hyper-V management console then event 14090 is being registered in the same section (“Virtual Machine Management service is shutting down while some virtual machines begin running. All running virtual machines will remain running with no management access”).

And yes after you know that your second question naturally would be about conrolling VMs stop / start up order. There is no easy few click solution for this on stand-alone Hyper-V, but it’s doable. You may find one example of  ordered VMs startup solution by John Savill on windowsitpro.com, and I believe you may find more options for that.

Facebooktwittergoogle_plusredditpinterestlinkedinmail