Book Image

VirtualBox 3.1: Beginner's Guide

By : Alfonso Vidal Romero, Alfonso Vidal Romero Elizondo
Book Image

VirtualBox 3.1: Beginner's Guide

By: Alfonso Vidal Romero, Alfonso Vidal Romero Elizondo

Overview of this book

The furore around virtualization is taking the technology world by storm and is a must for efficient utilization of network server capacity, storage administration, energy, and capital. VirtualBox is free and this brings down your upfront costs for an agile data center. VirtualBox will transform your IT infrastructure into a lean Data Center on a Windows XP/7 or Ubuntu Linux platform. Although VirtualBox has grown by leaps and bounds, there is not enough documentation to guide you through its features and implementation.This hands-on guide gives you a thorough introduction to this award-winning virtualization product. It will help you to implement the right virtual environment for you. Additionally, this book will help you set up an environment that will work for your system. You will learn to architect and deploy your first virtual machine without being overwhelmed by technical details.This practical book unveils the robust capabilities and easy-to-use graphical interface of VirtualBox to help you to effectively administer and use virtual machines in a home/office environment. You begin by creating your first virtual machine on a Windows/Linux guest operating system and installing guest additions. The book then goes on to discuss the various formats that VirtualBox supports and how it interacts with other formats. The comprehensive instructions will help you to work with all the networking modes offered by VirtualBox. Virtual appliances will be explained in detail—how they help to reduce installation time for virtual machines and run them from VirtualBox.By the end of this book you will be able to run your own headless VirtualBox server, to create, manage, and run virtual machines in that server from a remote PC.
Table of Contents (16 chapters)
VirtualBox 3.1: Beginner's Guide
Credits
About the Author
About the Reviewer
Preface
Index

Preface

The furore around virtualization is taking the technology world by storm and is a must for efficient utilization of network server capacity, storage administration, energy, and capital. VirtualBox is free which brings down your upfront costs for an agile data center. VirtualBox will transform your IT infrastructure into a lean data center on a Windows XP/Vista/7, Windows 2003/2008 Server, Linux, Macintosh, or OpenSolaris platform. Although VirtualBox has grown by leaps and bounds, there is not enough documentation to guide you through its features and implementation.

This hands-on guide gives you a thorough introduction to this award-winning virtualization product. It will help you implement the right virtual environment for you. Additionally, this book will help you set up an environment that will work for your system. You will learn to architect and deploy your first virtual machine without being overwhelmed by technical details.

This practical book unveils the robust capabilities and easy-to-use graphical interface of VirtualBox to help you effectively administer and use virtual machines in a home or office environment. You begin by creating your first virtual machine on a Windows/Linux guest operating system and installing Guest Additions. The book then goes on to discuss the various formats that VirtualBox supports and how it interacts with other formats. The comprehensive instructions will help you to work with all the networking modes offered by VirtualBox. Virtual appliances will be explained in detail—how they help to reduce installation time for virtual machines and run them from VirtualBox.

By the end of this book, you will be able to run your own headless VirtualBox server to create, manage, and run virtual machines in that server from a remote PC.

What this book covers

Chapter 1, Getting to Work with VirtualBox, gives you a practical introduction to VirtualBox, and how you can use this excellent software to run several virtual machines inside a Windows/Linux host.

Chapter 2, Creating Your First Virtual Machine: Ubuntu Linux, teaches you about the basic settings needed to create and run a virtual machine using the Ubuntu operating system. You’ll also learn to test some basic functions like web browsing and using the OpenOffice suite of applications.

Chapter 3, Creating Your Second Virtual Machine: Windows 7, teaches you how to install Windows 7 on a virtual machine, along with the basic settings needed. You’ll also learn to test some basic functions like web browsing and using the Microsoft Office 2007 trial edition.

Chapter 4, Installing Guest Additions and Advanced Settings, teaches you how to install the Guest Additions to take real advantage of your virtual machines. You’ll also learn how to share folders between your host PC and your guest virtual machines, how to use seamless windows to integrate your host and guest desktops, and how to activate hardware 3D acceleration on your virtual machines.

Chapter 5, Storing Data in VirtualBox, teaches you everything about using virtual hard disks, and how you can use different disk formats such as VDI, VMDK, and VHD seamlessly in your virtual machines. You’ll also learn the differences between ‘cloning’ and ‘copying’ virtual hard disks, between fixed and dynamically expanding hard drive images, and how to choose between the different hard disk controllers used by VirtualBox.

Chapter 6, Networking with Virtual Machines, teaches you all about the five networking modes available in VirtualBox and how to choose the most appropriate mode for your virtual machines, depending on your needs. You’ll learn how to connect a virtual machine to the Internet and a local LAN via the default NAT mode, and how to choose the best networking mode when using a virtual machine as a web server, among other things.

Chapter 7, Using Virtual Appliances, teaches you about using virtual appliances and how they can help make your life easier when using virtual machines and VirtualBox. You’ll also learn how to import and export virtual machines using the OVF standard.

Chapter 8, Managing Your Virtual Machines From a Remote Computer, teaches you about the alternative front ends available in VirtualBox, and how you can use them to run your virtual machines based on your specific needs. You will also learn how to set up your very own Ubuntu headless server and use it to run a remote virtual machine from a Windows XP desktop PC.

Appendix A, Using Snapshots, teaches you how to save the state of your virtual machines through the snapshots feature. You’ll also learn to create alternate realities in your virtual machines, where you can follow two or more completely independent time paths.

What you need for this book

To run VirtualBox, you need a host PC with a 32- or 64-bit Intel or AMD CPU 1.5 GHz or faster, at least 512 MB of RAM and 30 MB of disk space. However, you must take into account the fact that each virtual machine will require additional disk space, and the more memory you can get your hands on, the better your experience with VirtualBox will be, especially when dealing with new guest operating systems like Windows 7. So in short, any recent Intel or AMD processor will do, but get all the RAM and hard disk space you can!

You can use a Windows XP/Vista/7, Mac OS X, OpenSolaris, or Linux host operating system. I recommend using an Ubuntu Linux or Windows 7 host. For the guest operating systems, you can use practically every Windows and Linux OS available. For more information you can visit http://www.virtualbox.org/wiki/Guest_OSes, where you can get a list of all the guest operating systems supported by VirtualBox.

Who this book is for

If you are a System Administrator who needs to set up a virtual machine and want to use an open source tool to do it, this book will prove invaluable. No prior knowledge of VirtualBox is required, but you should have experience with general system administration.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: “Open a terminal window and type sudo apt-get install dkms

A block of code is set as follows:

mkdir myshared VBoxManage sharedfolder add “UbuntuVB” --name “myshared”  --hostpath “/home/aromero/myshared

Any command-line input or output is written as follows:

“C:\Program Files\Sun\VirtualBox\VBoxManage” setextradata “UbuntuVB” “VBoxInternal/Devices/pcnet/0/LUN#0/Config/webserver/Protocol” “TCP”

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: “Scroll down until you locate the New password section”.

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title via the subject of your message.

If there is a book that you need and would like to see us publish, please send us a note in the SUGGEST A TITLE form on www.packtpub.com or e-mail .

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book on, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Tip

Downloading the example code for the book

Visit http://www.packtpub.com/files/code/9140_Code.zip to directly download the example code.

The downloadable files contain instructions on how to use them.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the let us know link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.