Author Archive

Get #windows 10 digital license with #Powershell #winserv #OSD #WDS   Leave a comment

When rebuilding your windows 10 desktop that hold a digital license key there is no piece of paper that tells you the activation key.

with the following command you can read the product key

$service = get-wmiObject -query ‘select * from SoftwareLicensingService’
$service.OA3xOriginalProductKey
$key=$service.OA3xOriginalProductKey

this is handy for getting the key but when you are deploying a WDS image and everything needs to be unattended you will need a little PowerShell script

As an option there to place a different key for if you are in a mixed environment.

$service = get-wmiObject -query ‘select * from SoftwareLicensingService’
$service.OA3xOriginalProductKey
$key=$service.OA3xOriginalProductKey
$service.InstallProductKey($key)

$service = get-wmiObject -query ‘select * from SoftwareLicensingService’
if($key = $service.OA3xOriginalProductKey){
    Write-Host ‘Activating using product Key:’ $service.OA3xOriginalProductKey
    $service.InstallProductKey($key)
}else{

    #Write-Host ‘Key not found., use a different license’
       # $service.InstallProductKey(‘Put your License KEY here’)
}

 

Save this as a Powershell script and put this in the unattended.xml and when deploying the Windows 10 will be auto activated

Get the script from the site or from the TechNet gallery.

https://gallery.technet.microsoft.com/Get-windows-10-digital-7653fae4

 

Follow Me on Twitter @ClusterMVP

Follow My blog https://robertsmit.wordpress.com

Linkedin Profile Http://nl.linkedin.com/in/robertsmit

Google Me : https://www.google.nl

Bing Me : http://tinyurl.com/j6ny39w

LMGTFY : http://lmgtfy.com/?q=robert+smit+mvp+blog

Posted March 19, 2017 by Robert Smit [MVP] in Powershell

Tagged with

Windows Server 2016 Setting port priority Adjusting the Network #Protocol Bindings multiple networks #winserv   Leave a comment

When building complex network configurations with Server 2016 you will need to adjust sometimes configuration settings that are not that easily to change in the GUI.

Suppose I have a big S2D cluster Or a NLB farm

In this configuration I have a Cluster that is using Storage spaces direct #S2D but On the SMB nic I don’t want to connect with RDP 

Or in the NLB farm I want to use a NLB nic that is used for RDP.

with the  Get-NetIPInterface we get a listing of the networks

image

Get-NetAdapter shows us the name and nic name

image

Our net step is list the current configuration and his settings for the Ports, in this case RDP

# list current settings
gwmi Win32_TSNetworkAdapterSetting -filter "TerminalName=’RDP-Tcp’" -namespace "root/cimv2/TerminalServices" | Select NetworkAdapterLanaID,NetworkAdapterName

image

ID 0 which is "All network adapters configured with this protocol"

More info about Win32_TSNetworkAdapterSetting can be found here :

https://msdn.microsoft.com/en-us/library/aa383811(v=vs.85).aspx

when we combine this in a variable to get some more info

#show netadapter bindings for RDS

$MVPRDP = gwmi Win32_TSNetworkAdapterSetting -filter "TerminalName=’RDP-Tcp’" -namespace "root/cimv2/TerminalServices"

$MVPRDP | select -expand DeviceIDList

image

As this is the network name it is not that handy use this with the get-netadapter
$MVPRDP | select -expand NetworkAdapterList

image

Now we know what to set on which adapter

# ID 0 which is "All network adapters configured with this protocol". 0,1,2,3

SO ID 0 is all and start counting with 1 as I want RDP only on my MGT lan I set this on Adapter 2

$MVPRDP.SetNetworkAdapterLanaID(2)

image

gwmi Win32_TSNetworkAdapterSetting -filter "TerminalName=’RDP-Tcp’" -namespace "root/cimv2/TerminalServices" | Select NetworkAdapterLanaID,NetworkAdapterName

image

now a little reboot and just to make sure there are no old connections and your done.

 
Or use a register key to set this option but what fun is that.

set HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Terminal Server\Winstations\RDP-tcp\LanAdapter
 

image

Follow Me on Twitter @ClusterMVP

Follow My blog https://robertsmit.wordpress.com

Linkedin Profile Http://nl.linkedin.com/in/robertsmit

Google Me : https://www.google.nl

Bing Me : http://tinyurl.com/j6ny39w

