Book Image

Microsoft Hyper-V PowerShell Automation

By : Vinith Menon
Book Image

Microsoft Hyper-V PowerShell Automation

By: Vinith Menon

Overview of this book

Table of Contents (13 chapters)
Microsoft Hyper-V PowerShell Automation
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

The storage quality of the service feature


The storage quality of service (QoS) feature in Windows Server 2012 R2 allows us to set a specific level of I/O throughput for virtual machines. This is best done on virtual machines that are resource-hungry. You can effectively set an automatic hard cap by specifying the maximum input/output operations per second (IOPS) for a virtual hard disk associated with a particular virtual machine.

This allows the administrator to set a throttle limit on the IOPS consumed by a virtual machine, thereby controlling it from consuming resources of other virtual machines. So, let me show you an example on how you can set the storage level QoS for the virtual machine. We will be using the sample virtual machine that we used for our previous example, by making use of the following code:

Get-VM Fileserver_VM1| Get-VMHardDiskDrive -ControllerType SCSI | Set-VMHardDiskDrive -MaximumIOPS 100 -MinimumIOPS 2  

As you can see in the previous example, we get the virtual machine properties for FileServer_VM1 or FileServer_VM2 using Get-VM. Next, we get the VHD drives attached to the SCSI controller on the virtual machine using Get-vmharddiskdrive. Finally, we set the maximum and minimum IOPs for the virtual machine using the set-vmharddiskdrive cmdlet.

Once we execute this cmdlet on a PowerShell prompt, we are able to see that the QoS properties for the VM have been modified: