Creating Resource Pools in HYPER-V 3.0

In Private cloud environments, Enterprise networks in’s a common necessity to aggregate resources and allocate them and meter them rather than assigning them individually. With the aggregation comes the easiness of resource monitoring. In HYPER-V 3.0 hyper-v team offers this capability as resource pools.

The simple idea is to aggregate resources and provide them to virtual machines or tenants if it is service provider (This can be large organization who provide tenants level resource allocation to each departments as well) There are various resources types we can allocate under the HYPER-V 3.0,

  • Memory
  • Disks (VHD)
  • Processor
  • Ethernet
  • ISO
  • Virtual Fibber Channel Ports
  • Virtual Floppy Disk

I think over the time this list will grow Smile

We’ll have a look at an example for this. At this stage creating resource pools has been limited to PowerShell cmdlets instead of GUI. But you don’t mind that right Smile For the demonstration I’ll create Storage pool consist of several VHD files. I’ve created a folder called “ResourcePool” and copied 3 VHD files into that,

image

Now we’ll go ahead and create the resource pool in hyper-v by typing the relevant PS command, but wait before that I want to show my current machine status of resource types,

image

Ok now we’ll move ahead with the PS command,

image

image

Now we’ve created the resource pool (whew isn’t that so simple Smile ) ok now we’ll move to the HYPER-V MMC and try to create a new VM and select the VHD from the resource pool,

image  image  image  image

image  image 

image 

As you can see we’ve skipped the allocation of disk in the initial steps and arrive to the settings page on that particular VM. After that from the disk pool we’ve selected pre created VHD file. Once you enable resource pool (in this example VHD) you can enable resource metering as well. This will help hosting companies or large enterprise companies to monitor and track the resource usage of that allocated resources and carry out the billing. Some of the metrics that can be monitored using resource metering are,

Average, minimum and maximum VM memory usage, VM processor usage, Total VM Disk allocation…..etc.

In the above example I’ve created a VM named as “Test-VM1”. To monitor this VM we can go ahead and enable the PS command “Enable-VMResourceMetering”

image

After that you can monitor the resource usage of that VM by typing the following command,

image

Output will be as follows,

image

After making the VM little bit busy the output is as follows,

image

We can measure the resource usage of the VM’s or particular VM by using PowerShell as well. to see the resource usage of the “Test-VM1” we can use the PS command as well,

image

if you want to see the resource usage on individual components (Eg: memory, VHD, CPU) you can do that with PowerShell as well. Below picture demonstrate some of these commands and the output results.

image

Now if you want to disable the resource metering for the “Test-VM1” all you have to do is type
Disable-VMResourceMetering –Vmname Test-VM1

PowerShell in windows has been become very strong and Microsoft always encourage to use them. In Datacenter and Hosting environment you prefer to carry our many task automated as much as possible or with minimum time. PowerShell is the answer for that. In case you have not updated PowerShell Help section you can do that by typing “update-help” from PowerShell itself. In case if you want to see an example of hoe to type for a particular command you can type “Eg: Get-help get-vm –examples” when you get to know more into PowerShell you’ll enjoy spending less time with GUI Smile

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s