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

Time for action – creating and testing a Damn Small Linux virtual machine


In this next exercise, you'll download Damn Small Linux, one of the smallest Linux distros currently available, and then I'll show you how to create a quick virtual machine on your brand new VirtualBox software in order to test it!

  1. Open your web browser, and type http://www.damnsmalllinux.org. The What is DSL? page will show up:

  2. Scroll down the page until you locate the Download link, or go to the http://www.damnsmalllinux.org/download.html page directly, and scroll down to the Current Full Mirror List section:

  3. Click on an HTTP link (in this case, I chose the second link, http://ibiblio.org/pub/Linux/distributions/damnsmall/) and then on the current link of the next page:

  4. On the next page, scroll down until you locate the dsl-4.4.10.iso, and click on it to start downloading the DSL ISO file:

  5. A dialog box will pop up, asking if you want to open or save the DSL ISO file. Click on Save to start downloading this file:

  6. Once the downloading process ends, open VirtualBox, and click on the New button to create a new virtual machine:

  7. The Welcome to the New Virtual Machine Wizard dialog will show up. Click on Next to continue:

  8. The VM Name and OS Type dialog will appear next. Type DSLTest in the Name field, select Linux as the Operating System and Debian as the Version, then click on Next to continue:

  9. Leave the default 256 MB value as the Base Memory Size in the Memory dialog, and click on Next to continue:

  10. Leave the default Create new hard disk option on the Virtual Hard Disk dialog. Make sure the Boot Hard Disk (Primary Master) option is selected, and click on Next to continue:

  11. Now the Welcome to the Create New Virtual Disk Wizard! dialog box will appear. Click on Next to continue, and leave the Dynamically expanding storage option selected as the Storage Type in the Hard Disk Storage Type dialog:

  12. In the next dialog (Virtual Disk Location and Size), leave the DSLTest and 8.00 GB default options for Location and Size, respectively, and click on Next to continue:

  13. Now the wizard will show you a Summary of all the parameters for the virtual disk of your virtual machine. Click on Finish to continue:

  14. The last dialog will show you a Summary of all the parameters selected for your new virtual machine. Click on Finish to continue:

  15. After creating the virtual machine, it will show up in VirtualBox's main screen:

  16. Now click on the Settings button to open the DSLTest - Settings dialog box. Select the CD/DVD-ROM category from the list on the left side, click on the Mount CD/DVD Drive checkbox, and then select the ISO Image File option:

  17. Next, click on the Invoke Virtual Media Manager button:

  18. The Virtual Media Manager dialog will appear. Click on the Add button to continue:

  19. The Select a CD/DVD-ROM disk image file dialog box will show up next. Navigate to the directory where you downloaded the dsl*.iso image, and click on the Open button to continue:

  20. Now the DSL ISO image will appear in the CD/DVD Images list of the Virtual Media Manager:

  21. Click on Select to return to the DSLTest – Settings dialog box, and then click on OK to return to VirtualBox's main screen.

  22. Click on the Start button to start your virtual machine. The VirtualBox – Information dialog box will show up to inform you that you need to use the Right-Ctrl key to alternate between using the keyboard in your virtual machine and your host PC. Select the Do not show this message again checkbox, and click on OK to continue:

  23. The DSL virtual machine will start to boot. Wait until a VirtualBox – Information dialog box appears to tell you that the virtual machine is using 16 bit color instead of 32 bit. Select the Do not show this message again checkbox, and click on OK to continue.

  24. Click inside the virtual machine's screen with your mouse, and another VirtualBox – Information dialog will show up to inform you that you need to use the Right-Ctrl key to alternate between using the mouse in your virtual machine and your host PC. Select the Do not show this message again checkbox, and click on Capture to continue.

  25. Wait for a few minutes for DSL to start booting up. When it is finished, the following screen will show up:

  26. Now you have created your first virtual machine!

What just happened?

Whew! I must admit that this was a lengthy exercise! Thanks to VirtualBox's user-friendly interface, you've just learned how to create this test virtual machine with one of Linux's smallest distros available: Damn Small Linux (DSL for short). In fact, it's so small, it doesn't even need a hard disk to work properly! I hope you had fun with this exercise, and don't worry about all the settings involved in creating a virtual machine; we'll have enough exercises to deal with them throughout the rest of the book!

For now, just concentrate on the virtual machine creation process as a whole: Click on the New button, select the operating system you want to use, assign a chunk of memory and hard disk space to your new virtual machine, and tell it where to boot an ISO image with the operating system of your choice, as if it were just another ordinary PC in your desk!

Have a go hero – creating more virtual machines

Now that you've created a test virtual machine, go on and download other Linux distributions, and try to create other virtual machines; experiment with different settings for RAM and hard disk space.

Note

Just remember to never assign more than half of your physical RAM to a virtual machine because your main PC could collapse!

We'll talk more about this later. For now, just keep experimenting with all the VirtualBox features you can! And if you have any questions, feel free to email the Packt team at !

Pop quiz – doing the thing

  1. What would be the best definition of a virtual machine?

    1. A physical PC connected to a LAN.

    2. A 'guest' machine running inside another 'host' machine.

    3. A computer with lots of RAM and hard disk space.

  2. You need to use MS Word to write a document, but the only available PC at the moment is running Linux. The best thing you can do is:

    1. Cry and pull your hair out in despair.

    2. Install VirtualBox on your Linux PC, create a Windows XP virtual machine, and install MS Word.

    3. Go out and buy a new Windows Vista PC with MS Word installed.

  3. Virtualization means…

    1. Sharing one physical PC between two or more virtual machines to maximize resource usage.

    2. To surf the web looking for new applications.

    3. Running two or more operating systems in one PC.