LMGTFY : http://lmgtfy.com/?q=robert+smit+mvp+blog

Posted February 22, 2017 by Robert Smit [MVP] in Windows Server 2016

Tagged with

Replicate Hyper-V virtual machines to #Azure using Azure Site Recovery #ASR #BCDR #winserv #Cloud #MSOMS   Leave a comment

Site Recovery is an Azure service that contributes to your business continuity and disaster recovery (BCDR) strategy. Site Recovery orchestrates replication of on-premises physical servers and virtual machines to the cloud (Azure), or to a secondary datacenter. When outages occur in your primary location, you fail over to the secondary location to keep apps and workloads available. You fail back to your primary location when it returns to normal operations.  Using ASR can be directly from the Azure Portal or Using OMS.

Azure Site Recovery

One or more Hyper-V server, running at least Windows Server 2012 R2 with the latest updates and the Hyper-V role enabled, or running Microsoft Hyper-V Server 2012 R2, with the latest updates. Hyper-V hosts need internet access, and need to be able to access specific URLs directly, or via a proxy.

Individual disk capacity on protected machines shouldn’t be more than 1023 GB. A VM can have up to 64 disks (thus up to 64 TB).

In this case I build a replica between a Hyper-v server and Azure.

In the Azure portal we search for backup.

image         Azure Site Recovery

Picked the Backup and Site Recovery (OMS) and create a Recovery vault. That’s it.. well .. close.

Opening this vault or if you don’t know where it is select the resource group and go from there to the ASR.

Azure Site Recovery

Selecting our ASR vault brings us to the backup and ASR.

Azure Site Recovery

It is a very busy menu and a lot of options are there and still new options may appear. And there are several ways to start with ASR.

 

imageAzure Site Recovery

Selecting the Site Recovery Infrastructure a new menu opens and already there are 3 configs. Hyper-v , vmware or VMM

We do the Hyper-v option.

image

imageAzure Site Recovery

It is all step by step and seams all very easy but you need to take care of some steps before you can complete the steps.

Register your Hyper-V host(s)

On-premises

  1. Make sure the host is running Windows Server 2012 R2 or above.

  2. Download the Agent

  3. the installer for the Microsoft Azure Site Recovery Provider.

  4. Download the vault registration key to register the host in a Hyper-V site

image

This download is replication agent to Azure and need to be installed on the Hyper-v Server

imageAzure Site Recovery

Selecting the Site Recovery and start with Step 1

image

In this step We select our Protection goal select To Azure, and select Yes, with Hyper-V. Select No to confirm you’re not using VMM.

image

We need to create a Site of this hyper-v server. this is a Cosmetic name and points to the Hyper-v server or servers, if this is a Test server then this should be HVtest etc.

Azure Site Recovery

My site is Single Hyper-v server and already there a a few steps I need to install the Agent downloaded earlier and use the vault keys to connect to Azure.Also downloaded here

image

Installing the Hyper-v Agent

Use the Exe just downloaded and follow the steps.

Azure Site Recovery

image

Use a location be careful  if not installing on the C drive and not replication the other drive there can be miscommunication in the VM. Better leave this default.

Azure Site Recovery

But in case You already played with this or want different naming and started all over the may be an issue “ the server is already registered”

image

To fix this error and enable the ASR Provider and agent setup to complete successfully, follow these steps:

  1. Go to the Register
  2. Make a backup of the following registry key:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Azure Site Recovery

Azure Site Recovery

  1. Delete the registry key that you backed up in step 2.
  2. Restart the Provider and agent setup.

Azure Site Recovery

Use the downloaded Keys and import them.

image

Azure Site Recovery

Checking the Register you can see that the key is valid and all the info is there.

Azure Site Recovery

image

And the installation is done. It can take some time to add the server to Azure maybe several hops back and forth to the menu

Azure Site Recovery

 

image

You can see the process running in the Task manager.

 

image

Jumping back and to the step 2 you can see the Hyper-v server is added to the Vault.

Azure Site Recovery

Added a storage account and a network. If this is not the storage account or network you want no worry you can change this befor the replication starts.

image

Check this if you want a new account or different network.

Azure Site Recovery

Next step would be creating a replication policy.

