VMware vSphere PowerCLI Reference. Graf Brian

Чтение книги онлайн.

Читать онлайн книгу VMware vSphere PowerCLI Reference - Graf Brian страница 5

VMware vSphere PowerCLI Reference - Graf Brian

Скачать книгу

You can download all the files and resources mentioned in the book from www.wiley.com/go/vmwarevspherepowercli2e.

      How to Contact the Authors

      We welcome feedback from you about this book. We’ve developed a message board for everything related to the book at www.powerclibook.com. Stop by and let us know how we did, check for updates, and join the discussion. If you have specific questions, send us a message at [email protected]. You can also connect to each of us through our blogs or via Twitter as mentioned in the “About the Authors” section:

      Matt Boren – The vNugglets at www.vNugglets.com

      Luc Dekens – LucD Notes: My PowerShell Ramblings at www.lucd.info

      Brian Graf – Brian Graf’s Virtualization Blog at www.vtagion.com

      Jonathan Medd – Jonathan Medd’s Blog: Automating anything that moves.. at www.jonathanmedd.net

      Glenn Sizemore – Practical Administrator: Lessons of a Datacenter Administrator at http://practical-admin.com, or @Glnsize on Twitter.

      Andrew Sullivan – Practical Administrator: Lessons of a Datacenter Administrator at http://practical-admin.com

      Wiley strives to keep you supplied with the latest tools and information you need for your work. Please check the book’s update page on the Wiley website at www.wiley.com/go/vmwarevspherepowercli2e. Here, we’ve posted optimized electronic copies of the scripts, batch files, and tools created for this book. We’ll post additional content and updates that supplement this book if the need arises.

      Part I

      Install, Configure, and Manage the vSphere Environment

      • Chapter 1: Automating vCenter Server Deployment and Configuration

      • Chapter 2: Automating vSphere Hypervisor Deployment and Configuration

      • Chapter 3: Automating Networking

      • Chapter 4: Automating Storage

      • Chapter 5: Using Advanced vSphere Features

      Chapter 1

      Automating vCenter Server Deployment and Configuration

      In this chapter, you will learn to:

      • Prepare the vCenter Installation

      • Create an Automated Installation

      • Set Up Your vCenter Server Folder Structure

      • Creating a Folder Structure from Scratch

      • Exporting a Folder Structure

      • Importing a Folder Structure

      • Define Users and Their Privileges

      • Granting Privileges

      • Creating New Roles

      • Bringing In Users

      • Exporting Permissions

      • Importing Permissions

      • Configure Datacenters and Clusters

      • Creating Datacenters

      • Creating Clusters

      • Configuring High Availability

      • Configuring Distributed Resource Scheduler

      • Configuring Enhanced vMotion Compatibility

      • Configuring Distributed Power Management

      • Licensing

      • Viewing License Information

      • Licensing a Host

      One of the focal points and key use cases of PowerCLI is the automation of tasks that are needed either as part of a disaster recovery (DR) solution or as part of an automated deployment solution that can be used repeatedly – you’ll be safe in the knowledge that scripts will produce consistent and easy-to-use solutions.

      This chapter will take you through some common areas automated within vSphere, starting at the beginning of the virtual infrastructure. Not only will we show you how to automate the build, but we’ll also provide examples of export scripts that will help you export information into a centralized area. The exported data will then be ready for use in reports or for the import process of another setup.

      Prepare the vCenter Installation

      As part of the overall virtual infrastructure, one of the first products you will need to install is the vCenter Server, or Virtual Infrastructure Server. Although this cannot be done directly using PowerCLI cmdlets, you can use the automated nature of PowerCLI and PowerShell to automate the vCenter Server installation.

      The key thing to remember while reading this chapter – and indeed the entire book – is that PowerShell reaches past the virtual infrastructure. It can be used to manage most areas of the Windows-based operating system and application set. PowerCLI is purely an addition to PowerShell that allows you to manage the virtual infrastructure.

      To automate the installation of vCenter Server and its respective components, including the vSphere Client, Update Manager, Converter, and the corresponding databases, you will need the install media as well as various other items, such as the correct version of the .NET Framework and Windows installed on the server. The components you choose to install will depend on your infrastructure and the type of database you are going to use with your vCenter Server install.

      Before you attempt to create an automated installation, be sure that:

      • The server meets at least the minimum hardware requirements as specified in the VMware ESX and vCenter Server installation documents provided by VMware.

      • The server is configured with a static IP address.

      • The computer name consists of fewer than 15 characters. (To conform to best practice, ensure that the computer name matches the hostname in the fully qualified domain name [FQDN] of the system.)

      • The system is joined to a domain, and not a workgroup. Although this is not a strict requirement, domain membership ensures that when you’re using advanced features like the vCenter Guided Consolidation Service, the vCenter Server will be able to find all domains and systems on the network for the purpose of converting physical systems to virtual machines (VMs).

      • The service user account that will be used for installation is added to the Log On As A Service policy.

      •

Скачать книгу