VMware vsphere PowerCLI Reference

Similar documents
"Charting the Course... VMware vsphere 6.7 Boot Camp. Course Summary

Administering VMware vsphere and vcenter 5

VMware vsphere with ESX 4.1 and vcenter 4.1

VMware vsphere with ESX 6 and vcenter 6

VMware - VMware vsphere: Install, Configure, Manage [V6.7]

VMware vsphere Customized Corporate Agenda

Professional on vsphere

VMware vsphere 5.5 Professional Bootcamp

Detail the learning environment, remote access labs and course timings

VMware vsphere 6.5: Install, Configure, Manage (5 Days)

By the end of the class, attendees will have learned the skills, and best practices of virtualization. Attendees

VMware vsphere: Fast Track [V6.7] (VWVSFT)

"Charting the Course... VMware vsphere 6.5 Optimize, Upgrade, Troubleshoot. Course Summary

[VMICMV6.5]: VMware vsphere: Install, Configure, Manage [V6.5]

VMware vsphere Administration Training. Course Content

VMware - vsphere INSTALL & CONFIGURE BEYOND INTRODUCTION V1.3

VMware vsphere: Install, Configure, Manage plus Optimize and Scale- V 6.5. VMware vsphere 6.5 VMware vcenter 6.5 VMware ESXi 6.

VMware vsphere. Administration VMware Inc. All rights reserved

VMware vsphere 6.5 Boot Camp

VMware Exam VCP-511 VMware Certified Professional on vsphere 5 Version: 11.3 [ Total Questions: 288 ]

Exam Name: VMware Certified Professional on vsphere 5 (Private Beta)

VCP-510 Volume Creating and Configuring VMware Clusters I

VMware vsphere: Install, Configure, Manage (vsphere ICM 6.7)

vsphere Update Manager Installation and Administration Guide 17 APR 2018 VMware vsphere 6.7 vsphere Update Manager 6.7

VMware vsphere: Fast Track. System administrators System engineers. Cursusduur: 5 Dagen Cursuscode: VSFT Version: 6.7. Beschrijving: Doelgroep:

VMware vsphere with ESX 4 and vcenter

VMware vsphere 4. Architecture VMware Inc. All rights reserved

VMware vsphere 6.0 / 6.5 Infrastructure Deployment Boot Camp

VMWARE VSPHERE: FAST TRACK V6.7 (EDU-VSFT67)

EXAM - VCP550. VMware Certified Professional - Data Center Virtualization. Buy Full Product.

Exam4Tests. Latest exam questions & answers help you to pass IT exam test easily

vsphere Security Modified on 21 JUN 2018 VMware vsphere 6.7 VMware ESXi 6.7 vcenter Server 6.7

Virtual Storage Console, VASA Provider, and Storage Replication Adapter for VMware vsphere

o Restrict administrative privileges

New Features in VMware vsphere (ESX 4)

vsphere Security Update 1 Modified 03 NOV 2017 VMware vsphere 6.5 VMware ESXi 6.5 vcenter Server 6.5

VMware vsphere 5.5 Advanced Administration

Virtualization with VMware ESX and VirtualCenter SMB to Enterprise

vsphere Security Update 2 Modified on 22 JUN 2018 VMware vsphere 6.5 VMware ESXi 6.5 vcenter Server 6.5

VSPHERE: FAST TRACK V6.5 (EDU-VSFT65)

Developing and Deploying vsphere Solutions, vservices, and ESX Agents. 17 APR 2018 vsphere Web Services SDK 6.7 vcenter Server 6.7 VMware ESXi 6.

BraindumpsIT. BraindumpsIT - IT Certification Company provides Braindumps pdf!

ATA Infotech Ventures Pvt. Ltd.

VMware vsphere 6.0 / 6.5 Advanced Infrastructure Deployment (AID)

Changes in VCP6.5-DCV exam blueprint vs VCP6

VMware vsphere 6.5/6.0 Ultimate Bootcamp