image

  1. In Create and associate policy specify a policy name.
  2. In Copy frequency specify how often you want to replicate delta data after the initial replication (every 30 seconds, 5 or 15 minutes).
  3. In Recovery point retention, specify in hours how long the retention window will be for each recovery point. Protected machines can be recovered to any point within a window.
  4. In App-consistent snapshot frequency specify how frequently (1-12 hours) recovery points containing application-consistent snapshots will be created. Hyper-V uses two types of snapshots — a standard snapshot that provides an incremental snapshot of the entire virtual machine, and an application-consistent snapshot that takes a point-in-time snapshot of the application data inside the virtual machine. Application-consistent snapshots use Volume Shadow Copy Service (VSS) to ensure that applications are in a consistent state when the snapshot is taken. Note that if you enable application-consistent snapshots, it will affect the performance of applications running on source virtual machines. Ensure that the value you set is less than the number of additional recovery points you configure.
  5. In Initial replication start time specify when to start the initial replication. The replication occurs over your internet bandwidth so you might want to schedule it outside your busy hours.

Azure Site Recovery

As you can see the policy’s are applied but you can create multiple but you can use only one at each site.

image

Site Recovery performs optimally when sufficient network bandwidth and storage are provisioned. Allocating insufficient capacity can lead to replication issues. Site Recovery provides a capacity planner to help you allocate the right resources for your source environment, the site recovery components, networking and storage. You can run the planner in quick mode for estimations based on an average number of VMs, disks, and storage, or in detailed mode in which you’ll input figures at the workload level.

Get the Azure Site Recovery Capacity planner here : Download

 

Azure Site Recovery

A quick overview of the Azure Site Recovery Capacity planner

If you skip this or thinking this will be fine I’ll show you later what can happen.

imageNow that all steps are completed in the ASR infrastructure we can start with step 2.

Azure Site Recovery

The replication can’t be Throttled only for backup operations you can Enable internet bandwidth usage throttling.

image

Selecting the Right networks for the replicated VM’s and subnets and the correct Storage account.

 

image

Next is selecting what VM’s I need to replicate. If there is no VM list then there is something wrong with your connection.

Azure Site Recovery

As my DPM machine has a disk larger than 1023 GB this can’t be replicated.

image

image 

Selecting a few VM’s you can see even the names can be changed to the right Azure style or if there a characters in the name that are not supported.

Azure Site Recovery

In the old days you could only replicated one disk but now 64 Disks are supported. and you can select what disk you want and what to skip.

image

After these final steps we are ready to replicate

imageimage

In a quick overview we can start the replication.

image

the replication is started and as you can see here comes the ASR Capacity planner.

Azure Site Recoveryimage

imageAzure Site Recovery

OK this seams to be an issue for my other running VM’s on this hyper-v server.

image

Checking the Hyper-v server you can see the progress there or in Azure

Azure Site Recovery

Azure Site Recovery

image

But As ASR is using ASR you can also drill down on the replica options.

image

When the replica is done you can change the Azure VM in any way change the network , VM size the VM can be better than on prem.

image

As ASR stands for recovery you can do a test failover or planned. As you are not using VMM the Azure portal is the Orchestrator for the Failover.

Azure Site Recovery

Testing the VM is easy a you can run the VM Side by Side and you can change all the settings. A great option to get started with Azure.

Follow Me on Twitter @ClusterMVP

Follow My blog https://robertsmit.wordpress.com

Linkedin Profile Http://nl.linkedin.com/in/robertsmit

Google Me : https://www.google.nl

Bing Me : http://tinyurl.com/j6ny39w

LMGTFY : http://lmgtfy.com/?q=robert+smit+mvp+blog

Posted February 7, 2017 by Robert Smit [MVP] in Azure Site Recovery

Tagged with

Windows Server 2016 With Hyper-v Yellow exclamation on Microsoft Virtual Machine Bus #winserv #HyperV #Windows   Leave a comment

Don’t you love it when you are running Hyper-v and you can adjust the VM en reboot your cluster and everything is redundant.

Well except the VM after a reboot of the VM it has a Yellow exclamation on Microsoft Virtual Machine

clip_image002 clip_image002[4]

So it seems the VM integration services is not there at all.  and the Update-VMVersion VMNAME –Force is not helping

image 

So this seems like an old issue but it isn’t tried to delete the network keys in the register and no results.  BUT DON’T DO that !!

image

