Scripting VMware Power Tools: Automating Virtual Infrastructure Administration
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
1111443434
Scripting VMware Power Tools: Automating Virtual Infrastructure Administration
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
51.95 In Stock
Scripting VMware Power Tools: Automating Virtual Infrastructure Administration

Scripting VMware Power Tools: Automating Virtual Infrastructure Administration

by Al Muller
Scripting VMware Power Tools: Automating Virtual Infrastructure Administration

Scripting VMware Power Tools: Automating Virtual Infrastructure Administration

by Al Muller

eBook

$51.95 

Available on Compatible NOOK devices, the free NOOK App and in My Digital Library.
WANT A NOOK?  Explore Now

Related collections and offers


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

Product Details

ISBN-13: 9780080516776
Publisher: Syngress Publishing
Publication date: 11/07/2006
Sold by: Barnes & Noble
Format: eBook
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.

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
From the B&N Reads Blog

Customer Reviews