Foundation for Cloud Computing with VMware vsphere 4

vsphere Security VMware vsphere 6.5 VMware ESXi 6.5 vcenter Server 6.5 EN

vsphere Basic System Administration

Virtual Server Agent v9 with VMware. June 2011

Introduction to Virtualization

Installing and Administering VMware vsphere Update Manager. Update 2 VMware vsphere 5.5 vsphere Update Manager 5.5

Virtualization with VMware ESX and VirtualCenter SMB to Enterprise

Virtual Server Agent for VMware VMware VADP Virtualization Architecture

Developing and Deploying vsphere Solutions, vservices, and ESX Agents

vsphere Basic System Administration

Virtual Storage Console, VASA Provider, and Storage Replication Adapter for VMware vsphere

Logical Operations Certified Virtualization Professional (CVP) VMware vsphere 6.0 Level 2 Exam CVP2-110

VMware vsphere 6.5 Administration Basics Ultimate Bootcamp

vcenter Server Installation and Setup Modified on 11 MAY 2018 VMware vsphere 6.7 vcenter Server 6.7

PassTest. Bessere Qualität, bessere Dienstleistungen!


Overview. Prerequisites. VMware vsphere 6.5 Optimize, Upgrade, Troubleshoot

What s New in VMware vsphere 5.1 Platform

vsphere Installation and Setup Update 2 Modified on 10 JULY 2018 VMware vsphere 6.5 VMware ESXi 6.5 vcenter Server 6.5

vcenter Server Installation and Setup Update 1 Modified on 30 OCT 2018 VMware vsphere 6.7 vcenter Server 6.7

Securing the Data Center against

VMware Exam VCAD510 VMware Certified Associate Data Center Virtualization Exam Version: 8.0 [ Total Questions: 112 ]

VI3 to vsphere 4.0 Upgrade and New Technology Ultimate Bootcamp

VMware Exam VCP550D VMware Certified Professional 5 - Data Center Virtualization Delta Exam Version: 6.1 [ Total Questions: 270 ]

Data Protection Guide

Introduction to Virtualization. From NDG In partnership with VMware IT Academy

Configuration Cheat Sheet for the New vsphere Web Client

Setting Up Cisco Prime LMS for High Availability, Live Migration, and Storage VMotion Using VMware

Preparing Virtual Machines for Cisco APIC-EM

Veeam Backup & Replication. Version 9.0

Preparing Virtual Machines for Cisco APIC-EM

Vmware VCP-511. VMware Certified Professional on vsphere 5 (Private Beta) Download Full Version :

Logical Operations Certified Virtualization Professional (CVP) VMware vsphere 6.0 Level 1 Exam CVP1-110

1V0-621.testking. 1V VMware Certified Associate 6 - Data Center Virtualization Fundamentals Exam

Server Fault Protection with NetApp Data ONTAP Edge-T

1V Number: 1V0-621 Passing Score: 800 Time Limit: 120 min. 1V0-621

Data Protection Guide

Vendor: VMware. Exam Code: VCP550PSE. Exam Name: VMware Certified Professional - Data Center Virtualization (PSE) Version: Demo

Virtual Volumes FAQs First Published On: Last Updated On:

IT Systems Integration

Virtual Storage Console, VASA Provider, and Storage Replication Adapter for VMware vsphere

FUJITSU Storage ETERNUS AF series and ETERNUS DX S4/S3 series

vsphere Replication for Disaster Recovery to Cloud vsphere Replication 8.1

Virtual Storage Console 6.1 for VMware vsphere

Migration. 22 AUG 2017 VMware Validated Design 4.1 VMware Validated Design for Software-Defined Data Center 4.1

vsphere Replication for Disaster Recovery to Cloud

Potpuna virtualizacija od servera do desktopa. Saša Hederić Senior Systems Engineer VMware Inc.

Managing ReadyClones