All my VM’s are running the latest patches could this be the issue ? recently there is KB3216755 which has some issues with DeDupe https://support.microsoft.com/en-us/help/4011347/windows-10-update-kb3216755

Placed a snapshot back from before the updates and guess what Same issue eh.. so it is not the VM ? can it be the Hyper-v Server it self ? Patched this server before the VM’s a few days ago.  

image Ok my hyper-v server is not sleeping Winking smile

But checking the problem VM’s I see something unusual why is the VM sitting on his default memory. I use Dynamic memory and the startup memory is 512 MB yes it is low but still ?

image

Odd why <> well there is no network so basically the VM does nothing

image

changed it and this was working on 1 VM so still no solution.

image

the one that worked is delete the Network Adapter in the VM settings, Boot the VM <>shutdown.

Add the Nic’s and boot the VM and you are ready to go. 

image

Well you need to reconfig the network adapter again. but that are just a few Powershell Lines.

Hope this helps you solving your issue

 

Follow Me on Twitter @ClusterMVP

Follow My blog https://robertsmit.wordpress.com

Linkedin Profile Http://nl.linkedin.com/in/robertsmit

Google Me : https://www.google.nl

Bing Me : http://tinyurl.com/j6ny39w

LMGTFY : http://lmgtfy.com/?q=robert+smit+mvp+blog

Posted January 31, 2017 by Robert Smit [MVP] in Windows Server 2016

Tagged with

Deploy a Software Defined Network infrastructure using VMM SDN Express #SCVMM #SDN #Sysctr   Leave a comment

As VMM is a great tool to deploy VM with and with Windows Azure Pack it has a central role, but now in Azure Stack there is no place for VMM.

Unless you are using it to deploy VM’s for Software defined networking RRAS,SLB,Network Controllers, Storage Spaces Direct, SOFS. So plenty of options there. Recently on the Github site Microsoft placed some SDN templates for VMM called VMM Express. these templates are a perfect start for a Network Controller,RAS Gateway for SDN or Software Load Balancing (SLB) for SDN.

 

System Center 2016 Virtual Machine Manager (VMM) can be used to deploy and manage a Software Defined Network (SDN) infrastructure.

SDN virtualizes your network to abstract physical hardware network elements such as switches and routers. Using SDN you can dynamically manage your datacenter networking to meet workload and app requirements. Network policies can be implemented consistently, at scale, even as you deploy new workloads, or move workloads across virtual or physical networks.

If you deploy SDN in the VMM fabric you can:

  • Provision and manage virtual networks at scale.
  • Deploy and manage the SDN infrastructure, including network controllers, software load balancers, and gateways.
  • Define and control virtual network policies centrally and link them to your applications or workloads. When your workload is deployed or moved, the network configuration adjusts itself automatically. This is important because it removes the need for manual reconfiguration of network hardware, thereby reducing operational complexity while saving your valuable resources for higher-impact work.
  • Control traffic flow between virtual networks, including the ability to define guaranteed bandwidth for your critical applications and workloads.

SDN combines a number of technologies, among them:

  • Network Controller:The network controller allows you to automate configuration of your network infrastructure, instead of manually configuring network devices and services.
  • RAS Gateway for SDN: RAS Gateway is a software-based, multitenant, BGP capable router in Windows Server 2016 that is designed for CSPs and Enterprises that host multiple tenant virtual networks using HNV.
  • Software Load Balancing (SLB) for SDN: (SDN) in Windows Server 2016 can use Software Load Balancing (SLB) to evenly distribute tenant and tenant customer network traffic among virtual network resources. The Windows Server SLB enables multiple servers to host the same workload, providing high availability and scalability.

 

There are just a few easy steps to start with.

You can create or download a prepared virtual hard disk in vhd or vhdx format.  Import the vhd/vhdx files to the VMM library.

And now the best part you will need VMM Express for this VMM SDN Express these files are on github download it and extract it an import this on your VMM library.

image 

Now that the files are on the VMM library we can import the templates

image Check the import Template and navigate to the extracted VMM Express Files.

image

For Creating Certificates I used the Selfsigned option as below

