HyperV local storage available for placement in SCVMM

I have been working with a customer and was going to do an upgrade of one of their Hyper-v clusters to 2012 R2. During my preparations and looking at the particular hosts I found several VM´s that was residing on local storage on the hosts and not on the cluster storage.

The reason for this was two things, first of all that it was allowed to put VM´s on local disks and second that when someone created the VM´s forgot to use the appropriate HW-template that makes them highly available by default. If you create a new VM with a new HW profile make sure that it is configured correctly under the Availability tab.

The Hyper-V hosts have been deployed with Bare-Metal deploy from VMM and that is why they have a D:\

Looking at the properties for a host you can see what storage that is available for placement:

Screen Shot 2015-01-28 at 14.26.28

and as you can see the VM is not configured as highly available and have the virtual disk on local storage:

Screen Shot 2015-01-28 at 14.33.41
Screen Shot 2015-01-28 at 14.20.24

I have made a simple script that configures all hosts within a cluster and set all storage that is not cluster shared to not available for placement.

And now when trying to deploy a VM with a new HW profile that is not set to highly available I cannot deploy it as the local disks have been unchecked as available for placement.

Screen Shot 2015-01-28 at 13.57.04
Screen Shot 2015-01-28 at 13.58.09

The reason for just configuring this for hyper-v nodes that belong to a cluster is that there might be a single hyper-v host that actually should be able to provision the VM to local disks.

Configuring VMM logical switch with bandwidth limit virtual port

I got a question from a customer how they could limit a VM´s bandwidth from VMM as it was too noisy and devoured the bandwidth from the host for the other VM´s. There are both a way to set priority and also bandwidth in Hyper-V 2012 and later.

In Hyper-V Manager you can find the setting on the VM´s configuration and the virtual network adapter tab,

Screen Shot 2015-01-16 at 16.15.32

And here I can enable bandwidth management and set both a minimum and maximum, and in this case I want just a limit

Screen Shot 2015-01-16 at 16.15.13

But how do I accomplish the same in VMM? As you might have noticed there is no possibility to edit this on the VM´s settings on the virtual nic, this is a setting that I configure with a Port profile instead and apply on selected VM/VM´s, and by doing it this way I can easily just configure the same profile for several VM´s instead of configuring each VM. There are some configured by default and I can also add new with the particular setting that I need.

First there is the port classification:

Screen Shot 2015-01-17 at 15.49.49

And then the actual port profiles:

Screen Shot 2015-01-17 at 15.48.26

These two combined is used in the Logical Switch for the virtual port,

Screen Shot 2015-01-19 at 11.45.23

Easiest is to use Powershell to create a new port classification and profile and then update the logical switch to be able to use it for the VM´s that needs it, I have made a function that takes care of all the steps including adding it to the logical switch as a virtual port:

Screen Shot 2015-01-19 at 11.54.28

And also a function for removing, in this I check the VM´s connected and moving them to the default port profile before removing it,

Screen Shot 2015-01-19 at 11.55.18

Probably there will be some updates to this in the future but here you can see and test for your own needs :-)  I will now start to test some bandwidth flooding to see that it actually limits the VM´s

 

 

 

All VM´s reporting: “Unsupported Cluster Configuration” in VMM

Today I was contacted by a customer regarding an issue they had with all their VM´s in their main cluster reporting “Unsupported Cluster Configuration”