Vendor: VMware. Exam Code: VCAD510. Exam Name: VMware Certified Associate Data Center Virtualization (VCA-DCV) Exam. Version: Demo

SnapCenter Software 4.0 Concepts Guide

Using VMware vrealize Orchestrator Plug-Ins. vrealize Orchestrator 6.0

vsphere Virtual Machine Administration

vsphere Replication for Disaster Recovery to Cloud vsphere Replication 6.5

EXAM - VCP5-DCV. VMware Certified Professional 5 Data Center Virtualization (VCP5-DCV) Exam. Buy Full Product.

Transcription:

VMware vsphere PowerCLI Reference Automating vsphere Administration Luc Dekens Alan Renouf Glenn Sizemore Arnim van Lieshout Jonathan Medd WILEY Wiley Publishing, Inc.

TABLE OF CONTENTS eeebfa o««*bttb0&& Forewords Introduction xix xxi Part I Install, Configure, and Manage the vsphere Environment 1 Chapter! Automating vcenter Server Deployment and Configuration 3 Prepare the vcenter Installation 4 Create an Automated Installation 5 Set Up Your vcenter Folder Structure 8 Creating a Folder Structure from Scratch 8 Exporting a Folder Structure 11 a Importing Folder Structure 14 Define Users and Their Privileges 15 Granting Privileges 15 Creating New Roles 19 Bringing in Users 21 Exporting Permissions 22 Importing Permissions 24 Configure Datacenters and Clusters 26 Creating Datacenters 27 Creating Clusters 27 Configuring High Availability 27 Configuring Distributed Resource Scheduler 28 Configuring Enhanced vmotion Compatibility 29 Configuring Distributed Power Management 29 Licensing 31 Viewing License Information 31 Licensing a Host 33 Chapter 2 Automating vsphere Hypervisor Deployment and Configuration 35 Prepare for an Installation 36 The Installation Medium 36 Gathering Required Software 37 Automate an Installation 37 Customizing an Installation with Kickstart 38 Postinstallation Configuration 43 Chapter 3 Automating Storage and Networking 67 Set Up the Storage 68 Setting Up Different Types of Storage 68 Configuring an iscsi Target 69

XII CONTENTS Rescanning for New Storage 70 Adding Datastores 70 Setting a Multipath Policy 77 Set Up the Network 78 Standard and Distributed Switches 78 Adding VMkernel Port Groups 83 Making Your Switches and Port Groups Resilient. 84 Copying Networking Configuration from Another Host 86 Moving Multiple VMs to a New Port Group 89 Chapter 4 Using Advanced vsphere Features 93 Manage vnetwork Distributed Switches 94 Use Fault Tolerance 105 Configure Storage I/O Control 106 Use Distributed Power Management 113 Configure Host Profiles 117 Configure Active Directory Integration 120 Part II Managing the Virtual Machine Life Cycle 127 Chapter 5 Creating Virtual Machines 129 Use the New-VM Cmdlet 130 Creating a New Virtual Machine 131 Cloning a Virtual Machine 136 Deploying from a Template 137 Registering a Virtual Machine 139 Use the SDK 143 Perform a Mass Deployment 150 Preparing for Mass Deployment 151 Running the Deployment Synchronous or Asynchronous 152 Postconfiguration and Validating the New Virtual Machines 154 Identify Eye-Catchers for Auditing 157 Using Custom Attributes 157 Maintaining Custom Attributes 159 Maintain VMware Tools 163 Windows Silent Install 164 Linux Silent Install 165 Updating VMware Tools 170 Chapter 6 Using Templates and Customization Specifications 173 Use Customization Specifications 174 Creating Customization Specifications 174 Managing Customization Specifications 175 Using Customization Specifications 177

