Scripting VMware Power Tools: Automating Virtual Infrastructure Administration: Automating Virtual Infrastructure Administration [NOOK Book]

Overview

This book contains simple and advanced scripting using both ESX and Linux commands to provide awesome virtual tools to automate administrative tasks of ESX Server.

This book will cover the native tools that VMware provides with ESX Server. It will then discuss in detail the different scripting API’s and how they can be leveraged to provide some very useful, practical and ...
See more details below
Scripting VMware Power Tools: Automating Virtual Infrastructure Administration: Automating Virtual Infrastructure Administration

Available on NOOK devices and apps  
  • NOOK Devices
  • Samsung Galaxy Tab 4 NOOK 7.0
  • Samsung Galaxy Tab 4 NOOK 10.1
  • NOOK HD Tablet
  • NOOK HD+ Tablet
  • NOOK eReaders
  • NOOK Color
  • NOOK Tablet
  • Tablet/Phone
  • NOOK for Windows 8 Tablet
  • NOOK for iOS
  • NOOK for Android
  • NOOK Kids for iPad
  • PC/Mac
  • NOOK for Windows 8
  • NOOK for PC
  • NOOK for Mac
  • NOOK for Web

Want a NOOK? Explore Now

NOOK Book (eBook)
$29.99
BN.com price
(Save 42%)$51.95 List Price

Overview

This book contains simple and advanced scripting using both ESX and Linux commands to provide awesome virtual tools to automate administrative tasks of ESX Server.

This book will cover the native tools that VMware provides with ESX Server. It will then discuss in detail the different scripting API’s and how they can be leveraged to provide some very useful, practical and time saving tools to manage a virtual infrastructure. From virtual server provisioning to backups and everything in between, this book is a one stop shop for virtual tools.

* An essential guide to virtualisation using both Linux and ESX commands

* The companion Web site for book provides dozens for working scripts and tools presented in the book

* Maximise VMware's powerful scripting language to automate time consuming administrative tasks
Read More Show Less

Product Details

  • ISBN-13: 9780080516776
  • Publisher: Elsevier Science
  • Publication date: 11/7/2006
  • Sold by: Barnes & Noble
  • Format: eBook
  • Edition number: 1
  • Pages: 398
  • File size: 8 MB

Read an Excerpt

Scripting VMware

Power Tools for Automating Virtual Infrastructure Administration
By Al Muller Stephen Beaver David A. Payne Jeremy Pries David E. Hart

Syngress

Copyright © 2006 Syngress Publishing, Inc.
All right reserved.

ISBN: 978-0-08-051677-6


Chapter One

Scripted Installation

Topics in this chapter:

* Setting Up the Scripted Installation

* Reviewing the Kickstart File

* Remove Network Installation

Introduction

If you are setting up your virtual infrastructure or plan on scaling it out and will be building ESX host servers, this chapter is a must for you. The scripted installation method is a fast, efficient, and sure way to provision ESX hosts, and you'll be amazed at how simple it is to set up. We'll also review the Kickstart file so you fully understand how this install method works, and touch on the remote network install procedure as well.

Setting Up the Scripted Installation

Setting up the scripted installation correctly will make the process run smoothly and provide you with a very satisfactory experience. As a result, you'll likely choose this method over any other for setting up ESX hosts that have similar configurations. You'll set up the script—a Kickstart configuration file—based on parameters you would normally select during an ESX server install. If you want the exact configuration of the ESX server where you are setting up the Kickstart file, then make the same choices you made when you built it originally. (You did document that, right?)

After you have set up the Kickstart file, you have two options for building new ESX servers: 1) From the new ESX server, insert the ESX Server installation CD in the local CD-ROM; or 2) install ESX Server across the network from installation files hosted on another ESX server. This second option is convenient if your data center or server room is geographically remote or just a pain to get to.

Additionally, the scripted installation method can run unattended. However, like any unattended install of software, if something goes wrong, you'll be prompted to respond, and the install will hang until you do so.

Creating the Script

