Acquisitions Editor: Agatha Kim

Development Editor: David Johnson

Technical Editor: Van Van Noy

Production Editor: Christine O’Connor

Copy Editor: Kathy Grider-Carlyle

Editorial Manager: Pete Gaughan

Production Manager: Tim Tate

Vice President and Executive Group Publisher: Richard Swadley

Vice President and Publisher: Neil Edde

Book Designer: Happenstance Type-O-Rama

Proofreader: Adept Content Solutions LLC

Indexer: Robert Swanson

Project Coordinator, Cover: Katherine Crocker

Cover Designer: Ryan Sneed

Copyright © 2012 by John Wiley & Sons, Inc., Indianapolis, Indiana

Published simultaneously in Canada

ISBN: 978-1-118-17671-9

ISBN: 978-1-118-22698-8 (ebk.)

ISBN: 978-1-118-24017-5 (ebk.)

ISBN: 978-1-118-26480-5 (ebk.)

No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permissions.

Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including without limitation warranties of fitness for a particular purpose. No warranty may be created or extended by sales or promotional materials. The advice and strategies contained herein may not be suitable for every situation. This work is sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional services. If professional assistance is required, the services of a competent professional person should be sought. Neither the publisher nor the author shall be liable for damages arising herefrom. The fact that an organization or Web site is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or Web site may provide or recommendations it may make. Further, readers should be aware that Internet Web sites listed in this work may have changed or disappeared between when this work was written and when it is read.

For general information on our other products and services or to obtain technical support, please contact our Customer Care Department within the U.S. at (877) 762-2974, outside the U.S. at (317) 572-3993 or fax (317) 572-4002.

Wiley publishes in a variety of print and electronic formats and by print-on-demand. Some material included with standard print versions of this book may not be included in e-books or in print-on-demand. If this book refers to media such as a CD or DVD that is not included in the version you purchased, you may download this material at http://booksupport.wiley.com. For more information about Wiley products, visit www.wiley.com.

Library of Congress Control Number: 2012933616

TRADEMARKS: Wiley, the Wiley logo, and the Sybex logo are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates, in the United States and other countries, and may not be used without written permission. All other trademarks are the property of their respective owners. John Wiley & Sons, Inc. is not associated with any product or vendor mentioned in this book.

Dear Reader,

Thank you for choosing Virtualization Essentials. This book is part of a family of premium-quality Sybex books, all of which are written by outstanding authors who combine practical experience with a gift for teaching.

Sybex was founded in 1976. More than 30 years later, we’re still committed to producing consistently exceptional books. With each of our titles, we’re working hard to set a new standard for the industry. From the paper we print on, to the authors we work with, our goal is to bring you the best books available.

I hope you see all that reflected in these pages. I’d be very interested to hear your comments and get your feedback on how we’re doing. Feel free to let me know what you think about this or any other Sybex book by sending me an email at nedde@wiley.com. If you think you’ve found a technical error in this book, please visit http://sybex.custhelp.com. Customer feedback is critical to our efforts at Sybex.

Best regards,

Neil Edde

Vice President and Publisher

Sybex, an Imprint of Wiley

To my friends and family, near and far.

Acknowledgments

A project is rarely a solo affair, and this one depended on a large crew for it to arrive. I need to thank Scott Lowe for shoveling the path and aiming me at the correct door. My deepest gratitude goes to Mark Milow for helping me climb aboard this rocket, to Mike Szfranski for your always open book of knowledge, to Nick Gamache for the insights, and to Tony Damiano for keeping our vehicle in the fast lane.

My heartfelt thanks also go to the virtual team at Sybex: Pete Gaughan, David Johnson, Van Van Noy, Christine O’Connor, Kathy Grider-Carlyle, and Mariann Barsolo for their steadfast support, forcing me to improve with each chapter and keeping it all neat and clean. Special thanks go to Agatha Kim for getting this whole adventure rolling.

I need to thank my family beginning with my parents, teachers both, who instilled me with a love of reading and writing and set me on a path that somehow led here. Thank you to my boys, Lucas and Noah, who fill our days with laughter and music. And finally, a huge hug to my wife, Elizabeth, who encouraged me even when she had no idea what I was writing about. I love you.

About the Author

