You are previewing VirtualBox 3.1: Beginner's Guide.
O'Reilly logo
VirtualBox 3.1: Beginner's Guide

Book Description

Deploy and manage a cost-effective virtual environment using VirtualBox

  • Get up and running with VirtualBox to start working with your own virtual machines

  • Effectively administer and use virtual machines in a home/office environment

  • Analyze virtual machines with the most commonly used software tools

  • Create your first virtual machine with VirtualBox on Windows/Linux with step-by-step instructions and screenshots

  • In Detail

    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.

    An easy-to-follow guide that quickly gets you up and running with VirtualBox to start working with your virtual machines

    Table of Contents

    1. VirtualBox 3.1: Beginner's Guide
      1. VirtualBox 3.1: Beginner's Guide
      2. Credits
      3. About the Author
      4. About the Reviewer
      5. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Errata
          2. Piracy
          3. Questions
      6. 1. Getting to Work with VirtualBox
        1. Running multiple virtual machines
        2. Installing VirtualBox on Windows
        3. Time for action—downloading and installing VirtualBox on Windows
          1. What just happened?
          2. Have a go hero—experiment with VirtualBox on Windows
        4. Installing VirtualBox on Linux
        5. Time for action—downloading and Installing VirtualBox on Linux
          1. What just happened?
          2. Have a go hero—experimenting with VirtualBox on Linux
        6. Testing VirtualBox
        7. Time for action—creating and testing a Damn Small Linux virtual machine
          1. What just happened?
          2. Have a go hero—creating more virtual machines
          3. Pop quiz—doing the thing
        8. Summary
      7. 2. Creating Your First Virtual Machine: Ubuntu Linux
        1. Getting started
          1. Downloading the Ubuntu Linux Live CD
        2. Time for action—downloading the Ubuntu Desktop Live CD
          1. What just happened?
          2. Have a go hero—doing more with the thing
        3. Creating your Ubuntu Linux VM
        4. Time for action—creating a virtual machine
          1. What just happened?
          2. Have a go hero—experimenting with memory and hard disk storage types
          3. Pop quiz—creating virtual machines
        5. Configuring basic settings for your Ubuntu Linux VM
        6. Time for action—basic configuration for your VM
          1. What just happened?
          2. Pop quiz—configuring basic settings on your VMs
        7. Installing Ubuntu Linux on your VM
        8. Time for action—installing Ubuntu Desktop on your VM
          1. What just happened?
          2. Pop quiz—using the auto capture and host key features
        9. Running your Ubuntu Linux VM
        10. Time for action—running Ubuntu Linux
          1. What just happened?
          2. Web browsing with Mozilla Firefox
        11. Time for action—web browsing in your Ubuntu VM
          1. What just happened?
          2. Using OpenOffice.org in your virtual machine
        12. Time for action—using OpenOffice.org
          1. What just happened?
          2. Have a go hero—trying out Ubuntu One: your personal cloud
          3. Have a go hero—sharing information between your VM and your host PC
          4. Have a go hero—instant messaging from your virtual machine
          5. Pop quiz—running your Ubuntu Linux VM
          6. Shutting down your virtual machine
        13. Time for action—shutting down your VM
          1. What just happened?
          2. Pop quiz—your first VM
          3. Have a go hero—experimenting with a KUbuntu virtual machine
        14. Summary
      8. 3. Creating Your Second Virtual Machine: Windows 7
        1. Creating your Windows VM
        2. Time for action—creating a virtual machine
          1. What just happened?
          2. Have a go hero—experimenting with memory and hard disk storage types
          3. Pop quiz—creating virtual machines
        3. Booting your Windows 7 installation disk
        4. Time for action—booting your Windows 7 installation disk through the First Run Wizard
          1. What just happened?
          2. Have a go hero—using the First Run Wizard with other operating systems
        5. Installing Windows 7 on your VM
        6. Time for action installing Windows XP on your VM
          1. What just happened?
          2. Pop quiz—using the auto capture and host key features
        7. Making sound work on your Windows 7 VM
        8. Time for action—enabling audio on your Windows 7 virtual machine
          1. What just happened?
          2. Have a go hero—verifying audio in Windows guests
          3. Removing the installation media from your Windows 7 VM
        9. Time for action—removing installation media from your VM
          1. What just happened?
          2. Web browsing with Internet Explorer
        10. Time for action—web browsing in your Windows 7 VM
          1. What just happened?
          2. Have a go hero—using other web browsers
          3. Have a go hero instant messaging from your virtual machine
          4. Using Microsoft Office in your virtual machine
        11. Time for action—using OpenOffice.org
          1. What just happened?
          2. Have a go hero trying out Microsoft Office Live
          3. Have a go hero sharing information between your VM and your host PC
          4. Pop quiz—running your Windows 7 VM
          5. Shutting down your virtual machine
        12. Time for action—shutting down your VM
          1. What just happened?
          2. Pop quiz—your first VM
          3. Have a go hero—experimenting with other Windows versions
        13. Summary
      9. 4. Installing Guest Additions and Advanced Settings
        1. Introducing Guest Additions
        2. Installing Guest Additions for Windows
        3. Time for action—installing Guest Additions on a Windows XP virtual machine
          1. What just happened?
        4. Installing Guest Additions for Linux
        5. Time for action—installing Guest Additions on Linux Ubuntu
          1. What just happened?
        6. Installing Guest Additions for OpenSolaris
        7. Time for action—installing Guest Additions on OpenSolaris
          1. What just happened?
          2. Pop quiz—Guest Additions
        8. Using the fullscreen feature
        9. Time for action—using the fullscreen and windowed modes
          1. What just happened?
          2. Have a go hero—adjusting the VirtualBox Mini Toolbar settings
          3. Pop quiz—using the fullscreen feature
        10. Sharing folders between your host and guest PCs
        11. Time for action—sharing folders between a Windows XP host and a Ubuntu guest
          1. What just happened?
          2. Have a go hero—comparing file formatting characteristics between host and guest
          3. Have a go hero—creating transient and permanent shared folders
          4. Have a go hero—creating shared folders as a regular user in an Ubuntu guest
          5. Have a go hero—sharing folders between a Windows XP host and an OpenSolaris guest
          6. Have a go hero—sharing folders between an Ubuntu Linux host and a Windows XP guest
          7. Pop quiz—using the folder sharing feature
        12. Activating the Seamless Windows feature
        13. Time for action—activating Seamless Windows with Windows and Linux
          1. What just happened?
          2. Have a go hero—trying the Seamless Windows feature with other VMs
        14. Allowing 3D Hardware Acceleration in your virtual machines
        15. Time for action—using Compiz on your Ubuntu VM
          1. What just happened?
          2. Have a go hero—using 2D and 3D Hardware Acceleration on a Windows VM
        16. Summary
      10. 5. Storing Data in VirtualBox
        1. Using Virtual Disks in VirtualBox
          1. Pop quiz—using virtual disks in VirtualBox
          2. Using an additional VDI hard drive
        2. Time for action—adding a secondary virtual drive to your VM
          1. What just happened?
          2. Have a go hero—creating an additional VDI hard disk on a Windows VM
          3. Pop quiz—creating additional virtual disk images
          4. Using a VHD hard drive
        3. Time for action—adding a VHD virtual drive to your VM
          1. What just happened?
          2. Have a go hero—using a virtual disk image on several virtual machines
          3. Have a go hero—using a virtual disk image on two virtual machines at the same time
        4. Creating multiple virtual machines by cloning
        5. Time for action—cloning an Ubuntu Linux hard disk image
          1. What just happened?
          2. Have a go hero—cloning and registering your virtual disk images at the same time
          3. Have a go hero—cloning and converting virtual disk images to other formats
          4. Pop quiz—virtual storage
        6. Expanding hard disk images on the fly
        7. Time for action—creating a fixed-size hard drive image
          1. What just happened?
        8. Choosing your disk controller type: IDE, SATA, or SCSI
        9. Time for action—using a SATA disk controller on a VM
          1. What just happened?
          2. Have a go hero—using different types of storage controllers on different guests
          3. Pop quiz—using different storage controller types
          4. Using IDE and SATA drives on a VM
        10. Time for action—using IDE and SATA drives
          1. What just happened?
          2. Have a go hero—using SATA and IDE disks on your Ubuntu VM
          3. Pop quiz—storing data in VirtualBox
          4. Have a go hero—playing with your virtual machines
        11. Summary
      11. 6. Networking with Virtual Machines
        1. Connecting to the default NAT mode
          1. Exploring default network adapter types
        2. Time for action—viewing the default network adapter types in your virtual machines
          1. What just happened?
          2. Pop quiz—working with the default network adapter types
          3. Testing the NAT mode
        3. Time for action—accessing the NAT mode in your VM
          1. What just happened?
          2. Have a go hero—testing the NAT mode on Windows guests
          3. Using port-forwarding with the NAT mode
        4. Time for action—enabling port-forwarding in NAT mode
          1. What just happened?
          2. Have a go hero—using port forwarding with the NAT networking mode
        5. Testing a server operating system in the bridged networking mode
          1. Accessing your VM's web server from your host PC
        6. Time for action—changing your virtual machine to bridged networking mode
          1. What just happened?
          2. Accessing your VM's web server from another VM
        7. Time for action—accessing your VM's web sever from another VM
          1. What just happened?
          2. Have a go hero—testing the bridged mode on Windows guests
          3. Pop quiz—using the bridged networking mode
        8. Using the 'Not Attached' mode
        9. Time for action—isolating a VM with the 'Not Attached' mode
          1. What just happened?
        10. Disconnecting your virtual machine from the network without shutting it down
        11. Time for action—connecting/disconnecting your VM from the network
          1. What just happened?
          2. Have a go hero—don't forget to experiment with Windows guests
        12. Using the Internal Networking mode
        13. Time for action—communicating between VMs only
          1. What just happened?
          2. Have a go hero—testing the Internal Network mode on Windows guests
          3. Pop quiz—using the internal networking mode
        14. Using the Host-Only Networking mode
        15. Time for action—communicating between VMs and your host PC only
          1. What just happened?
          2. Have a go hero—testing the Host-Only mode on Windows guests
          3. Pop quiz—virtual networking
          4. Have a go hero—combining networking modes in several VMs
        16. Summary
      12. 7. Using Virtual Appliances
        1. Setting up preconfigured virtual machines in a flash
          1. Importing a virtual appliance
        2. Time for action—using the TurnKey Wordpress virtual appliance
          1. What just happened?
          2. Pop quiz—importing virtual appliances
          3. Exporting a virtual appliance
        3. Time for action—exporting your customized Wordpress virtual appliance
          1. What just happened?
          2. Have a go hero—testing your new customized virtual appliance
          3. Have a go hero—exporting your UbuntuVB virtual machine as a virtual appliance
          4. Have a go hero—importing and exporting more virtual appliances
          5. Pop quiz—exporting virtual appliances
        4. Working with virtual appliances
          1. Using virtual images from VirtualBox® Images
        5. Time for action—using a PuppyLinux VM in VirtualBox
          1. What just happened?
          2. Have a go hero—installing Guest Additions on PuppyLinux
          3. Using virtual appliances from BitNami
        6. Time for action—using the BitNami Drupal virtual appliance
          1. What just happened?
          2. Have a go hero—trying out other virtual appliances from Bitnami.org
          3. Pop quiz—working with virtual appliances
          4. Using the Turnkey Linux File Server appliance
        7. Time for action—using the Turnkey Linux File Server appliance
          1. What just happened?
          2. Have a go hero—exploring your virtual file server appliance
          3. Have a go hero—exploring the other Turnkey Linux virtual appliances
          4. Pop quiz—virtual appliances
        8. Summary
      13. 8. Managing your Virtual Machines from a Remote Computer
        1. Managing virtual machines from alternative front-ends
          1. Using the VBoxManage frontend
        2. Time for action—using VBoxManage to start a virtual machine
          1. What just happened?
          2. Controlling your virtual machines through VBoxManage
        3. Time for action—pausing, resuming, and saving your virtual machine's state
          1. Have a go hero—using VBoxManage with your UbuntuVB virtual machine
          2. Pop quiz—using the VBoxManage interface
          3. Using the VBoxSDL simplified interface
        4. Time for action—using VBoxSDL to start a virtual machine
          1. What just happened?
          2. Have a go hero—experiment with the VBoxSDL interface
        5. Setting up your very own VirtualBox headless server
          1. Setting up Ubuntu Server 8.04 LTS
        6. Time for action—downloading and installing Ubuntu Server 8.04 LTS
          1. What just happened?
          2. Pop quiz—setting up your own VirtualBox headless server
          3. Accessing your headless server from a remote PC
        7. Time for action—using PuTTY to access your Ubuntu server remotely
          1. What just happened?
          2. Have a go hero—using SSH from an Ubuntu PC to connect to your VB headless server
          3. Installing VirtualBox on your Ubuntu server through apt-get
        8. Time for action—installing VirtualBox through apt-get on your Ubuntu server
          1. What just happened?
        9. Creating, managing, and running your first remote virtual machine on the Ubuntu headless server
          1. Enabling FTP to upload guest images to your headless server
        10. Time for action—enabling proftp on your Ubuntu headless server
          1. What just happened?
          2. Uploading an ISO guest image to your Ubuntu server
        11. Time for action—uploading a guest ISO image to your headless serve
          1. What just happened?
          2. Have a go hero—uploading ISO images to your headless server
          3. Have a go hero—using other FTP clients
          4. Pop quiz—enabling FTP and uploading ISO images on your headless server
          5. Creating a virtual machine in your Ubuntu headless server
        12. Time for action—creating a virtual machine with VBoxManage
          1. What just happened?
          2. Have a go hero—creating more remote virtual machines
          3. Have a go hero—creating remote virtual appliances
          4. Using a Remote Desktop client and running your remote VM
        13. Time for action—using an RDP viewer and starting your VM
          1. What just happened?
          2. Have a go hero—installing Guest Additions on your other emote virtual machiner
          3. Have a go hero—running two remote virtual machines at the same time
          4. Enabling sound on your remote virtual machines
        14. Time for action—enabling audio on your remote virtual machine
          1. What just happened?
          2. Have a go hero—selecting the audio controller for your remote VM
          3. Have a go hero—choosing audio controllers in other hosts
          4. Using shared folders on your remote virtual machine
        15. Time for action—creating and accessing a shared folder on your Ubuntu headless server
          1. What just happened?
          2. Have a go hero—sharing other types of files
          3. Setting up your own remote virtual LAMP server
        16. Time for action—running your very own remote virtual LAMP server
          1. What just happened?
          2. Have a go hero—exploring your new Turnkey LAMP remote virtual server
          3. Have a go hero—using port-forwarding instead of the bridged mode
          4. Have a go hero—using two remote virtual servers at the same time
          5. Pop quiz—remote virtual machines and alternative frontends
        17. Summary
      14. A. Using Snapshots
        1. Reverting changes to your virtual machine
        2. Time for action—saving the state of your Ubuntu virtual machine by taking a snapshot
          1. What just happened?
          2. Have a go hero—using several Snapshots in your virtual machines
          3. Pop quiz—using the folder sharing feature
        3. Creating alternate realities in your virtual machines
        4. Time for action—using branching snapshots in your VMs
          1. What just happened?
          2. Have a go hero—creating more alternate realities for your VMs
          3. Pop quiz—creating alternate realities for your VMs
        5. Summary
      15. B. Pop quiz Answers
        1. Chapter 1
          1. Doing the thing
        2. Chapter 2
          1. Creating virtual machines
          2. Configuring basic settings on your VMs
          3. Using the auto capture and host key features
          4. Running your Ubuntu Linux VM
          5. Your first VM
        3. Chapter 3
          1. Creating virtual machines
          2. Using the auto capture and host key features
          3. Running your Windows 7 VM
          4. Your first VM
        4. Chapter 4
          1. Guest Additions
          2. Using the fullscreen feature
          3. Using the folder sharing feature
        5. Chapter 5
          1. Using virtual disks in VirtualBox
          2. Creating additional virtual disk images
          3. Virtual storage
          4. Using different storage controller types
          5. Storing data in VirtualBox
        6. Chapter 6
          1. Working with the default network adapter types
          2. Using the bridged networking mode
          3. Using the internal networking mode
          4. Virtual networking
        7. Chapter 7
          1. Importing virtual appliances
          2. Exporting virtual appliances
          3. Working with virtual appliances
          4. Virtual appliances
        8. Chapter 8
          1. Using the VBoxManage interface
          2. Setting up your own VirtualBox headless server
          3. Enabling FTP and uploading ISO images on your headless server
          4. Remote virtual machines and alternative front-ends
        9. Appendix A
          1. Using the folder sharing feature
          2. Creating alternate realities for your VMs