So to begin, as a prerequisite for the scripted installation method, you need to have an ESX server built and ready to perform the setup for the scripted installation. Some of the unique parameters you will be setting include the following:

* Installation Type Two types are available: 1) Initial Installation (for a new install), and 2) Upgrade (if you are upgrading an existing ESX server such as an ESX Server 2.5 host).

* Root Password

* Time Zone

* IP Address Information It is recommended you statically set your ESX server IP address.

* Disk Partition Information

* Licensing Data This is a new "feature" in ESX 3.0.

You can choose DHCP if you want, but it is a good idea to have the IP information at hand, and it's recommended that your ESX server have static IP addresses.

To create the script, log on to the prebuilt ESX Server via a Web browser. You will be presented with the Web page shown in Figure 1.1.

From this page, click the Log In To The Scripted Installer link under the ESX Server Scripted Installer heading. You will then be presented with the Scripted Install Web page, as shown in Figure 1.2.

You must now input the information you want for the Kickstart script. In this example, the Installation Type field is set to Initial Installation, which means that this Kickstart file will be for new servers. If you want to have a script for upgrading existing ESX servers, you would change the install type to Upgrade.

In the Installation Method box, you can select one of the following three methods:

* CD-ROM This method allows you to install ESX Server from the CD-ROM of the new server itself. This method may require physical access to the server itself.

* Remote This method allows you to install ESX Server from a remote server that contains the ESX Installation files. If you choose this method, you will also need to include the URL and port number of the remote server.

* NFS This method allows you to use an NFS mount point. In the Remote Server URL, you would input the hostname of the NFS server and the mount point. For example, esx01:loadesx, where esx01 is the server name and loadesx is the mount point.

In the Network Method section, you can choose DHCP if you want to give your ESX server a dynamic IP address. Alternatively, you can select Static IP if you want to set your ESX server with a static IP.

In the Time Zone section, choose the time zone you would like your ESX server to be in. In the Reboot After Installation field, select Yes so your ESX server will reboot itself after the installation is complete.

Make sure you give the Root account a strong password and click Next.

If you chose to give your ESX server a static IP address, the next window you'll see will concern networking options (see Figure 1.3).

Next, input all of the IP information needed. Enter the specific information for your new ESX server, including the hostname and IP address, the subnet mask in the Netmask field, the gateway, and the nameserver (DNS). Use fully qualified domain names if you are running domains such as esxhost01.domian-name.net. Select which network device you would like the service console to run on and click Next.

The End User License Agreement (EULA) windows will appear (see Figure 1.4).

Of course, read the EULA, check the I Have Read And Accept The Terms In The License Agreement checkbox, and then click Next.

The Partition Configuration page should appear. It's here that you select how your ESX server s disk will be partitioned. A basic example can be seen in Figure 1.5.

If you modify this, which surely you will, make sure you give it at least the minimum required space to do so. Also, be aware that some SCSI card manufacturers do not use SDA, employing instead other devices, such as Compaq (HP)'s CCISS.

From the Drive list, choose a drive such as SDA, IDE (use /dev/hda), CCISS, or one of many others. In the next column, choose the mount point, such as root (/), boot (/boot), vmfs (vmfs3), swap (swap), and so on. Give each mount point a size in the Size column (in megabytes, but do not use MB as a suffix, such as in 102MB; use only the number 102, as shown in Figure 1.5). Lastly, provide the type in the Type column, which offers four choices: ext3, swap, vmkcore, and vmfs3.

New to ESX 3.0 is the Licensing Mode. Thus, you must select the appropriate mode for your installation:

* Server Based This mode allows you to obtain a Hcense automatically from your license server, which may have been set up on your VirtualCenter server.

* File Based This mode allows you to upload a license file

* Post Install This mode allows you to configure your licensing after the install is complete.

Once you have completed the partitioning information and licensing mode, click Next.

In the preceding example, Server-Based Licensing was chosen, so the next page that appears is that for Server-Based Licensing Information, as shown in Figure 1.6. You will add your license server information on this page.

Fill in the License Server information, including its port number—for example, 8555. In the Additional Options section, you may select vSMP (virtual symmetric multi-processing) and/or Consolidated Backup.

