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!
Open your web browser, and type http://www.damnsmalllinux.org. The What is DSL? page will show up:
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:
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:
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:
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:
Once the downloading process ends, open VirtualBox, and click on the New button to create a new virtual machine:
The Welcome to the New Virtual Machine Wizard dialog will show up. Click on Next to continue:
The VM Name and OS Type dialog will appear next. Type
DSLTest
in the Name field, selectLinux
as the Operating System andDebian
as the Version, then click on Next to continue:Leave the default
256
MB
value as the Base Memory Size in the Memory dialog, and click on Next to continue: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:
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:
In the next dialog (Virtual Disk Location and Size), leave the
DSLTest
and8.00
GB
default options for Location and Size, respectively, and click on Next to continue: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:
The last dialog will show you a Summary of all the parameters selected for your new virtual machine. Click on Finish to continue:
After creating the virtual machine, it will show up in VirtualBox's main screen:
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:
Next, click on the Invoke Virtual Media Manager button:
The Virtual Media Manager dialog will appear. Click on the Add button to continue:
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:Now the DSL ISO image will appear in the CD/DVD Images list of the Virtual Media Manager:
Click on Select to return to the DSLTest – Settings dialog box, and then click on OK to return to VirtualBox's main screen.
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:
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.
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.
Wait for a few minutes for DSL to start booting up. When it is finished, the following screen will show up:
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 <questions@packtpub.com>
!
Pop quiz – doing the thing
What would be the best definition of a virtual machine?
A physical PC connected to a LAN.
A 'guest' machine running inside another 'host' machine.
A computer with lots of RAM and hard disk space.
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:
Cry and pull your hair out in despair.
Install VirtualBox on your Linux PC, create a Windows XP virtual machine, and install MS Word.
Go out and buy a new Windows Vista PC with MS Word installed.
Virtualization means…
Sharing one physical PC between two or more virtual machines to maximize resource usage.
To surf the web looking for new applications.
Running two or more operating systems in one PC.