$cert = New-SelfSignedCertificate -KeyUsageProperty All -Provider "Microsoft Strong Cryptographic Provider" -FriendlyName "MultiNodeNC" -DnsName @("192.168.2.34") Export-Certificate -Cert $cert -FilePath c:\MultiNodeNC.cer $PlainPassword = "123456" $SecurePassword = $PlainPassword | ConvertTo-SecureString -AsPlainText -Force Export-PfxCertificate -Cert $cert -FilePath c:\MultiNodeNC.pfx -Password $securepassword -ChainOption BuildChain copy C:\MultiNodeNC.pfx \\localhost\MSSCVMMLibrary\ServerCertificate.cr\ copy C:\MultiNodeNC.cer \\localhost\MSSCVMMLibrary\TrustedRootCertificate.cr\ copy C:\MultiNodeNC.cer \\localhost\MSSCVMMLibrary\NCCertificate.cr\

imageimage

Now that the Template is loaded is shows a interim mode first you have to reconnect the template items to your library.

image

The items with out the X mark you need to reconnect. as the name is different than in my library like winserver.vhdx is now ws2016,vhdx.

this is a one time step only! pick the right image and files. As you can see there are several steps that we must for fill to complete the template

imageimageimage

Now that all the steps are Completed the Template is ready for deployment in VMM

image

As I imported all the VMM SDN templates, keep in mind that there are two types V1 ( gen 1) and V2 ( gen2 ) vm’s you can’t mix them and you need the right VHDX for this

image

Next step is deployment.

Opening the template in the designer you can see what is deployed and the instance count you can change and some hardware changes unless they have dependency’s then you will need to change the XML before the import. But test first with sample template before create your own and ends up in a failure.

image

imageimage

Starting the deployment right click on the template.

image

The first question is pick a name and choose your management network. Remember this name is later been used in the connection string.

image

the next step is give all the template variables a value and start the deployment

image

I used

image

Run this on a Hyper-v Host with plenty of memory the basic VM’s are consuming 8 GB per VM and default not dynamic. learned from that.

 

Then click the button “Refresh”. Now you could click the button “Deploy Service”.

imageimage

Now that the VM’s are deployed and are up and running ( check your job log in VMM ) We can add a Network Services

imageimage

image This is almost next next Finish.

Next step seems always difficult what is my connection string samples are given but how do I use it ?

image

well you need a Server Url in this case it is the IP address that is used as restendpoint earlier.
serverurl=https://192.168.20.34;SouthBoundIPAddress=192.168.20.34;servicename=Sample NC01

image

The connection string is in place and testing

image image

Select a host to place this.

Next step is creating a logical network for network virtualization.

Create a new logical network

image 

image

Check the box Managed by Network controller.

image

Add a network to the Logical network ( use your own network and VLAN)

imageimage

This is just like any other Logical network Fill in the address space and Gateway with DNS

image

imageimage

Done NOW yes another step is add this network to the Hyper-v Switch

image

Adding the network to the Hyper-v switch so you can use the network in the VM’s as you can see there are a lot of networks and IP/ Vlans involved.  befor you start create a test and see how all the IP’s will fit in your environment. Make a design of the IP’s

Just create a new VM network and use this for the VM’s that are running in the network.  Next time I will go deeper into the usage and where the VM’s live.

image

 

The VMM express templates a re a great way to start but the network part is always a pain there is no easy wizard that creates it all for you. eh powershell. hope this is helpful , it helped me during the blog building rebuilding and maybe I forgot something in the blog I rebuild this several times and run out of compute on my hyper-v server, guess I need a bigger server( more memory)

But you will need to test this But there are great guidance’s on the Microsoft site and even a great video tutorial for deploying a network controller.

https://channel9.msdn.com/blogs/hybrid-it-management/demo-deploy-network-controller

 

Flickr Tags: Windows Server 2016,CloudOS

Follow Me on Twitter @ClusterMVP

Follow My blog https://robertsmit.wordpress.com

Linkedin Profile Http://nl.linkedin.com/in/robertsmit

Google Me : https://www.google.nl

Bing Me : http://tinyurl.com/j6ny39w

LMGTFY : http://lmgtfy.com/?q=robert+smit+mvp+blog

Posted December 30, 2016 by Robert Smit [MVP] in SDN

Tagged with ,

Building a Windows Server 2016 Domain Controller #winserv #Hybrid #cloud #Azure #powershell   Leave a comment

Building a Domain Controller is not that Difficult but what about building this with Powershell and use the 2016 Bits.

Well lets take a peek at the Technet site https://technet.microsoft.com/en-us/library/hh974720(v=wps.630).aspx nothing about 2016.

