...now browsing by category


Measuring Hyper-V VM resource use on Windows Server 2012

piątek, Marzec 22nd, 2013

To check performance of virtual machine running on Windows Server 2012 Hyper-V hypervisor it is not even necessary to connect to Hyper-V Manager – all commands are passed via (remote) PowerShell. Anyway in the console all we get is the real-time information:

Hyper-V Manager

Hyper-V Manager

Not very impressing. But the PS way is much better and quicker. To get more in-depth information, first enable performance counters on a VM:

Enable-VMResourceMetering –VMName Name_of_your_VM

Enabling metering on a VM

Enabling metering on a VM

Too see the output run:

Measure-VM –VMName Name_of_your_VM

Checking performance

Checking performance

Now it is just a minute to write a script that will get the information every 15s. or 5 min or every hour and put it into csv file. Cool.

What other properties are available:

Methods and properties

Methods and properties

so we know also how long the counters are running  – so the script can stop gathering data after certain period.

How long it's been running?

How long it's been running?

It can also disable the counters with a simple cmdlet, yes, you guessed it:

Disable-VMResourceMetering –VMName Name_of_your_VM

There’s also a way to check performance for the whole resource pool. First I create a new recource pool of Ethernet type, I add a new NIC for my VM from this resource pool and finally I enable resource metering on the whole resource pool. Then a cmdlet Measure-VMResourcePool is used to get the data.

Measuring performance on resource pools

Measuring performance on resource pools

When we’re done, we can use Disable-VMResourceMetering cmdlet with -ResourcePoolName and -ResourcePoolType parameters to disable the metering on this resource pool. Finally we can check virtual machines and resource pools to see if there’s any with metering enabled:

Anything left?

Anything left?

That’s it. I guess I am used to awesome performance meters in vCenter and even better stats from esxtop on ESX(i) because I don’t find the performance measuring in Hyper-V very powerful. If you have SCVMM, it’s a different story.

„Did you know?” Saturday – Microsoft makes fun of VMware

sobota, Listopad 17th, 2012

Did you know that competitors in virtualization field make fun of each other? Here’s a movie from Microsoft to prove it! :-)

Windows Server 2012 Hyper-V under VMware Workstation 8

środa, Listopad 7th, 2012

If you run a virtual machine with Windows Server 2012 on VMware Workstation 8 you may want to try out some features such as Hyper-V. However, without a proper customization you will get the following error message when trying to install Hyper-V role:

Ops, error! error!

Ops, error! error!

This is a quick 4 step instruction on how to fix the problem and be able to install Hyper-V role.

1. Hardware virtualization

Make sure you have enabled hardware assisted virtualization i.e. VT-x / AMD-V in your computer BIOS. The option should be easy to find but consult your vendor documentation if necessary.

2.Virtual hardware version

Check your Windows Server 2012 VM’s virtual hardware version. If you are not sure which version you have used, you can easily check it at the bottom of the screen when you select a VM – note down also your VM’s configuration file location – you will need it later.

Basic VM information

Basic VM information

If you need to change it, right-click on the VM (it must be turned off) and select Manage > Check hardware compatibility.

The current hardware version is here:

You can change it if required:

VM hardware versions

VM hardware versions

3. Virtual Machine configuration file

Find your Windows Server 2012 configuration file (.vmx) end edit it with a notepad. Add at the end the following line:

hypervisor.cpuid.v0 = false

and save the file.

4. Virtualize VT-x/EPT or AMD-V/RVI

When you now run the server and try to install Hyper-V role, you will get another error message:

Ops, another problem...

Ops, another problem...

While we enabled the hardware assisted virtualization for the physical CPU in point 1, now we need to make sure that the virtual CPU of Windows Server 2012 will present the same functionality. Otherwise Roles and Features installer will detect that the CPU is missing virtualization capabilities and will not proceed. Open your Windows Server 2012 VM settings and click on Processors. Make sure that the option seen in the screenshot is enabled:

Select Virtualize VT-x...

Select Virtualize VT-x...

You can go on with Hyper-V installation – it should allow you to install the role without any complaint.

„Did you know?” Saturday – V-Index

sobota, Listopad 3rd, 2012
V-Index.com Website

V-Index.com Website

Did you know you can check world-wide metrics, i.e. virtualization rate, consolidation ratio and primary hypervisor in use on v-index.com? The site is run by by Vanson Bourne, a market research company. Statistics are updated quarterly.

At this moment VMware is reported to be the leader on both server virtualization (67.6%) and VDI (54.2%) markets.

Windows Server 2012 Hyper-V networking: what’s new?

piątek, Listopad 2nd, 2012

With the new server from Microsoft comes new Hyper-V. What new features in the networking field brings Hyper-V 2012 and how it differs from what is in VMware’s basket?

First of all it brings more security and isolation for multiple guests providing PVLANs. Nothing really new here for virtualization administrators except one thing – on vSphere you need to have a virtual distributed switch to enable PVLANs and it comes with Enterprise+ license. Hyper-V offers it out of the box.

Then we have another cool feature that will cost us some additional money on vSphere – with Hyper-V 2012 it is possible to configure Access Control Lists on virtual ports. They are quite simple as they permit source and destination addresses as a pattern to match but on vSphere you’d need to have Cisco Nexus 1000V for ACLs. Another point for Microsoft.

