Tag 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:

Get-VMGuestInfo VMNAME -HyperVHost HyperVHostName

Sample output from this function:

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:

Get-VM * | Format-Table Name, Version

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

How to: relocate Hyper-V VM smart paging file to another location

Just a how to post on how to relocate Hyper-V VM smart paging file to another location. Contrary to idea (from the past) of placing Paging File to a fast/dedicated storage idea with Smart Paging storage is to drop it to less expensive storage tier as it is only used for VMs startup, period.

For existing VM you can set SmartPaging file location using either Set-VM or Move-VMStorage cmdlets as well as Hyper-V manager GUI.

Set-VM example:

Set-VM Win7 -SmartPagingFilePath D:\

Move-VMStorage example:

Move-VMStorage "Win7" -SmartPagingFilePath F:\

Viewing/changing this option in Hyper-V manager GUI:

Hyper-V Smart Paging files location

In case you want to set the same SmartPaging File Location for all VMs on specific Hyper-V host you can pipe results from Get-VM to Set-VM cmdlet, see example below:

get-vm | set-vm -SmartPagingFilePath F:\SmartPaging

For those who wonder what is Hyper-V Smart Paging and how it is different from Paging File. Pagefile is a legacy Windows OS component left from the days when physical memory was super expensive (IMO it is expensive still, but in the past it was much worse 🙂 ). The idea was that hard disk storage space could be used to compensate for shortages of physical RAM and today the Windows Pagefile is also used to accommodate crash dump information.

Smart Paging is purely Hyper-V technology related with Dynamic Memory feature and Startup RAM setting. Hyper-V allows to maximize your host server RAM utilization allowing memory to be dynamically reallocated between VMs according to their current load. As you may guess your goal here is to maximize RAM utilization and avoid physical RAM over commitment at the same time. Giving the fact that very frequently VM boot requires more RAM than normal operations minimum RAM setting is accompanied with startup RAM setting which is normally set to be larger than Minimum RAM. It allows you to do “over commitment” of physical RAM on condition that VMs do not start simultaneously. On the other hand massive restart of VMs can cause something similar to “broadcast storm” from networking world for your Hyper-V host server RAM (I guess term “VM boot storm” is already coined 🙂 though not fully established). Smart Paging is safeguard measure which allows VM to boot, even if your physical RAM over committed – missing RAM can be allocated using Smart Paging feature on a specified disk drive. Unlike the Windows Pagefile the Smart Paging File is only used by the boot process.

To reiterate/better define Smart Paging:

Smart Paging ensures that the difference between minimum and startup memory is available using a temporary page file stored on the disk,

Poulton, Don; Camardella, David. MCSA 70-410 Cert Guide R2: Installing and Configuring Windows Server 2012 (Kindle Locations 15680-15681). Pearson Education. Kindle Edition.

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.


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.