Matt Portnoy has been an information technology professional for more than 30 years, working in organizations such as NCR, Sperry/Unisys, Stratus Computer, Oracle, and currently VMware. He has been in the center of many of the core technological trends during this period, including the birth of the PC, client-server computing, fault tolerance and availability, the rise of the Internet, and now virtualization, which is the foundation for cloud computing. As both a presales and post-sales analyst, he has worked with all of the disciplines computing offers, including innumerable programming languages, operating systems, application design and development, database operations, networking, security, availability, and virtualization. He has spoken at the industry’s largest virtualization conference, VMworld, and is a frequent speaker at user group meetings. He also has been teaching database classes as an adjunct professor at Wake Tech Community College in Raleigh, North Carolina, since 2007.

Introduction

We live in an exciting time. The information age is exploding around us, giving us access to dizzying amounts of information at the instant it is available. Smart phones and tablets provide an untethered experience streaming video, audio, and other media formats to just about any place on the planet. Even people who are not “computer literate” use Facebook to catch up with friends and family, use Google to research a new restaurant choice and print directions to get there, or Tweet their reactions once they have sampled the fare. The infrastructure supporting these services is also growing exponentially, and the technology that facilitates this rapid growth is virtualization.

On one hand, virtualization is nothing more than an increasingly efficient use of existing resources that delivers huge cost savings in a brief amount of time. On the other, it offers organizations new models of application deployment for greater uptime to meet user expectations, modular packages to provide new services in minutes instead of weeks, and advanced features that bring automatic load balancing, scalability without downtime, self-healing, self-service provisioning, and many other capabilities to support business critical applications that improve on traditional architecture. Large companies have been using this technology for five to ten years, while smaller and medium-sized businesses are just getting there now. Some of them might miss the movement altogether and jump directly to cloud computing, the next evolution of application deployment. Virtualization is the foundation for cloud computing as well.

This quantum change in our world echoes similar trends from our recent history as electrical power and telephony capabilities spread and then changed our day-to-day lives. During those periods, whole industries sprung up out of nothing, providing employment and opportunity to people who had the foresight and chutzpah to seize the moment. That same spirit and opportunity is available today as this area is being defined and created right before our eyes. If not a virtualization vendor, there are hardware partners who provide servers, networking vendors for connectivity, storage partners for data storage, and everyone provides services. Software vendors are building new applications specifically for these new architectures. Third parties are creating tools to monitor and manage these applications and infrastructure areas. As cloud computing begins to become the de facto model for development, deployment, and maintaining application services, this area will expand even further.

The first generation of virtualization specialists acquired their knowledge out of necessity: they were server administrators who needed to understand the new infrastructure being deployed in their datacenters. Along the way, they picked up some networking knowledge to manage the virtual networks, storage knowledge to connect to storage arrays, and application information to better interface with the application teams. Few people have experience in all of those areas. Whether you have some virtualization experience, or none at all, this text will give you the foundation to understand what virtualization is, position why it is a crucial portion of today’s and tomorrow’s information technology infrastructure, and give you the opportunity to explore and experience one of the most exciting and fastest growing topics in technology today.

Good reading and happy virtualizing!

Who Should Read This Book

This text is designed to provide the basics of virtualization technology to someone who has little or no prior knowledge of the subject. This book will be of interest to you if you are an IT student looking for information about virtualization, or as an IT manager who needs a better understanding of virtualization fundamentals as part of your role. This book might also be of interest if you are an IT professional who specializes in a particular discipline (server administration, networking, storage) and are looking for an introduction into virtualization or cloud computing as a way to advance inside your organization.

The expectation is that you have:

Some basic PC experience

An understating of what an operating system is and does

Conceptual knowledge of computing resources (CPU, memory, storage, and network)

A high-level understanding of how programs use resources.

This text would not be of interest if you are already a virtualization professional and you are looking for a guidebook or reference.

What You Need

The exercises and illustrations used in this text were created on a system using Windows 7 SP1. VMware Player is used as the virtualization platform. It is available as a free download from http://downloads.vmware.com/d/. It is recommended that you have at least 2 GB of memory, though more will be better. The installation requires 150 MB of disk storage.