-DomainMode<DomainMode>

Specifies the domain functional level of the first domain in the creation of a new forest. Supported values for this parameter can be either a valid integer or a corresponding enumerated string value. For example, to set the domain mode level to Windows Server 2008 R2, you can specify either a value of 4 or Win2008R2. So

The following are the supported values:
     — Windows Server 2003: 2 or Win2003
     — Windows Server 2008: 3 or Win2008
     — Windows Server 2008 R2: 4 or Win2008R2
     — Windows Server 2012: 5 or Win2012
     — Windows Server 2012 R2: 6 or Win2012R2

Well it makes sense that the Next line would be  — Windows Server 2016: 7 or Win2016

Le me try that in Azure.

First I deploy the windows feature Active Directory

Install-windowsfeature AD-domain-services -IncludeAllSubFeature –IncludeManagementTools

The next step would be Deploy Active Directory and at the end you will be asked for a recovery password.

Install-ADDSForest `
-CreateDnsDelegation:$false `
-DatabasePath "C:\Windows\NTDS" `
-DomainMode "7" `
-DomainName "mvpdemo01.local" `
-DomainNetbiosName "mvpdemo01" `
-ForestMode "7" `
-InstallDns:$true `
-LogPath "C:\Windows\NTDS" `
-NoRebootOnCompletion:$false `
-SysvolPath "C:\Windows\SYSVOL" `
-Force:$true

I did a Force:$true So a reboot is following so no time for a screenshot and wait for things.!

But After the reboot you will have a DC

image

and Joining a DC Member : Add-WindowsFeature AD-Domain-Services

Install-windowsfeature AD-domain-services -IncludeAllSubFeature –IncludeManagementTools

Add-WindowsFeature AD-Domain-Services `
-CreateDnsDelegation:$false `
-DatabasePath "C:\Windows\NTDS" `
-DomainMode "7" `
-DomainName "mvpdemo01.local" `
-DomainNetbiosName "mvpdemo01" `
-ForestMode "7" `
-InstallDns:$true `
-LogPath "C:\Windows\NTDS" `
-NoGlobalCatalog:$false `
-NoRebootOnCompletion:$false `
-SysvolPath "C:\Windows\SYSVOL" `
-Force:$true

 

Joining a Member server

I created a noob account that is only allowed to join a server to the domain

 

Write-Host "Hostname / Node Names" -ForegroundColor yellow
$domain = "mvpdemo01.local"
$password = "Password01" | ConvertTo-SecureString -asPlainText -Force
$username = "$domain\noob"
$credential = New-Object System.Management.Automation.PSCredential($username,$password)
Add-Computer -DomainName $domain -Credential $credential
restart-computer -force

image

See how easy things can be.

 

 

Flickr Tags: Windows Server 2016,CloudOS

Follow Me on Twitter @ClusterMVP

Follow My blog https://robertsmit.wordpress.com

Linkedin Profile Http://nl.linkedin.com/in/robertsmit

Google Me : https://www.google.nl

Bing Me : http://tinyurl.com/j6ny39w

LMGTFY : http://lmgtfy.com/?q=robert+smit+mvp+blog

Posted November 1, 2016 by Robert Smit [MVP] in Windows Server 2016

Tagged with

Upgrading Hyper-v Server 2012R2 to Server 2016 now what ? #hyperv #winserv #RollingOS   2 comments

So you have done a rolling Upgrade – see Cluster operating system rolling upgrade To all your Hyper-V servers but other than a different logon screen you see no difference. Where are all the options ? Well you will need to do some extra steps. To get the full Hyper-v 2016 Server.

Illustration showing the three stages of a cluster OS rolling upgrade: all nodes Windows Server 2012 R2, mixed-OS mode, and all nodes Windows Server 2016

All the VM options are the Same Did I miss something or is there another configuration option as I created a new VM it has all the new options.

Do I need to recreate all the VM’s ?, where is the hidden option to change this ? a while a go I created a blog post on

Windows Server 2016 with Hyper-v Upgrading Configurations —Windows Server 2016 with Hyper-v Integrations tools & configuration versions

Well this was still on a TP version so the numbers has changed but not the methods. But there is no gui option in the Hyper-v Server that can flip the bit to the new Configuration version. It is done only by Powershell. with that Let us see how this is changed.

image image

Old VM settings vs the New VM Settings.

Do I need to recreate all the VM ? NO are you nuts. this would be odd. Lets dive in a little bit deeper.

In the Hyper-v Manager you can see the configuration and generation version in the 2012R2 this is version 5.0

image

In windows server 2016 the Hyper-v configuration version is now 8.0

image

With the get-VM we can see the Configuration version of the VM

Get-VM | ft Name, IntegrationServicesVersion,version 

image

as you can see I have a version 5.0 and a 8.0 just as in the screen shots above.

Now changing this is a ONEWAY thing and If you have an OLD none 2016 version in your Cluster then the VM would fail if it runs on this node. Version 8.0 runs only on Hyper-V 2016 !

To list all the Supported Configurations On this Server we can do a “ Get-VMHostSupportedVersion “

 

image

So there are Currently seven different versions. With all the options why should I care setting this.

Well there are a couple of reasons why you should set this option. Make the latest Hyper-V features available on your virtual machines by upgrading the configuration version. Don’t do this until:

  • You upgrade your Hyper-V hosts to the latest version of Windows or Windows Server.
  • You upgrade the cluster functional level.
  • You’re sure that you won’t need to move the virtual machine back to a Hyper-V host that runs a previous version of Windows or Windows Server.

And you you replicate from a Hyper-v 2016 Server to a Hyper-v 2012 Server for DR then make sure you don’t run in a higher version than 5.0

When you move or import a virtual machine to a computer that runs Hyper-V on Windows Server 2016 or Windows 10, the virtual machine’s configuration isn’t automatically updated. This means that you can move the virtual machine back to a Hyper-V host that runs a previous version of Windows or Windows Server. But, this also means that you can’t use some of the new virtual machine features until you manually update the configuration version. You can’t downgrade the virtual machine configuration version after you’ve upgraded it.

The virtual machine configuration version represents the compatibility of the virtual machine’s configuration, saved state, and snapshot files with the version of Hyper-V. When you update the configuration version, you change the file structure that is used to store the virtual machines configuration and the checkpoint files. You also update the configuration version to the latest version supported by that Hyper-V host. Upgraded virtual machines use a new configuration file format, which is designed to increase the efficiency of reading and writing virtual machine configuration data. The upgrade also reduces the potential for data corruption in the event of a storage failure

Building a VM based on Windows 2012R2 configuration You should use this PowerShell command as you could see the 8.0 Configuration is default.

New-VM -Name “DemoVM17” -Version 5.0

When listing the VM Configurations you can see the difference. and easily see the 5.0 Version VM’s  config.XML

Virtual machine configuration information that is stored in binary file format. File name extension: .vmcx

image

But what if I want to upgrade the VM’s ? yes you can but only to the default level and PowerShell Only

Update-VMVersion “VM Name”

image

as you can see the DemoVm06 is already at the max level but when updating the DemoVM01 which has Version 5.0 it will be upgraded to Version 8.0 and the Config file will be transferred this can’t be undone!

Virtual machine configuration information that is stored in binary file format. File name extension: .vmcx

you can automate this and do all upgrades in onetime or have a pick list to do this. But the VM needs to be OFF no running VM can be upgraded.

TO upgrade all VM’s   Update-VMVersion * -force

Or pick the VM by yourself with a before and after version.

#Select a VM to upgrade
$vm2016= (Get-VM | select Name, Status, version | Out-GridView -Title "Select VM for update the configuration version" -PassThru).Name
#list VM configuration Version
Get-VM $vm2016 | ft Name, IntegrationServicesVersion,version 
#Convert the Config TO the default Configuration
Update-VMVersion $vm2016 -Force -Verbose
#list VM configuration Version
Get-VM $vm2016 | ft Name, IntegrationServicesVersion,version 

image

 

 

Flickr Tags: Windows Server 2016,CloudOS

Follow Me on Twitter @ClusterMVP

Follow My blog https://robertsmit.wordpress.com

Linkedin Profile Http://nl.linkedin.com/in/robertsmit

Google Me : https://www.google.nl

Bing Me : http://tinyurl.com/j6ny39w

LMGTFY : http://lmgtfy.com/?q=robert+smit+mvp+blog

Posted October 31, 2016 by Robert Smit [MVP] in Windows Server 2016

Tagged with

  • Twitter

  • %d bloggers like this: