VMware Cookbook
Ryan Troy
Matthew Helmke
Andy Oram
Copyright 2009 Ryan Troy and Matthew Helmke
This book uses RepKover, a durable and flexible lay-flat binding.
OReilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (.
Nutshell Handbook, the Nutshell Handbook logo, and the OReilly logo are registered trademarks of OReilly Media, Inc. VMware Cookbook, the image of a leatherback sea turtle, and related trade dress are trademarks of OReilly Media, Inc.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and OReilly Media, Inc., was aware of a trademark claim, the designations have been printed in caps or initial caps.
While every precaution has been taken in the preparation of this book, the publisher and authors assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein.
O'Reilly Media
Preface
VMware is one of those products that many of us, including this books authors, have been reading about for years. Ryan had the opportunity to become involved with and architect a virtualized environment a few years ago. After researching several options, he became particularly interested in and impressed by VMwares enterprise virtualization platform. As time passed and he worked directly with VMwares products in a production environment, he became even more enthused.
Matthew and Ryan have worked together on several projects in the past. In the summer of 2008, the two of us decided we would like to write a book together. We tossed around ideas and decided to write on VMwares ESX platform, because it impressed us so. Since Matthew was already an established writer and also technologically proficient, although new to this specific software, we decided that Ryan would do the technical writing and Matthew would concentrate his efforts on making sure it all came across clearly and accurately. As we mention later in the Acknowledgments, Dell was kind enough to lend us some equipment for testing while writing, and the two of us got together and began experimenting.
We are genuinely delighted by VMware as a company, and have found its employees very kind and helpful. We have also become sold on its products. Using VMwares platform in a production environment has been everything it is advertised to be: it has made system administration easier, made the use of resources more efficient and cost-effective, and quite frankly been a lot of fun. If this werent the case, like all true geeks (in the best sense of the word), we would find something else to play with. So far, we havent.
This book encompasses many of the most useful and interesting recipes we have discovered while using the platform in production, as well as some cool tricks we encountered while testing and playing. We believe that anyone whos using the VMware platform will find this book useful, and we hope it helps you enjoy VMware as much as we do.
Audience
This book is intended for system administrators who have some experience with VMware ESX, ESXi, or vSphere. Throughout the book weve tried to appeal to beginners and also include a generous amount of complex recipes for advanced users. We believe this book will be a solid reference guide for any system administrator, regardless of his level of knowledge. We hope you enjoy it!
Organization of This Book
This book is made up of seven chapters:
, covers installation details for ESX and ESXi. It includes instructions for 3.x and the steps that worked for 4.0 at the time the book was written.
, covers partitions, iSCSI and NFS configuration, and other choices reflecting local or external data storage.
, covers communications at multiple levels, including configuration of virtual switches, software and hardware adapters, Ethernet frame sizes, and more.
, shows you how best to apportion memory and CPU resources through clustering, shares, hot add/hotplug support, and other options.
, presents miscellaneous commands that can rescue you in a pinch and help you keep apprised of your servers functioning.
, covers a range of access issues, such as how to control which users have access to each level of the system and how to set up firewalls, networking, and remote access to your desired level of security.
, introduces the configuration files used to control basic networking options, startup activities, and other aspects of the system youll want to automate in order to make it easier to replicate virtual machines.
Along the way, youll also find plenty of pointers and advice on good programming practices and tips that may help you find and solve hard-to-detect programming errors. There are also plenty of links to websites containing further details on the topics covered .
Font Conventions
This book uses the following typographical conventions:
ItalicUsed for email addresses, URLs, filenames, pathnames, and emphasizing new terms when they are first introduced
Constant width
Used for the contents of files and for commands and their output
Constant width bold
Used in code sections to show commands or text that would be typed by the user, and, occasionally, to highlight portions of code
Constant width italic
Used for replaceable items and some comments in code sections
Note
Indicates a tip, suggestion, or general note relating to the nearby text.
Warning
Indicates a warning or caution relating to the nearby text.
Using Code Examples
This book is here to help you get your job done. In general, you may use the code in this book in your programs and documentation. You do not need to contact us for permission unless youre reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing a CD-ROM of examples from OReilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of example code from this book into your products documentation does require permission.
We appreciate, but do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example: VMware Cookbook , by Ryan Troy and Matthew Helmke. Copyright 2010 Ryan Troy and Matthew Helmke, 978-0-596-15725-8.
If you feel your use of code examples falls outside fair use or the permission given above, feel free to contact us at .
Wed Like to Hear from You
Every recipe in this book has been tested on various platforms, but occasionally you may encounter problems. The information in this book has also been verified at each step of the production process. However, mistakes and oversights can occur and we will gratefully receive details of any you find, as well as any suggestions you would like to make for future editions. You can contact the author and editors at:
OReilly Media, Inc. |
1005 Gravenstein Highway North |
Sebastopol, CA 95472 |