You are previewing VMware Cookbook, 2nd Edition.
O'Reilly logo
VMware Cookbook, 2nd Edition

Book Description

With scores of step-by-step solutions, this cookbook helps you work with VMware ESXi in a wide range of network environments. You’ll not only learn the basics—how to pool resources from hardware servers, computer clusters, networks, and storage, and then distribute them among virtual machines—but also how to overcome the stumbling blocks you’ll encounter when you monitor systems, troubleshoot problems, and deal with security. This expanded second edition covers recent advances in vCloud Director and vShield cloud security.

Table of Contents

  1. VMware Cookbook
  2. Preface
    1. Audience
    2. Organization of This Book
    3. Font Conventions
    4. Using Code Examples
    5. Safari® Books Online
    6. We’d Like to Hear from You
    7. Acknowledgments
  3. 1. VMware Infrastructure Installation
    1. 1.1. What Is VMware Infrastructure 5?
    2. 1.2. What Is VMware vSphere 5.0?
    3. Convergence from ESX to ESXi with vSphere 5.0
    4. 1.3. VMware ESXi 5.0 Configuration Maximums
      1. See Also
    5. 1.4. VMware ESXi 5.0 Server Overview
    6. 1.5. VMware ESXi 5.0 Overview
    7. 1.6. VMware ESXi 5.0 Installation
      1. See Also
    8. 1.7. VMware vCenter Server 5.0 Overview
    9. 1.8. vCenter Server 5.0 Installation
      1. VMware vCenter 5.0 Server Requirements
      2. VMware vCenter 5.0 Server Database Requirements
    10. 1.9. VMware vCenter Client 5.x Overview
    11. 1.10. vCenter Client 5.x Installation
    12. vCenter 5.0 Web Client Installation
    13. vSphere 5.0 License Changes
    14. 1.11. vConverter
  4. 2. Storage
    1. 2.1. Comparing ESXi Storage Options
      1. Problem
      2. Solution
      3. Discussion
    2. Selecting the Virtual Machine Datastore Location
      1. Problem
      2. Solution
      3. Discussion
    3. 2.2. Storage Runtime Naming Scheme
      1. Problem
      2. Solution
      3. Discussion
    4. 2.3. Creating a Network for the Software iSCSI Initiator
      1. Problem
      2. Solution
      3. Discussion
    5. 2.4. Configuring Software iSCSI on ESXi
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    6. 2.5. Configuring Hardware iSCSI with an HBA
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    7. 2.6. Configuring iSCSI in Windows Virtual Machines
      1. Problem
      2. Solution
      3. Discussion
    8. 2.7. Opening Firewall Ports for an ESXi iSCSI Software Initiator
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    9. 2.8. Multipathing with iSCSI
      1. Problem
      2. Solution
      3. Discussion
    10. 2.9. Adding Fibre Channel Storage in ESXi
      1. Problem
      2. Solution
      3. Discussion
    11. 2.10. Creating a Raw Device Mapping for Virtual Machines
      1. Problem
      2. Solution
      3. Discussion
    12. 2.11. Creating a VMkernel Port for Access to NFS Datastores
      1. Problem
      2. Solution
      3. Discussion
    13. 2.12. Configuring ESXi to Use NFS
      1. Problem
      2. Solution
      3. Discussion
    14. 2.13. Creating a VMFS Volume in vCenter
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    15. 2.14. Performing a Storage Rescan
      1. Problem
      2. Solution
      3. Discussion
    16. 2.15. Creating a VMFS Volume via the Command Line
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    17. 2.16. Viewing the Files that Define a VMFS Volume
      1. Problem
      2. Solution
      3. Discussion
    18. 2.17. Increasing the VMFS Volume Capacity
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    19. 2.18. Reading VMFS Metadata
      1. Problem
      2. Solution
      3. Discussion
    20. 2.19. Creating a Diagnostic Partition
      1. Problem
      2. Solution
      3. Discussion
    21. 2.20. Removing Storage Volumes from ESXi
      1. Problem
      2. Solution
      3. Discussion
    22. 2.21. Determining whether a VMFS Datastore Is on a Local or SAN Disk
      1. Problem
      2. Solution
      3. Discussion
    23. 2.22. Adjusting Timeouts When Adding Storage in vCenter
      1. Problem
      2. Solution
      3. Discussion
    24. 2.23. Setting Disk Timeouts in Windows
      1. Problem
      2. Solution
      3. Discussion
    25. Renaming Datastores
      1. Problem
      2. Solution
      3. Discussion
  5. 3. Networking
    1. 3.1. Configuring ESXi Network Ports and the Firewall
      1. Problem
      2. Solution
      3. Discussion
    2. 3.2. Creating a vSwitch for Virtual Machines
      1. Problem
      2. Solution
      3. Discussion
    3. 3.3. Removing a Virtual Switch
      1. Problem
      2. Solution
      3. Discussion
    4. 3.4. Adding VMotion to Enable Virtual Machine Migration
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    5. 3.5. Modifying the Speed of a Network Adapter
      1. Problem
      2. Solution
      3. Discussion
    6. 3.6. Choosing Network Elements that Protect Security
      1. Problem
      2. Solution
      3. Discussion
    7. 3.7. Setting the Basic Level 2 Security Policy
      1. Problem
      2. Solution
      3. Discussion
    8. 3.8. Ethernet Traffic Shaping on Standard vSwitches
      1. Problem
      2. Solution
      3. Discussion
    9. 3.9. Load Balancing and Failover
      1. Problem
      2. Solution
      3. Discussion
    10. 3.10. Enabling Jumbo Frames on a VMkernel for iSCSI
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    11. 3.11. Enabling Jumbo Frames on a Standard vSwitch
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    12. 3.12. Enabling Jumbo Frames on a Virtual Machine
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    13. 3.13. Changing the ESXi Host IP Address
      1. Problem
      2. Solution
      3. Discussion
    14. 3.14. Using the Remote Command Line to Locate Physical Ethernet Adapters
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    15. 3.15. Changing the Ethernet Port Speed via the Command Line
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    16. Enabling TCP Segmentation Offload Support on a Virtual Machine
      1. Problem
      2. Solution
      3. Discussion
    17. Enabling Jumbo Frames on a Distributed Switch
      1. Problem
      2. Solution
      3. Discussion
    18. Changing DNS Entries on the ESXi Host
      1. Problem
      2. Solution
      3. Discussion
    19. Creating a vSphere Distributed Switch
      1. Problem
      2. Solution
      3. Discussion
  6. 4. Resource and vCenter Management
    1. Monitoring Virtual Machines Inside the vSphere Cluster
      1. Problem
      2. Solution
      3. Discussion
    2. 4.1. Understanding Virtual Machine Memory Use Through Reservations, Shares, and Limits
      1. Problem
      2. Solution
      3. Discussion
    3. 4.2. Configuring Virtual Machine CPU Limits
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    4. 4.3. Configuring Virtual Machine CPU Shares
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    5. 4.4. Configuring Virtual Machine CPU Reservations
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    6. 4.5. Setting Up Resource Pools
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    7. 4.6. Understanding Resource Pools
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    8. 4.7. Expandable Reservations in Resource Pools
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    9. 4.8. Creating a Cluster
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    10. 4.9. Adding Hosts to a Cluster
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    11. Enabling Hyperthreading on a Virtual Machine
      1. Problem
      2. Solution
      3. Discussion
    12. 4.10. Enabling DRS in a Cluster
      1. Problem
      2. Solution
      3. Discussion
    13. 4.11. Understanding Cluster States and Warnings
      1. Problem
      2. Solution
      3. Discussion
    14. 4.12. Using ESXi CPU/RAM Hot Add/Hotplug Support
      1. Problem
      2. Solution
      3. Discussion
    15. 4.13. Surviving a vCenter Server Failure or Outage
      1. Problem
      2. Solution
      3. Discussion
  7. 5. Useful Tools and References
    1. 5.1. Entering Maintenance Mode via the Command Line
      1. Problem
      2. Solution
      3. Discussion
    2. 5.2. Displaying Server Information
      1. Problem
      2. Solution
      3. Discussion
    3. 5.3. Viewing the ESXi Version
      1. Problem
      2. Solution
      3. Discussion
    4. 5.4. Changing the Virtual Disk from BusLogic to LSI Logic
      1. Problem
      2. Solution
      3. Discussion
    5. 5.5. Hiding the VMware Tools Icon
      1. Problem
      2. Solution
      3. Discussion
    6. 5.6. Viewing Disk Partitions via the Console
      1. Problem
      2. Solution
      3. Discussion
    7. 5.7. Monitoring CPU Usage
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    8. 5.8. Monitoring Memory
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    9. 5.9. Monitoring Storage Performance
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    10. 5.10. Monitoring Network Usage
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    11. 5.11. Managing Virtual Switches
      1. Problem
      2. Solution
      3. Discussion
    12. 5.12. Generating a Logfile for VMware Support
      1. Problem
      2. Solution
      3. Discussion
    13. 5.13. Checking ESXi Patches
      1. Problem
      2. Solution
      3. Discussion
    14. 5.14. Enabling NTP in the vCenter
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    15. 5.15. Changing the ESXI Server’s Time
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    16. 5.16. Restarting the vCenter Agent
      1. Problem
      2. Solution
      3. Discussion
    17. 5.17. Finding Virtual Machine Snapshots
      1. Problem
      2. Solution
      3. Discussion
    18. 5.18. Renaming a Virtual Machine via the vCenter
      1. Problem
      2. Solution
      3. Discussion
    19. 5.19. Setting ESXi Options Using the Command Line
      1. Problem
      2. Solution
      3. Discussion
    20. 5.20. Configuring Authentication Choices Using the Command Line
      1. Problem
      2. Solution
      3. Discussion
    21. 5.21. Manipulating the Crash Dump Partition
      1. Problem
      2. Solution
      3. Discussion
    22. 5.22. Configuring a Firewall on the Command Line
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    23. 5.23. Managing ESXi Driver Modules
      1. Problem
      2. Solution
      3. Discussion
    24. 5.24. Configuring Storage Multipathing
      1. Problem
      2. Solution
      3. Discussion
    25. 5.25. Managing NFS Mounts
      1. Problem
      2. Solution
      3. Discussion
    26. 5.26. Managing Disk Volumes
      1. Problem
      2. Solution
      3. Discussion
    27. 5.27. Configuring Ethernet Adapters
      1. Problem
      2. Solution
      3. Discussion
    28. 5.28. Rescanning Host Bus Adapters
      1. Problem
      2. Solution
      3. Discussion
    29. 5.29. Managing Add-ons from the Command Line
      1. Problem
      2. Solution
      3. Discussion
    30. 5.30. Managing VMkernel Network Routes
      1. Problem
      2. Solution
      3. Discussion
    31. 5.31. Configuring Software iSCSI Options
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    32. 5.32. Configuring Hardware iSCSI Options
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    33. 5.33. Upgrading Software VIBs
      1. Problem
      2. Solution
      3. Discussion
    34. 5.34. Displaying Storage Path Information
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    35. 5.35. Managing SCSI Device Mappings with ESXi5 vSphere
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    36. 5.36. Managing VMkernel Ports
      1. Problem
      2. Solution
      3. Discussion
  8. 6. General Security
    1. 6.1. Enabling SSH on ESX 3.5 / ESX 4.x
      1. Problem
      2. Solution
      3. Discussion
    2. 6.2. Enabling Direct Root Logins on Your ESX Server
      1. Problem
      2. Solution
      3. Discussion
    3. 6.3. Adding Users and Groups
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    4. 6.4. Allowing or Denying Users the Use of SSH
      1. Problem
      2. Solution
      3. Discussion
    5. 6.5. Turning On the Message of the Day for Console Users
      1. Problem
      2. Solution
      3. Discussion
    6. 6.6. Changing the Root Password via the Console
      1. Problem
      2. Solution
      3. Discussion
    7. 6.7. Recovering a Lost Root Password
      1. Problem
      2. Solution
      3. Discussion
    8. 6.8. Disabling Direct Root Console Logins
      1. Problem
      2. Solution
      3. Discussion
    9. 6.9. Securing the GRUB Bootloader Menu
      1. Problem
      2. Solution
      3. Discussion
    10. 6.10. Disabling USB Drive Mounting
      1. Problem
      2. Solution
      3. Discussion
    11. 6.11. Opening and Closing Firewall Ports via the Console
      1. Problem
      2. Solution
      3. Discussion
    12. 6.12. Checking Default ESX Ports
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    13. 6.13. Turning on SNMP for Remote Administration
      1. Problem
      2. Solution
      3. Discussion
    14. 6.14. Using SNMP Version 3
      1. Problem
      2. Solution
      3. Discussion
    15. 6.15. Using Sudo
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    16. 6.16. Configuring Sudo
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    17. 6.17. Tracking Users via the CLI
      1. Problem
      2. Solution
      3. Discussion
    18. 6.18. Configuring Active Directory Authentication
      1. Problem
      2. Solution
      3. Description
    19. 6.19. Setting a Maximum Number of Failed Logins
      1. Problem
      2. Solution
      3. Discussion
    20. 6.20. Limiting Access to the Su Command
      1. Problem
      2. Solution
      3. Discussion
    21. 6.21. Setting User Password Aging
      1. Problem
      2. Solution
      3. Discussion
    22. 6.22. Disabling Copy and Paste
      1. Problem
      2. Solution
      3. Discussion
    23. 6.23. Disabling Disk Shrinking on Virtual Machines
      1. Problem
      2. Solution
      3. Discussion
    24. 6.24. Disabling Unneeded Devices
      1. Problem
      2. Solution
      3. Discussion
    25. 6.25. Preventing Unwanted Device Additions and Removals
      1. Problem
      2. Solution
      3. Discussion
    26. 6.26. Disabling VMware Tools Settings Override
      1. Problem
      2. Solution
      3. Discussion
  9. 7. Automating ESXi Installations
    1. 7.1. Selecting a Different Boot Option with ESXi 5.x
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    2. Building a Kickstart Configuration File for Automated Deployments
      1. Problem
      2. Solution
      3. Discussion
    3. Differences Between ESXi 4.x and ESXi 5.x Kickstart Commands
      1. Problem
      2. Solution
      3. Discussion
    4. 7.2. Advanced Installation Scripting Using %firstboot
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    5. 7.3. Advanced Installation Scripting Using %pre
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    6. 7.4. Advanced Installation Scripting Using %post
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    7. Methods of Upgrading ESX 4.0 Classic to ESXi 5.0
      1. Problem
      2. Solution
      3. Discussion
    8. Upgrading ESXi 4.x to ESXi 5.0 via CD/DVD
      1. Problem
      2. Solution
      3. Discussion
    9. Installing vSphere Auto Deploy
      1. Problem
      2. Solution
      3. Discussion
    10. Formatting a USB Key for ESXi Installations
      1. Problem
      2. Solution
      3. Discussion
  10. 8. vCloud Director Overview
    1. What Is vCloud Director?
      1. Problem
      2. Solution
      3. Discussion
    2. What’s New in vCloud Director 1.5
      1. Problem
      2. Solution
      3. Discussion
    3. vCloud Director Maximums
      1. Problem
      2. Solution
      3. Discussion
    4. vCloud Director Requirements
      1. Problem
      2. Solution
      3. Discussion
    5. vCloud Director (Evaluation Appliance)
      1. Problem
      2. Solution
      3. Discussion
    6. Deploying vShield Manager
      1. Problem
      2. Solution
      3. Discussion
    7. Attaching vCloud Director to the vCenter Server
      1. Problem
      2. Solution
      3. Discussion
    8. Creating a Provider Virtual Datacenter
      1. Problem
      2. Solution
      3. Discussion
    9. Allocating External Network Resources
      1. Problem
      2. Solution
      3. Discussion
    10. Adding Network Pools for Virtual Datacenters
      1. Problem
      2. Solution
      3. Discussion
  11. 9. vSphere Storage Appliance
    1. 9.1. What Is the vSphere Storage Appliance?
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    2. vSphere Storage Appliance Requirements
      1. Problem
      2. Solution
      3. Discussion
    3. Installation of the vSphere Storage Appliance
      1. Problem
      2. Solution
      3. Discussion
    4. vSphere Storage Appliance Cluster Creation Process
      1. Problem
      2. Solution
      3. Discussion
  12. Index
  13. About the Authors
  14. Colophon
  15. Copyright