Book Image

PowerCLI Cookbook

By : Philip Brandon Sellers
Book Image

PowerCLI Cookbook

By: Philip Brandon Sellers

Overview of this book

Table of Contents (19 chapters)
PowerCLI Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Using native DRS rule cmdlets to manage KeepTogether and Separate rules


PowerCLI has a number of built-in cmdlets to manage DRS rules. These rules allow you to keep virtual machines together and ensure that they stay separated within a vSphere cluster.

A simple example of two virtual machines that should never coreside on the same host would be domain controllers. You want to ensure that all of your domain controllers are not running on the single host in case a physical server fails, so you will set a Separate rule.

A simple example of two virtual machines that should always coreside on the same host would be an application server and its database that handles gigabits of traffic per second. You can achieve better throughput and performance of the database traffic if the two virtual machines are on the same host.

These are the two scenarios that are covered in this recipe.

Getting ready

To begin this recipe, you will need a PowerCLI window and an active connection to a vCenter Server with a...