The reason was that two of the nodes in their cluster had in VMM 2012 R2 lost their virtual switch and vnics and that resulted in the cluster saying that it did not have a HA-Virtual Switch and thus the VM`s had network connections that was not available on the cluster…

Screen Shot 2015-01-12 at 14.11.41

Searching a bit and checking the hosts and VM´s outside of VMM there was no issues on them and the logical switch and vnics was still there, the vm´s was able to reach the network so clearly a VMM issue.

I tried to refresh the cluster and nodes and also restart the VMM agent on the hosts but that did not help. Looking at the properties in VMM on a host showed nothing where it should be both the switch and the management vnics:

Screen Shot 2015-01-07 at 20.41.48

Using the failover cluster manager and live-migrating the vm´s and then restart the host did though help,

After reboot I refreshed the cluster and the network appeared again, I have been searching for a reason for the issue but have not found anything yet in the logs on either the VMM server or the hosts..

To refresh the VM´s on the cluster to remove the “Unsupported cluster configuration” after I had got the virtual switch back I used powershell

Screen Shot 2015-01-12 at 20.21.12

If you have had this issue or similar I would like to know so please comment the post :-)

I will search some more and see if I can find the reason for this. It should be said that the customer have two 2012 hyper-v clusters and one 2012 R2 cluster and I have not seen this happen on the R2 cluster yet so maybe it is a 2012 issue… And yes we are working eagerly to move the VM´s to the R2 cluster 😛 , the VMM 2012 R2 server is also updated with the latest UR4

 

 

Error 25122 when doing refresh in VMM 2012 R2 UR3->

There is no better way than to start the year and enlighten you with a error I had this autumn at a customer…

After I updated the VMM server to UR3 at a customer I noticed that it started to give a warning (Completed w/ Info) during refresh of the cluster. And when digging into it you can see the reason for it…

Screen Shot 2015-01-07 at 19.45.26

When I set up the Hyper-V cluster I did it outside of VMM, I had though set up the hosts with logical switches and host vNics in VMM network fabric and the different cluster networks was configured with IP-Pools. And for the record, the VMM server have been upgraded from 2012 SP1.

So what was the reason for this, well when I did the cluster setup I used an IP from the Management-IP pool range for the cluster management and had not reserved it, yes I know I should have taken care of it then but did not…

Consensus is that from UR3 the VMM team has fixed the bug and now it reports this when doing a refresh on the cluster object 😛

So how did i mitigate this issue?! I searched and found a german blogpost by Michel Luescher where he solves the issue with powershell, and as you can see when reading the lines is that we find the IP-address object that is of the wrong type and change it to a HostCluster object instead:

Luckily PowerShell is in english so I could understand that part 😉 as my knowledge in the german language is a bit narrow..

 

 

Renewed as a HyperV MVP for the first time

One year passes so fast and today was the day when it was my renewal date for the Microsoft Most Valuable Professional award. This is my second time that I get the award!

I have been working quite hard in the communities during the year with live presentations, webcasts, blog posts etc and was hoping that it was enough. In the afternoon I got a bit nervous and started thinking that maybe there was someone else that have made a bit more contributions and took my place but,

At the magic time 04:29 PM CET I got the longing mail :

Screen Shot 2015-01-01 at 17.02.08

 I am in good company with about 50 other Hyper-V MVP´s and learn stuff every day from my friends and expertise-colleagues and 2015 will ROCK, so see you around and most certainly at Ignite in Chicago in May!

keep following my blog and twitter and I will try to keep up and post information and help when I encounter problems or smart solutions that you can benefit from :-)

Passed the 70-533 Azure Infrastructure exam

Today I had registered for a second try of the 70-533 Azure Infrastructure exam, two weeks ago I tried this exam and failed, this time it was a bit more successful and I passed.

10730209_10152601828053549_8289323616528117668_n

The first time doing the exam I was thinking that my knowledge in Azure would be enough but I was a bit wrong 😛

These last two weeks since my last try I have been studying and exploring the features and documentation on Azure and it is a seriously complex and full-featured cloud platform!

I will in this post give you some advice on what areas I have been studying if you are also aiming for taking this test..

First of all, you can see on the Microsoft Learning page on what areas that is covered in the exam,

Screen Shot 2014-12-30 at 22.15.01

I have used Azuremans blog post about the exam topics, Marius has also made a blog post about the exam and what to read and learn.

I have also used the Microsoft Virtual Academy : Establish Microsoft Azure IaaS Technical Fundamentals course.

Some of the links to Azure documentation and blog post that I have gone through during my hours of learning :

http://up2v.nl/2014/03/05/windows-azure-now-allows-to-set-fixed-ip-addresses-for-virtual-machines/

http://www.codemag.com/Article/1403071

http://blogs.msdn.com/b/asgoyal/archive/2013/07/16/linking-a-resource-to-your-cloud-service-what-does-that-mean.aspx

http://msdn.microsoft.com/en-us/library/azure/dn376543.aspx

http://msdn.microsoft.com/en-us/library/dn741337.aspx

http://justazure.com/azure-blob-storage-part-one-introduction/

http://msdn.microsoft.com/en-us/library/azure/dn683781.aspx

http://azure.microsoft.com/blog/2014/08/05/azure-site-recovery-enables-one-click-orchestrated-failover-of-virtual-machines-to-azure/

http://msdn.microsoft.com/en-us/library/azure/dn197896.aspx

http://www.asp.net/aspnet/overview/developing-apps-with-windows-azure/building-real-world-cloud-apps-with-windows-azure/automate-everything

http://azure.microsoft.com/en-us/documentation/articles/web-sites-scale/#scalingstandard

http://msdn.microsoft.com/library/azure/jj156007.aspx

http://msdn.microsoft.com/library/azure/dn643636.aspx

http://msdn.microsoft.com/en-us/library/azure/dn306639.aspx

http://blogs.iis.net/webtopics/archive/2009/06/12/troubleshooting-a-simple-error-message-using-freb.aspx

https://www.digicert.com/ssl-certificate-installation-azure-website.htm

http://msdn.microsoft.com/en-us/library/azure/dn499820.aspx#BKMK_Auth

http://azure.microsoft.com/en-us/documentation/articles/cloud-services-how-to-monitor/

http://azure.microsoft.com/sv-se/documentation/articles/web-sites-staged-publishing/

http://blogs.msdn.com/b/windowsazurestorage/archive/2013/12/04/introducing-read-access-geo-replicated-storage-ra-grs-for-windows-azure-storage.aspx

http://azure.microsoft.com/en-us/documentation/articles/web-sites-configure/

Good luck in your pursue for the Azure certification!

 

New sponsor on my blog 5Nine Software

I have got the pleasure to get a new sponsor for my blog and that is the company 5Nine Software that makes some cool products for Hyper-V

5ninelogo

 The products they have

  • 5Nine Hyper-V Manager – a great christmas sale with 25 % right now!
  • 5Nine v2v converter
  • 5Nine Cloud Security

And these are also available as free versions with some limits but still great stuff

check out their web!  www.5nine.com

Get and Set powerplan on Windows Hyper-v 2012 R2 Core

In my work on Hyper-V i have been looking at the performance of the hosts and wanted to both check and also be able to set the powerplan. In this post from Scripting Guys, Ed explains how to use CIM for the action to get and set the Power plans and how much faster that is than using WMI.

I have since Windows Server 2008 R2 tried to have the Core version as a best practice when running Hyper-V and in some cases it requires some extra skills and arguments during deployment and management 😉

The interesting part is that it differs between the full version and core as you can see that when I try to use Get-Cim from a Windows 2012 R2 full it works and I can see the different powerplans and also which one is active:

Screen Shot 2014-12-02 at 11.15.25

but when I try in a Windows Server 2012 R2 Core I get the following error “Provider load failure”, I have tried locally on the core and also remote so no difference there. My knowledge about WMI is a bit limited but a quick search says that it might be some missing or  corrupt files but I have tried 3 different servers installed with core so I would say it is something with missing!

Screen Shot 2014-12-02 at 11.33.01

As I want to be able to both check and set the right power plan centrally I have created two PowerShell functions that utilize the Powercfg.exe command within a invoke-command thus this works in Windows Server 2012 R2 Core. I am using regex for getting the active plan and the guid. The Set-PowerPlan can either use switch arguments or an actual Guid.

Screen Shot 2014-12-02 at 20.26.42

My friend and fellow Hyper-V MVP Didier WorkingHardInIT has made a blog post about live migration and why using “High performance”.

If you have any input or ideas how this could be improved or if you got it to work in core with CIM :-)

Update 20150108

There is a workaround for this, PowerShell MVP Alexandar Nikolic gave me the link to the connect site which shows the following way to get it to work natively in core by copying the missing files:

# Either copy missing files
dir c:\windows\winsxs -inc wcl.dll,slr100.dll,wclpowrprof.dll -rec -EA 0 |
copy -Dest C:\windows\system32 -verbose

# see http://p0w3rsh3ll.wordpress.com/2014/12/28/fixing-a-wmi-provider-load-failure

VMM agent disappeared on hyper-v host during update

This week I was working with a customer environment and after successfully upgraded their test VMM environment to UR4 it was now time for the production environment.

The UR4 installation went fine and without issues. After that I wanted to update the agents on the Hyper-V hosts. I used PowerShell of course and all agents except one was successfully updated and started reporting to VMM.

I started to examine the one that failed and could see in jobs that it had timed-out:

Screen Shot 2014-11-28 at 15.50.15

And checking on the host I could see that the uninstall of the old agent had been done as the vmm agent service was gone. As this was a hyper-v host in a cluster and the cluster was slightly over allocated I could not remove the node from vmm and then add it in again so,

Screen Shot 2014-11-28 at 15.43.50

Based on this post I went for the way to try to do a manual install on the host and copied the latest agent that i could find in the vmm folder C:\Program Files\Microsoft System Center 2012\Virtual Machine Manager\agents\Amd64\3.2.7768.0 to the host c:\temp

Screen Shot 2014-11-28 at 15.43.10

Important during the installation wizard was to let the perimiter host dialog checkbox to be unchecked as this was a host already in vmm and also in the same domain.

Screen Shot 2014-11-28 at 15.44.42

And doing a check on the services after the install was finished I could see that the VMM agent was installed and now running

Screen Shot 2014-11-28 at 15.45.36

Once that was completed I could do a refresh in VMM and the host was reporting again and could be managed :-)

Look twice when deploying VM´s in VMM or get the wrong vhdx

Today I have been working with some updates on a customers Hyper-V environment and their host images (that I use for bare-metal deploy). The VMM server has all the updates with VMM 2012 R2 UR4 and also Windows Server with November update, although this issue goes further back than that and based on Brian Ehlert´s post you can see that it is by design :-)

I wanted to deploy the vhdx to a host to update with settings and windows updates. In my library it looked as following and i right clicked on the marked vhdx and selected create VM.

Screen Shot 2014-11-28 at 14.42.07

But when I had deployed it and started working on it with patching and configuring, somethings did not seem to be right, and looking in the folder of the newly created vm revealed this:

Screen Shot 2014-11-28 at 14.52.43

As you can see it is the old vhdx that has been copied from the library, initially I thought that I maybe selected the wrong vhdx and recreated another VM with the exact same result!

Why did this happen? Well as I mentioned above with Brians post, this is because I have not changed the details with family name and version of the VHDX objects in the VMM database so it just selects one that seems to be right based on the inital request. wrong or right?

If it is by design, then I would say that it should show in the wizard and not as you see I get!

In the wizard and the HW tab it seemed like I had the right vhdx, and also when continuing to the next view and review stage of the provisioning phase, you can see that it said right library resource and also in the bottom with the file name it looked correct,

Screen Shot 2014-11-28 at 14.43.44

but when I investigated things a bit further and checked the whole path of the source it revealed the nasty _old.vhdx

Screen Shot 2014-11-28 at 14.45.00

And after I pressed “Browse” and selected the right VHDX and started the deploy everything worked as intended..

Screen Shot 2014-11-28 at 14.45.38

So what is the lesson here? Either clean up your old vhdx version in the VMM library or set the version and family name differently and that not only in the end of the filename :-)

Happy WVMMeekend!