CONTENTS XIII Use Templates 178 Creating Templates 178 Deploying Guests from Templates, 179 Maintaining Templates 185 Chapter 7 Configuring Virtual Machine Hardware 197 Add, Configure, and Remove Virtual Hardware 198 Changing Virtual Memory 198 Changing Memory Resources 199 Changing the Number of vcpus 201 Changing vcpu Resources 203 Adding or Removing a Network Adapter 205 Assigning a Network 207 Adding a Virtual Disk 208 Removing a Virtual Disk 211 Extending a Virtual Disk 218 Changing Other Hardware 221 Optimize Storage Usage with Thin Provisioning 223 Converting a Virtual Disk Using Storage vmotion 224 Converting a Virtual Disk in Place 224 Chapter 8 Advanced Virtual Machine Features 229 Interact with the Guest OS 230 Using Linux Native Tools 231 Using Windows Native Tools 235 Using PowerCLI Methods 245 Use vmotion and Storage vmotion 250 Examining vmotion Requirements 250 Moving a Virtual Machine 251 Use and Manage Snapshots 256 Creating and Removing Snapshots 257 Maintaining Snapshots 258 Restricting the Creation of Snapshots 264 Chapter 9 Using vapps 269 Import Virtual Appliances 270 Create Your Own vapps 272 Maintain vapps 274 Setting the Start Order 274 Using IP Pools 282 Using IP Assignment 293 Modifying vapp Product Information 296

XIV CONTENTS Part III Securing Your vsphere Environment 301 Chapter 10 Backing Up and Restoring Your Virtual Machines 303 Work with Snapshots 304 Create Do-lt-Yourself Backups 304 Restore Your VMs from a DIY Backup 307 Change Block Tracking 308 Checking Enabling/Disabling CBT Status 309 CBT 309 Use Site Recovery Manager 311 Automating SRM Using PowerShell Functions 311 Customizing Recovery Plans 312 Provide PowerShell Support for Corporate Backup Applications 315 Quest 316 Veeam 320 Chapter 11 Organize Your Disaster Recovery 325 Back Up Your vcenter Server. 326 Backing Up Your vcenter Server Database 327 Backing Up Your vcenter Server Configuration 333 Restore Your vcenter Server 336 The Restore Sequence 336 Restoring Your vcenter Server Database 337 Reconnecting ESX Hosts 340 Export vcenter Server Inventory Items 344 Folders 345 Datacenters 347 Clusters 349 Roles 350 Permissions 351 VM Locations 352 Hosts 352 Import vcenter Server Inventory Items 353 Folders and Datacenters 353 Datacenter Folders 354 Clusters 355 Hosts 356 VM Locations 357 Roles 358 Permissions 358 Recover Virtual Machines 360 Chapter 12 Hardening the vsphere Environment 367 Use the Hardening Guide 368

CONTENTS XV Work with the Guidelines 369 Virtual Machines 369 ESX(i) Hosts 375 vnetwork 394 vcenter Server 399 COS 399 Bring It All Together 401 Chapter 13 Maintain Security in Your vsphere Environment 403 Install the vcenter Update Manager PowerCLI Snap-in 404 Work with Baselines 406 Creating a Baseline 406 Updating a Baseline 410 Attaching and Detaching Baselines 411 Work with Upgrades and Patches 412 Scanning a Host 412 Staging Patches to a Host 413 Remediating a Host 414 Including Patching as Part of Host Deployment 416 Countering the Self-Aware Update Manager 417 Report the Security Status 419 Understanding Datacenter Compliance 419 Implementing Specific Baseline Compliance 422 Implementing Required Patches.424 Part IV Monitoring and Reporting 427 Chapter 14 Reporting the Status of Your vsphere Environment 429 Determine What to Report 430 Virtual Machines 430 Guest Operating Systems 436 Hosts 438 Clusters 445 Customize Your Reports 450 Adding Properties to Existing Objects 450 Creating Custom Objects 452 Exporting Output -453 Chapter 15 Using Statistical Data 463 Understand Some Basic Concepts 464 What Does vcenter Server Add? 464 Historical Intervals 468 Statistics Levels 470 Metrics 473 Instances 479