The next feature introduced by Hyper-V 2012 is VLAN trunking for virtual machines, which has been in vSphere for a long time, except that it’s been for the whole portgroups. Other new features include ARP poisoning/spoofing protection, DHCP guard and such „revolutionary” things like live storage migration or API for the virtual switch (called for that reason Extensive Switch) that should have been introduced a long time ago.

In an attempt to virtualize the network (a la VXLAN) Hyper-V uses NVGRE as an encapsulation protocol for network virtualization as well as introduces IP rewrite. Also Hyper-V can benefit from native NIC teaming that at last appeared in Windows Server.

Here‘s a nice Hyper-V feature comparison between Windows Server 2008 R2 and Windows Server 2012 including the networking part.

Veeam 6.5 – more ways to WOW!

piątek, Październik 26th, 2012

Yesterday a new Veeam 6.5 was released. I really love Veeam for it’s simple yet powerful so I am downloading the new release at this moment.


What’s new under the hood?

  • Free e-discovery and item recovery for Microsoft Exchange
  • Easy VM recovery from SAN snapshots
  • Advanced monitoring, reporting and capacity planning (requires Veeam Management Suite 6.5)
  • New hypervisor support: VMware vSphere 5.1 and Windows Server 2012 Hyper-V
  • and more!

Everything you cannot do with SCVMM but you were affraid to ask…

niedziela, Kwiecień 17th, 2011

Now, if you search the network you will find a lot of articles on SCVMM and how it differs from Hyper-V Manager. Unfortunately they will concentrate on what you can do with SCVMM and not with HM rather than vice-versa. However, is it really that VMM is all like Hyper-V Manager and more?

Working with both consoles and looking for different solutions I have heard people say that Hper-V Manager is all about managing host(s) an VMM manages VMs. Let’s see then what you can’t do with SVMM:

  • cannot mount iso to a VM when it is installed locally on a host. Can mount from a library only. Frustrating and time wasting;
  • cannot start/stop Hyper-V services and integration services;
  • managing vhds;
  • create clusters;

Do you find anything else?

TS: Windows Server Virtualization, Configuring 70-652

czwartek, Kwiecień 14th, 2011

Today I passed 70-652 exam for Windows Server Virtualization, Configuring. It is really easy if you played with Hyper-V and SCVMM for a while. The books I suggest to learn from are:

Here are some additional materials that can be found useful:

Hyper-V Security Guide – Solution Accelerator

Virtual Machine Manager 2008 R2 Scripting Guide

Let me know if you have any questions regarding the exam or preparations.

Storage structure and configuration in Hyper-V: Part 1

czwartek, Kwiecień 7th, 2011

For those who are going to implement and manage virtual environment based on Microsoft Hyper-V, it is important to understand how Hyper-V stores file related to virtual machines, where they are stored, what kind of files they are and how one can modify the settings related to folder(s) structure as well as what the consequences will be.

Default values

After Hyper-V role is installed on Windows Server 2008 R2, it will use default paths:

  • C:\Users\Public\Documents\Hyper-V\Virtual Hard Disks (for virtual disks files)
  • C:\ProgramData\Microsoft\Windows\Hyper-V (for VM files)

First of all, these path should be changed. You should:

  • preferably put these folders away from OS drive – think about SAN or RAID as solutions for you storage. Remember: the files in these folders are your virtual machines. And you do not want to lose them. Moreover, if you are going to enable failover clustering on your VM you will probably want to put your machines on a SAN. A multisite clustering can use NAS or other storage solutions but you will need to take care abo8ut content replication in order to ensure the storages for your machines are synchronized.
  • decide if you want to keep your machines together in the same folder with vhd files or not. For the sake of simplicity you may want to set the same folder both for VMs and VHDs. This way you will have all files belonging to your VM together in the same folder.

The default paths are changed from Hyper-V Settings are shown below. I decided to keep my VM files and VHD files separately. I put them into different folder on C: (system drive, not too smart…)

Looking closer

So we changed the path for VMs and we’re ready to go. We install virtual machines. Let’s go to inspect the files and folders related to Hyper-V.

Open the folder you set for your VMs’ files, C:\Hyper-V\VM in my case. You are going to see two folders – Virtual Machines and Snapshots. Let’s do cd „Virtual Machines”. Whoooaa… What’s that? That doesn’t look good. some strange folders and xml files named with series of alphanumeric characters. But have no fear; these are actually folders and files your VMs live in. These strange names are VM GUIDs, unique for every Hyper-V VM. How to find them? Well, don’t count on Hyper-V Manager console. But here is a nice VBScript which, once run on your host machine, will show you all guids for VMs running on this particular server. Look for VM GUID in the out put under your VM name.

Now when we know which GUID belongs to the machine we want to inspect, let’s open a {GUID}.xml file. What you see is your VM whole configuration. Everything’s there from drives to power settings, all nicely formatted in xml. Cool.

Now let’s get inside a folder named with our machine’s GUID. Again, you gonna see files named with GUID; however now these are bin and vsv files. A bin file will contain the memory state for the virtual machine while a vsv one is for the saved state of devices attached to your VM.

In the next part we will talk about vhd files and snapshots.

PowerShell in SCVMM 2008 R2 – Part 2: Guest OS Profile

poniedziałek, Kwiecień 4th, 2011

In my last note we saw how easily hardware profiles can be generated using PowerShell Snapin and its cmdlets for SCVMM 2008 R2. Now it is time to have a closer look on Guest OS Profiles that we will use later to create templates and deploy new VMs. Click to continue »