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:
and as you can see the VM is not configured as highly available and have the virtual disk on local storage:
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.
# Disable all Available for placement on local drives on hosts,
# Save this in a .ps1 file and run with disable-SCLocaldisk.ps1 -Cluster " cluster01"
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,
And here I can enable bandwidth management and set both a minimum and maximum, and in this case I want just a limit
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:
And then the actual port profiles:
These two combined is used in the Logical Switch for the virtual port,
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:
This function is for creating profiles and adding a port in a Logic switch in VMM
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:
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,
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
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.
And doing a check on the services after the install was finished I could see that the VMM agent was installed and now running
Once that was completed I could do a refresh in VMM and the host was reporting again and could be managed 🙂
First of the changes gives for some reason duplicates of each file url from the web page I collect the download url´s I want to download and to get around that I use the superduper cmdlet and parameter Select-Object -Unique which gives me an array with all files just once 😉
Secondly with Invoke-WebRequest PowerShell uses IE under the hood and I get this dialogue and to get rid of that i use -BasicParsing and that lets PowerShell use its own parser.
And as you saw in the above screendump I utilize Switch parameters so you can choose which of the roles you want and here you can see the script and copy to your own lab server and start downloading to test!
And by the way, make sure that you either have enough storage available on C: or what drive and folder you want to save it to with the -Dest parameter!!
And as you can see I managed to add the vCenter Server and after adding a ESXi host the view in VMM looks like this
Checking it in PowerShell, I can see that it looks and reports in the same manner as the 5.1 vCenter that I have registered
And after some VM massage I can see that basic tasks as starting, stopping and also taking snapshots works as intented through the vCenter 5.5.
Of course new features introduced in vCenter 5.5 and ESXi 5.5 for the VM´s will not work and there might be other things that also can have issues, I will continue to explore and if I find anything that seems to be a showstopper I will do a followup blog post.
If you are kind of new to System Center VMM console and wondering why after a while your hosts responds “Needs Attention” and checking the host properties and seeing that everything looks green in the status, then continue and read this post!
You can just extend the console by right-click the hosts bar and add the column with “Agent Version Status” and then you can see the reason for host status,
The reason for this “Upgrade Avail” is that the VMM server has been updated with some new patches/updates that came with Windows Update and now you need to update your hosts to have the new agent to properly talk to the VMM Server.
That can of course be done with PowerShell if you have quite some hosts… You can of course also get the list of which hosts that need an update,
And then with the following command also update the hosts that need to
If you are wondering why I am filtering on Agent-Version -ne “0.0” is because in this environment there are several VMware hosts and they do not have a VMM agent but is recognised as managed hosts and appear when getting the “managed computers”
Now when the evaluation VHD´s have been updated with the release of the System Center R2 that was released last week I have updated my download script so you easily can get all the files at a convenient place with PowerShell and the BITS engine.