The examples demonstrate the creation of two virtual machines: one running Windows 7, the other running Red Hat Linux. You will need the installation media for those as well. Each of the virtual machines requires about 30 GB of disk space.

What Is Covered in This Book

Here’s a glance at what is in each chapter.

Chapter 1: Understanding Virtualization introduces the basic concepts of computer virtualization beginning with mainframes and continues with the computing trends that have led to current technologies.

Chapter 2: Understanding Hypervisors focuses on hypervisors, the software that provides the virtualization layer, and compares some of the current offerings in today’s marketplace.

Chapter 3: Understanding Virtual Machines describes what a virtual machine is composed of, explains how it interacts with the hypervisor that supports its existence, and provides an overview of managing virtual machine resources.

Chapter 4: Creating A Virtual Machine begins with the topic of converting existing physical servers into virtual machines and provides a walkthrough of installing VMware Player, the virtualization platform used in this text, and a walkthrough of the creation of a virtual machine.

Chapter 5: Installing Windows on a Virtual Machine provides a guide for loading Microsoft Windows in the created virtual machine and then describes configuration and tuning options.

Chapter 6: Installing Linux on a Virtual Machine provides a guide for loading Red Hat Linux in a virtual machine and then walks through a number of configuration and optimization options.

Chapter 7: Managing CPUs for a Virtual Machine discusses how CPU resources are virtualized and then describes various tuning options and optimizations. Included topics are hyper-threading and Intel versus AMD.

Chapter 8: Managing Memory for a Virtual Machine covers how memory is managed in a virtual environment and the configuration options available. It concludes with a discussion of various memory optimization technologies that are available and how they work.

Chapter 9: Managing Storage for a Virtual Machine examines how virtual machines access storage arrays and the different connection options they can utilize. Included are virtual machine storage options and storage optimization technologies such as deduplication.

Chapter 10: Managing Networking for a Virtual Machine begins with a discussion of virtual networking and how virtual machines use virtual switches to communicate with each other and the outside world. It concludes with virtual network configuration options and optimization practices.

Chapter 11: Copying a Virtual Machine discusses how virtual machines are backed up and provisioned through techniques such as cloning and using templates. It finishes with a powerful feature called snapshots that can preserve a virtual machine state.

Chapter 12: Managing Additional Devices in a Virtual Machines begins by discussing virtual machine tools, vendor provided application packages that optimize a virtual machines performance, and concludes with individual discussions of virtual support for other peripheral devices like CD/DVD drives and USB devices.

Chapter 13: Understanding Availability positions the importance of availability in the virtual environment and then discusses various availability technologies that protect individual virtual machines, virtualization servers, and entire datacenters from planned and unplanned downtime.

Chapter 14: Understanding Applications in a Virtual Machine focuses on the methodology and practices for deploying applications in a virtual environment. Topics include application performance, using resource pools, and deploying virtual appliances.

Appendix: Answers to Additional Exercises contains all of the answers to the additional exercises found at the end of every chapter.

Glossary lists the most commonly used terms throughout the book.

How to Contact the Author

I welcome feedback from you about this book or about books you’d like to see from me in the future. You can reach me by writing to mportnoyvm@gmail.com.

Sybex strives to keep you supplied with the latest tools and information you need for your work. Please check their website at http://www.sybex.com/go/virtualizationessentials, where we’ll post additional content and updates that supplement this book if the need arises.

CHAPTER 1

Understanding Virtualization

We are in the midst of a substantial change in the way computing services are provided. As a consumer, you surf the web on your cell phone, get directions from a GPS device, and stream movies and music from the cloud. At the heart of these services is virtualization—the ability to abstract a physical server into a virtual machine.

In this chapter, you will explore some of the basic concepts of virtualization, review how the need for virtualization came about, and learn why virtualization is a key building block to the future of computing.

Describing virtualization

Understanding the importance of virtualization

Understanding virtualization software operation

Describing Virtualization

Over the last fifty years, certain key trends created fundamental changes in how computing services are provided. Mainframe processing drove the sixties and seventies. Personal computers, the digitization of the physical desktop, and client/server technology headlined the eighties and nineties. The Internet, boom and bubble, spanned the last and current centuries and continues today. We are, though, in the midst of another of those model-changing trends: virtualization.

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!