You are previewing VMware vSphere 5.1 Cookbook.
O'Reilly logo
VMware vSphere 5.1 Cookbook

Book Description

If you prefer practice to theory then this is the ideal book for learning how to install and configure VMware vSphere components. Packed with recipes, it’s a hands-on tutorial and reference guide for this unbeatable virtualization product.

  • Install and configure vSphere 5.1 core components

  • Learn important aspects of vSphere such as administration, security, and performance

  • Configure vSphere Management Assistant(VMA) to run commands/scripts without the need to authenticate every attempt

  • In Detail

    Amidst all the recent competition from Citrix and Microsoft, VMware’s vSphere product line is still the most feature rich and futuristic product in the virtualization industry. Knowing how to install and configure vSphere components is important to give yourself a head start towards virtualization using VMware.

    If you want to quickly grasp the installation and configuration procedures, especially by using the new vSphere 5.1 web client, this book is for you.

    VMware vSphere 5.1 Cookbook will take you through all the steps required to accomplish a task with minimal reading required. Most of the tasks are accompanied with relevant screenshots with an intention to provide a visual guidance as well.

    The book has many useful recipes that will help you progress through the installation of VMware ESXi 5.1 and vCenter Server 5.1. You will learn to use Auto Deploy and Image Profiles to deploy stateless/stateful ESXi servers, configure failover protection for virtual machines using vSphere HA, configure automated load balancing using vSphere DRS and DPM.

    Finally, the book guides you through upgrading or patching ESXi servers using VMware Update Manager and also deploying and configuring vSphere Management Assistant (VMA) to be able to run scripts to manage the ESXi servers.

    Table of Contents

    1. VMware vSphere 5.1 Cookbook
      1. Table of Contents
      2. VMware vSphere 5.1 Cookbook
      3. Credits
      4. About the Author
      5. About the Reviewers
      6. www.PacktPub.com
        1. Support files, eBooks, discount offers and more
          1. Why Subscribe?
          2. Free Access for Packt account holders
          3. Instant Updates on New Packt Books
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Errata
          2. Piracy
          3. Questions
      8. 1. Upgrading to vSphere 5.1
        1. Introduction
          1. Upgrading the vCenter Server
          2. Upgrading the ESXi server
          3. vSphere Web Client
        2. Carrying out pre-upgrade checks before performing a vCenter upgrade
          1. How to do it...
            1. Checking the ESX server compatibility
            2. Running VMware vCenter Host Agent Pre-Upgrade Checker
            3. Checking database compatibility
            4. Backing up the SSL certificates
            5. Enabling SSL certificate verification
            6. Uninstalling the non-default software and plugins
        3. Performing an in-place upgrade of vCenter Server
          1. How to do it...
          2. How it works...
          3. There's more...
        4. Creating a table space for SSO on a SQL instance
          1. How to do it...
          2. How it works...
        5. Creating DB users for the SSO database
          1. How to do it...
          2. How it works...
        6. Upgrading a 32-bit vCenter Server to vCenter 5.1
          1. How to do it...
            1. Backing up the settings from a 32-bit vCenter Server
            2. Restoring the configuration on the new machine
          2. How it works...
        7. Upgrading to ESXi 5.1
          1. How to do it...
          2. How it works...
        8. Installing vSphere Web Client
          1. How to do it...
          2. There's more...
        9. Upgrading VMware Tools
          1. How to do it...
          2. How it works...
          3. There's more...
        10. Upgrading the virtual machine hardware
          1. How to do it...
          2. How it works...
      9. 2. Performing a Fresh Installation of vSphere 5.1
        1. Introduction
          1. VMware vCenter Server Appliance (vCSA)
        2. Installing vCenter 5.1
          1. Getting ready
          2. How to do it...
        3. Deploying a VMware vCenter Server Appliance (vCSA)
          1. How to do it...
          2. How it works...
          3. There's more...
        4. Preparing vCenter Server Appliance for first use
          1. Getting ready
          2. How to do it...
        5. Installing the vCenter Server Appliance update
          1. How to do it...
          2. How it works...
        6. Upgrading a vCenter Server Appliance
          1. How to do it...
          2. How it works...
        7. Installing ESXi 5.1
          1. How to do it...
        8. Performing a scripted install of the ESXi server
          1. How to do it...
          2. How it works...
          3. There's more...
      10. 3. vSphere Auto Deploy
        1. Introduction
        2. Installing the Auto Deploy server
          1. How to do it…
        3. Configuring a TFTP server with Auto Deploy files
          1. How to do it…
          2. How it works…
          3. There's more…
        4. Configuring the DHCP server for PXE boot
          1. How to do it…
          2. How it works…
        5. Testing the PXE boot configuration
          1. How to do it…
          2. How it works…
        6. Preparing VMware PowerCLI for first use
          1. How to do it…
          2. How it works…
        7. Downloading an ESXi Offline Bundle
          1. How to do it…
        8. Adding the Offline Bundle to the Auto Deploy server
          1. How to do it…
          2. How it works…
        9. Choosing an ESXi Image to deploy
          1. How to do it…
          2. How it works…
        10. Creating a Host Profile
          1. How to do it…
        11. Creating a deploy rule
          1. How to do it…
          2. How it works…
        12. Activating a deploy rule
          1. How to do it…
          2. How it works…
          3. There's more…
        13. Testing Auto Deploy
          1. How to do it…
          2. How it works…
            1. First boot
            2. Subsequent boot
        14. Enabling Stateless Caching
          1. How to do it…
          2. How it works…
        15. Performing an Auto Deploy stateful install
          1. How to do it…
          2. How it works…
      11. 4. ESXi Image Builder
        1. Introduction
          1. Offline Bundle
          2. VIB (vSphere Installation Bundle)
          3. Image Profiles
        2. Creating an Image Profile by cloning an existing one
          1. How to do it…
            1. Verifying the existence of a Software Depot in the current session
            2. Adding a Software Depot
            3. Listing available Image Profiles
            4. Cloning an Image Profile to form a new one
          2. How it works…
          3. See also
        3. Removing an Image Profile
          1. How to do it…
        4. Adding a VIB (software package) to an Image Profile
          1. How to do it…
            1. Verifying whether the Image Profile is read-only
            2. Adding the driver's Offline Bundle to the PowerCLI
            3. Checking the availability of the needed software package (VIB)
            4. Adding the VIB to the Image Profile
            5. Verifying whether the VIB has been added to the Image Profile
        5. Exporting an Image Profile as an ISO or Offline Bundle
          1. How to do it…
        6. Creating an Image Profile from scratch
          1. How to do it…
          2. There's more...
          3. See also
        7. Applying an Image Profile to the host
          1. How to do it…
          2. How it works…
      12. 5. Creating and Managing VMFS Datastores
        1. Introduction
        2. Viewing the LUNs presented to an ESXi host
          1. How to do it...
            1. Using the vSphere Web Client to view LUNs
            2. Using the ESXi Console to view the LUN information
        3. Viewing the datastores seen by the ESXi host
          1. How to do it...
            1. Using the vSphere Web Client to view LUNs
            2. Using the ESXi Console to view the datastores
        4. Viewing the multipathing information of a LUN
          1. How to do it...
            1. Using the vSphere Web Client GUI
            2. Using the esxcfg-mpath
        5. Creating a VMFS datastore
          1. How to do it...
            1. Using the New Datastore wizard
            2. Using vmkfstools
          2. There's more…
        6. Expanding/growing a VMFS datastore
          1. How to do it...
            1. Using the Increase Datastore Capacity wizard
            2. Using vmkfstools
          2. How it works...
        7. Extending a VMFS datastore
          1. Getting ready
          2. How to do it...
            1. Using the Increase Datastore Capacity wizard
            2. Using vmkfstools
          3. How it works...
          4. There's more…
        8. Unmounting a VMFS datastore
          1. How to do it...
            1. Using the vSphere Web Client GUI to unmount
            2. Using esxcli to unmount
        9. Mounting a VMFS datastore
          1. How to do it...
            1. Using the vSphere Web Client UI to mount
            2. Using esxcli to mount an unmounted volume
        10. Deleting a VMFS datastore
          1. How to do it...
        11. Upgrading VMFS-3 to VMFS-5
          1. How to do it...
            1. Upgrading the VMFS using vSphere Web Client GUI
            2. Upgrading using vmkfstools
          2. How it works...
        12. Mounting VMFS on a snapshot LUN
          1. How to do it...
            1. Using the New Datastore wizard
            2. Using ESXi CLI
          2. How it works...
        13. Resignaturing VMFS on a snapshot LUN
          1. How to do it...
            1. Using the New Datastore wizard
            2. Using ESXi CLI
          2. How it works…
        14. Masking paths to a LUN
          1. How to do it…
        15. Unmasking paths to a LUN
          1. How to do it…
        16. Creating a datastore cluster
          1. How to do it
          2. How it works…
        17. Enabling Storage DRS
          1. How to do it…
          2. How it works…
            1. Initial placement
            2. Balancing space utilization
            3. Balancing I/O load
          3. There's more…
      13. 6. Managing iSCSI and NFS Storage
        1. Introduction
        2. Adding the software iSCSI adapter
          1. How to do it...
          2. How it works...
        3. Creating a new VMkernel interface for iSCSI or NFS
          1. How to do it...
          2. There's more
        4. Preparing the vSphere network for iSCSI multipathing
          1. How to do it...
          2. There's more...
        5. Binding VMkernel interfaces to the software iSCSI adapter
          1. How to do it...
        6. Adding an iSCSI target server to the software iSCSI adapter
          1. How to do it...
          2. How it works...
        7. Creating an NFS datastore
          1. Getting ready
          2. How to do it...
          3. How it works...
      14. 7. Profile-driven Storage and Storage I/O Control
        1. Introduction
          1. Profile-driven storage
          2. Storage I/O Control (SIOC)
        2. Adding a storage provider
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        3. Creating user-defined storage capabilities
          1. How to do it...
        4. Mapping user-defined storage capabilities to datastores
          1. How to do it...
        5. Creating a VM storage profile and enabling it
          1. How to do it...
        6. Assigning storage profiles to virtual machine disks and checking compliance
          1. How to do it...
        7. Enabling Storage I/O Control (SIOC)
          1. How to do it...
          2. How it works...
        8. Modifying disk shares on a VM
          1. How to do it...
          2. How it works...
      15. 8. Configuring the vSphere Network
        1. Introduction
        2. Creating a vSphere Standard Switch
          1. How to do it...
            1. Using vSphere Web Client
            2. Using esxcfg-vswitch
        3. Deleting a vSphere Standard Switch
          1. How to do it...
            1. Using the vSphere Web Client
            2. Using esxcfg-vswitch
        4. Creating a VMkernel interface on a vSphere Standard Switch
          1. How to do it...
            1. Using vSphere Web Client
            2. Using esxcfg-vswitch and esxcfg-vmknic
          2. There's more…
          3. See also
        5. Deleting a port group
          1. How to do it...
            1. Using vSphere Web Client
            2. Using esxcfg-vswitch
        6. Adding an uplink to a vSphere Standard Switch
          1. How to do it...
            1. Using vSphere Web Client
            2. Using esxcfg-vswitch
        7. Creating a vSphere Distributed Switch
          1. How to do it...
          2. How it works...
        8. Creating a distributed port group
          1. How to do it...
          2. How it works...
        9. Adding hosts to a vSphere Distributed Switch
          1. How to do it...
        10. Mapping a physical adapter (vmnic) to a dvUplink
          1. How to do it...
            1. Using the vSphere Web Client
            2. Using esxcfg-vswitch
          2. How it works...
        11. Migrating virtual machine network from vSphere Standard Switch to vSphere Distributed Switch
          1. How to do it...
          2. How it works...
          3. There's more…
        12. Migrating management and VMkernel interfaces between vSphere Standard and Distributed Switches
          1. How to do it...
          2. See also
        13. Creating a VMkernel interface on a vSphere Distributed Switch
          1. How to do it...
        14. Exporting the vSphere Distributed Switch configuration
          1. How to do it...
          2. How it works...
          3. See also
        15. Restoring the vSphere Distributed Switch configuration
          1. How to do it...
          2. How it works...
        16. Importing a vSphere Distributed Switch into the datacenter from a backup
          1. How to do it...
          2. How it works...
        17. Enabling port mirroring on a DSwitch
          1. How to do it...
          2. How it works...
        18. Enabling NetFlow on a DSwitch
          1. How to do it...
          2. How it works...
          3. See also
        19. Configuring private VLANs (PVLANs) on a DSwitch
          1. How to do it...
          2. How it works...
      16. 9. Creating and Managing Virtual Machines
        1. Introduction
          1. The virtual machine components
          2. Files that back a virtual machine
          3. The virtual machine configuration file
          4. The virtual machine BIOS file
          5. Virtual machine enhancements available with vSphere 5.1
        2. Creating a virtual machine
          1. How to do it...
        3. Creating a new hard disk for a virtual machine
          1. Virtual machine disk provisioning methods
          2. Virtual machine disk modes
          3. How to do it...
        4. Adding an existing hard disk to a virtual machine
          1. How to do it...
        5. Attaching RDM to a virtual machine
          1. How to do it...
        6. Mapping a virtual machine's vNIC to a different port group
          1. How to do it...
          2. How it works...
        7. Adding a new virtual network adapter to a virtual machine
          1. How to do it...
        8. Creating a virtual machine snapshot
          1. How to do it...
          2. How it works...
          3. There's more...
        9. Deleting a virtual machine snapshot
          1. How to do it...
          2. How it works...
          3. See also
        10. Reverting to a current virtual machine snapshot
          1. How to do it...
          2. How it works...
        11. Going to a virtual machine snapshot
          1. How to do it...
          2. How it works...
        12. Consolidating snapshots
          1. How to do it...
          2. How it works...
          3. See also
        13. Exporting a virtual machine
          1. How to do it...
          2. How it works...
      17. 10. Configuring vSphere HA
        1. Introduction
        2. Enabling vSphere HA on a cluster
          1. How to do it...
          2. How it works...
          3. See also
        3. Setting host isolation response for an HA cluster
          1. How to do it...
          2. See also
        4. Setting VM restart priority for an HA cluster
          1. How to do it...
        5. Configuring VM monitoring
          1. How to do it...
          2. How it works...
        6. Configuring datastore heartbeating
          1. How to do it...
          2. How it works...
        7. Disabling host monitoring
          1. How to do it...
          2. How it works...
        8. Configuring vSphere HA admission control
          1. How to do it...
          2. How it works...
            1. Failover capacity by static number of hosts
            2. Failover capacity by reserving a percentage of the cluster resources
            3. Dedicated failover hosts
          3. See also
        9. Configuring a VM to override host monitoring and VM monitoring settings
          1. How to do it...
      18. 11. Configuring vSphere DRS, DPM, and VMware EVC
        1. Introduction
        2. Enabling vSphere DRS on a cluster
          1. How to do it…
          2. How it works…
        3. Choosing a DRS automation level
          1. How to do it…
          2. How it works…
        4. Overriding the cluster automation level for a VM
          1. How to do it…
          2. How it works…
        5. Setting a migration threshold
          1. How to do it…
          2. How it works…
        6. Creating host and VM DRS groups
          1. How to do it…
        7. Creating virtual machines to host affinity rules
          1. How to do it…
          2. How it works…
            1. Must rules:
            2. Should rules:
        8. Creating "Inter-VM" affinity/anti-affinity rules
          1. How to do it…
          2. How it works…
            1. Keep virtual machines together:
            2. Separate virtual machines:
        9. Configuring vSphere Distributed Power Management (DPM)
          1. How to do it…
          2. How it works…
        10. Enabling power management on a per-host level
          1. How to do it…
        11. Configuring VMware EVC (Enhanced vMotion Compatibility)
          1. How to do it…
          2. How it works…
          3. See also
      19. 12. Upgrading and Patching using vSphere Update Manager
        1. Introduction
        2. Preparing a database for vSphere Update Manager
          1. How to do it...
          2. How it works...
          3. See also
        3. Installing vSphere Update Manager
          1. How to do it...
          2. How it works...
        4. Installing the vSphere Update Manager plugin
          1. How to do it...
        5. Adding a download source
          1. How to do it...
          2. How it works...
        6. Creating a baseline
          1. How to do it...
          2. How it works...
        7. Importing ESXi Images
          1. How to do it...
          2. How it works...
        8. Creating a host baseline group
          1. How to do it...
        9. Creating a VM and VA baseline group
          1. How to do it...
        10. Remediating a host or a cluster
          1. How to do it...
          2. How it works...
            1. Host maintenance mode options for remediation
            2. Cluster maintenance mode options for remediation
        11. Remediating a VM or a VA
          1. How to do it...
          2. How it works...
        12. Staging patches
          1. How to do it...
          2. How it works...
        13. Installing the Update Manager Download Service (UMDS)
          1. How to do it...
        14. Configuring UMDS and downloading data
          1. How to do it...
        15. Creating a shared repository
          1. How to do it...
          2. How it works...
        16. Using a shared repository
          1. How to do it...
      20. 13. Using vSphere Management Assistant (vMA 5.1)
        1. Introduction
        2. Deploying the vMA appliance
          1. How to do it…
          2. How it works…
        3. Preparing vMA for first use
          1. How to do it…
          2. How it works…
        4. Configuring vMA to join an existing domain
          1. How to do it…
        5. Adding vCenter to vMA with AD authentication
          1. How to do it…
          2. How it works…
        6. Adding vCenter to vMA with fastpass (fpauth) authentication
          1. How to do it…
          2. How it works…
        7. Adding an ESXi host to vMA
          1. How to do it…
          2. How it works…
        8. Reconfiguring an added target server
          1. How to do it…
            1. Changing the authentication policy
            2. Changing or recovering a user
          2. How it works…
        9. Running CLI command on target servers
          1. How to do it…
            1. Method 1 – Issue commands on the default target
            2. Method 2 – Issue commands by specifying a target server
            3. Method 3 – Issuing commands against a vCenter Server added as the target
      21. Index