XVI CONTENTS Gather Statistical Data 482 The Cmdlets 483 What Is in the Statistical Data? 483 Know Which Metrics to Use 485 Techniques 486 Offload Statistical Data 499 Chapter 16 Monitoring the vsphere Environment 501 Determine What to Monitor 502 Use Alarms 503 Designing an Alarm 503 Removing Alarms 524 Modifying Alarms 525 Moving Alarms 526 Chapter 17 Auditing the vsphere Environment 529 Understand Tasks and Events Data 530 Report the PowerCU Way 535 What Does Get-VIEvent Return? 535 Using the Get-VIEvent Cmdlet 537 Report the SDK Way 543 Why Use the SDK API? 544 What Is a Collector? 544 Fitting Collectors into Your Script 544 Sample Scripts 551 Configure Tasks and Events Retention 554 Part V Scripting Tools and Features 561 Chapter 18 Scheduling Automation Scripts 563 Use the vcenter Server Scheduler 564 Creating vcenter Server Scheduled Tasks 564 Reporting on vcenter Server Scheduled Tasks 567 Use the Windows Scheduler 569 Scheduling Scripts on Windows 570 Dealing with PowerCU Issues When Scheduling Scripts 571 Working with the Scheduled Tasks Module 576 Chapter 19 The SDK 583 Work with the vsphere SDK 584 Use the vsphere API Reference 586 Setting a Host in Maintenance Mode 588 Did the Alarm Fire the SNMP Trap? 589 Finding Metrics for Thin Provisioning 590 Can You Migrate This Guest? 592

CONTENTS XVII Use Managed Objects 596 Managed Object Types 597 Data Objects and Their Methods 600 Using vsphere Managers, 603 Managed Object References 605 Code Parameter Objects 609 Find the Method You Need 610 Changing the Boot Delay of a Virtual Machine 611 Finding the Patches Installed on an ESX Host 612 Finding the Host HWuptime 613 Changing the vcenter Logging Options 614 Understand Return Values and Faults 615 Put Some Tips and Tricks to Good Use 618 Waiting for an Asynchronous Task 618 Better Error Handling after Asynchronous Tasks.619 Finding Service Managers with Get-View Shortcuts 619 Chapter 20 The Onyx Project 621 Work with the Onyx Project 622 Let Onyx Help You 622 Use Onyx 623 Connecting to a vcenter or an ESX(i) Server 623 Translating Captured SOAP Traffic 626 Configuring Onyx 626 Using Onyx Output 630 Work with References 632 Hard-Coded References to Entities 633 Hard-Coded MoRefs 633 Use Onyx in the Real World 633 Chapter 21 PowerGUI and vecoshell 635 Understand GUI Environments in Managing Automation 636 Use PowerPacks to Manage Automation Scripts 637 Making a Connection to vcenter Server 639 Working with Links and Actions 642 Using the VMware PowerPackfor Reporting 646 Using the VMware PowerPack for Administration Tasks 650 Importing the VMware Community PowerPack 653 Creating a PowerPack 658 Chapter 22 PowerWF Studio 663 Understand PowerWF Studio's Capabilities 664 Integrate PowerWF Studio 665 Use PowerCLI in PowerWF Studio 665 Graphical Flow 666 Script Editor 667

XVIII CONTENTS Use a Workflow 668 Create Typical Workflows 671 Creating New Guests from the DOS Prompt 671 Creating a Log Viewer Using PowerWF Studio 675 Register-VMX as a Windows Application 682 Bringing It All Together 683 Chapter 23 Add a GUI Front-End to Your Automation Scripts 687 Appreciate the Value of a GUI 688 Choose the Correct Tool 688 Create Some Basic WinForms 690. The Form Modes 691 Adding a Control 692 Using a Script Layout Template 695 Adding Adding List Boxes 697 Radio Buttons 701 Create a Somewhat Advanced Example 704 Index 715