Additionally, you can select any VirtualCenter options as well. Click Next when you have finished.

If you chose File-Based licensing, you'll be presented with the page shown in Figure 1.7.

Input the license file, or click the Browse button to browse and select the license file. Once you've done so, click Next.

Now you can choose Dowrnload Floppy Image or Download Kickstart Image. The differences between these two include the following:

* Floppy Image This provides you with a disk image of a VMware ESX Server boot disk which can be used for unattended, scripted installations of ESX Server.

* Kickstart Image This provides the kickstart image that can be used by third-party deployment tools.

If you selected Download Floppy Image, save the image with an .img file extension. If you did not select DHCP in the preceding step because you want to create multiple images for multiple ESX hosts, go back and change the hostname and static IP information and save the floppy images with unique names.

VMware has modified the handling of partition tables so that ESX Server automatically clears only the LUNs you specifically designate in the Management Interface.

Remote Network Installation

Using a remote network installation to install ESX Server, create a boot floppy image to run the installation instead of scripting the installation. During the installation, you are asked to specify the location of the ESX Server CD-ROM.

To perform a remote network installation with a boot floppy, you need to follow three steps. First, use dd, rawwritewin, or rawrite to create a floppy image called bootnet.img. This file is located on the ESX Server CD-ROM in the /images directory. The second step is to put the boot floppy in your ESX host, and then boot the server. When the installation starts, you will be prompted to choose one of the following selections:

* HTTP This is the preferred installation method. Specify the name of the remote machine where the ESX Server CD-ROM is located, the root directory (/), and HTTP port 8555.

* NFS You must have an NFS server set up. Copy the ESX Server CD-ROM to the NFS server and point the new system to the NFS server.

* FTP You must have an FTP server set up. Copy the ESX Server CD-ROM to the FTP server and point the new system to the FTP server.

The third step is to complete the installation, which is very similar to installing ESX Server normally.

Summary

This chapter should have given you a good understanding of how to quickly scale out your virtual infrastructure using scripted installation methods. You should now be able to create an installation script that is customized for either one specific ESX host or many

Chapter Two

An Introduction to ESX Native Tools and How to Use Them

Topics in this chapter:

* Esxtop

* Vmkfstools

* Vmware-cmd

* Vmkusage

Introduction

This chapter is going to review the tools that come native to all ESX servers. It is important that, one, you understand these tools exist, and, two, you know how to use them from the command line and how you can incorporate them into scripts. VMware provides some very powerful tools that are built on native Linux functionality and that are expanded for use within the ESX host and the virtual machines residing on them.

Esxtop

Esxtop is a very simple yet powerful tool that can be used for diagnosing performance issues of the ESX host as well as the virtual machines. In Linux, there exists a comparable command-line tool, called Top, which can be used similarly for Linux OSes to gather performance metrics. VMware has expanded Esxtop to provide metrics specific to virtualization. Esxtop provides real-time monitoring of virtual machine processes (also known as worlds). Worlds are simply virtual machine processes run by the VMkernel. VMware has identified three types of worlds, or virtual machine processes, which exist in ESX Server. These are

* Virtual Machine

* System

* Service Console

But before delving too deep into specific processes or the worlds that Esxtop monitors, let's take a quick look at Esxtop when you run it.

(Continues...)



Excerpted from Scripting VMware by Al Muller Stephen Beaver David A. Payne Jeremy Pries David E. Hart Copyright © 2006 by Syngress Publishing, Inc.. Excerpted by permission of Syngress. All rights reserved. No part of this excerpt may be reproduced or reprinted without permission in writing from the publisher.
Excerpts are provided by Dial-A-Book Inc. solely for the personal use of visitors to this web site.

Read More Show Less

Table of Contents

Chapter 1 ESX Serve
Chap 2 Storage Testing
Chap 3 Building a VM
Chap 4 Modifying VM’s
Chap 5 VMDK’s
Chap 6 Free the P2V
Chap 7 ESX
Chap 8 Hot Hot Sites
Chap 9 Other Cool Tools
Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)