• ARTICLES
SEARCH

How-To Geek

Use VirtualBox to Test Linux on Your Windows PC

Curious about a new distribution of Linux but not wanting to do a full install or use a Live CD/DVD just to try it out? Now you can enjoy all that Linux goodness by running it “Live CD” style inside of VirtualBox.

This can be very useful to get a good look at a Linux distribution without a lot of hassle. It will also allow you to quickly and easily access your regular programs that you use on a daily basis without having to shut down/restart your computer (as opposed to using an iso file burned to a CD or DVD).

This has been set up into three sections with screenshots for each step in the process. It may look like a lot to do at first glance, but the process only takes a few minutes and then you can start having fun.

Note: The Linux distribution used in our example is Dream Linux 3.5 (Gnome Desktop) and the version of VirtualBox shown in this article is 3.0.0.49051 Beta 2 running on Vista SP2. All links are provided at the bottom of the article.

Getting Started

Now that you have the iso file for the Linux distribution you want to try downloaded, a good location to place it in is in the “.VirtualBox” folder. As you can see, the home folders for your HardDisks and Machines are located here. You may also choose to use a different “home folder” to store your iso files in.

Note: When you are setting up your Linux distro for testing, keep in mind that any system resources (i.e. RAM) that you allocate for your virtual operating system will be taken from your actual system’s resources while you are running it in VirtualBox.

distro-01

Once you have the iso file all settled in, start VirtualBox up and click on the “New” button in the main window.

 distro-02

This is the first window you will see when you start the process of setting up a new Virtual Machine. Click “Next”.

 distro-03

As you can see, the default settings displayed are “Microsoft Windows” and “Windows XP”.

 distro-04

The first thing to do is select the type of “Operating System” that you want to set up. Since we are setting up a Linux distribution in our example, “Linux” has been selected. Notice the variety of choices available.

 distro-05

Once you have selected “Linux”, you will notice that there is a good selection to choose from for “Version”. Since Dream Linux is based on Debian, that has been chosen.

Note: You may also choose to list your particular Linux distribution version as “Other”.

 distro-06

Next you can be as creative as you want in naming your Virtual Machine. Choose what works best for you. Here we have chosen to name ours “Dream Linux”. Click “Next”.

 distro-07

In this window you will be asked to choose the amount of RAM you want to allocate for your Linux distribution. The default is 256 MB for Linux, but here it has been raised to 500 MB. You are free to leave it set as the default of 256 MB or adjust to suit your preferences. Click “Next”.

 distro-08

In this window, you will not need to make any changes to the default selections shown. Click “Next”.

 distro-09

Once you reach this window, you will start the process of setting up a new Virtual Hard Disk for your Linux system. Click “Next”.

 distro-10

Here you can see the two choices available for Hard Disk type. The default is “Dynamically expanding storage” and this is the one that you want to use. Click “Next”.

 distro-11

Here you may adjust the maximum size that you want to allow for your Virtual Hard Disk. The default is “8 GB” and has not been altered for our example. Click “Next”.

 distro-12

The final summary window for the Virtual Hard Disk that you have just created. Click “Finish”.

 distro-13

Followed by the final summary window for the Virtual Machine that you have created for your Linux system.

 distro-14

That has your new Virtual Machine and Virtual Hard Disk set up. Clicking on “Finish” will return you to the Main Window.

Adjusting the Settings

Now you can see Dream Linux listed in the O.S. selection portion of the Main Window. Notice that you can see the settings already displaying on the right side. But there are a few settings that still need to be adjusted.

 distro-15

Click on the name of your new Linux system in the left side of the Main Window to select it and then click on the “Settings” button at the top.

 distro-16

Now that you have the Settings Window open, it is time to make a few changes. Here you can see basic information about your Linux system.

 distro-17

Select the “System” category. Since it is unlikely that you will be using a Floppy Drive, go ahead and deselect it so that it is not included in the Boot Process.

distro-18

Select the “Display” category. For our example, “Enable 3D Acceleration” has been selected. You may also adjust the amount of “Video Memory” allocated for your Linux system to use while running. The default is “12 MB” and has not been changed here.

distro-19

Since you will be running the iso file as a “Live CD”, select the “CD/DVD-ROM” category. Select “Mount CD/DVD Drive”.

distro-20

Once you have that selected, make certain to select “ISO Image File” and then click on the folder icon on the right side. This will allow you to browse for the Linux iso file you are wanting to use.

distro-21

Clicking on the folder icon shown above will open the Virtual Media Manager Window. Here only the two previously set up/used iso files are showing in our example, so the new Linux iso file will need to be added to the list. Click on “Add” to open a browsing window.

 distro-22

Browse to the home folder that you are using to store your iso files in (in our example the .VirtualBox folder). Select the iso file that you want to use and click “Open”.

distro-23

Now the new Linux iso file is in our list. Click on the iso file you need and click “Select”.

distro-24

Now the proper iso file is displaying in our Settings Window.

distro-25

Almost finished now! If you would like to use USB/Flash Drives, select the “USB” category and make certain that “Enable USB Controller” and “Enable USB 2.0 (EHCI) Controller” are selected.

distro-26

Now that all of that is sorted, click “OK” to finish the process.

Note: Since this is a way to test a Linux distribution, “Network” and “Shared Folders” settings have not been altered/setup.

Start Your Systems

Looking at the Main Window you can see the effect of any changes you have made to the Settings for your new Linux system.

distro-27

Now comes the fun part! Select your new Linux system on the left side and click “Start”.

distro-28

Start up time for each Linux distribution will vary depending on which one you are using. Here you can see the start up process for our example.

distro-29

And there it is! Now you can really start trying out your new Linux system by checking for updates, making changes, installing/uninstalling programs or whatever your heart desires.

distro-30

After you have finished using your new Linux system for a bit, all that you have to do to shut it down is hit the “Right Ctrl” key on your keyboard (unless you have set a different key to use to escape the virtual window), and go to the Machine Menu to select “Close”.

Note: You can also create a Snapshot to save the changes and alterations you have made to your Linux system using this menu.

distro-31

Once you have started the shut down process, there is no need to lose any of the changes you have made (since the last Snapshot or if you have not made any Snapshots yet). Be certain that “Save the machine state” is selected and click “OK”. The next time you start your Linux system up, it will return you to where you were when you shut everything down (i.e. Desktop, etc.).

distro-32

Conclusion

You can have a lot of fun trying out different Linux distributions with this method and if you happen to not like a particular distribution, then it is easy to delete the profile for that system from your VirtualBox set up. Have fun!

Links

Download VirtualBox (version 3.0)

See the Operating Systems that run in VirtualBox

Download Dream Linux 3.5 (Gnome & XFCE versions)

Akemi Iwaya (Asian Angel) is our very own Firefox Fangirl who enjoys working with multiple browsers and loves 'old school' role-playing games. Visit her on Twitter and .

  • Published 07/7/09

Comments (4)

  1. Tom

    Final release of VirtualBox 3 is available since 6/30/09 … or 30.6.09 in german notation :-)

  2. 1fastbullet

    Angel,

    Compliments on an outstandingly thorough article.

    Quite timely, I might add, as I was planning to grab a copy of Mint and give it a whirl.

    Thank you.

  3. Jerry

    I have tested Ubuntu on VirtualBox2 about 1 year ago and the experience was ok but not possible to work on it. The problem is the Virtualization is really easy with virtualbox (great app) but it’s not smooth as a real Linux box. This result of not a great user experience.

  4. bassmadrigal

    One thing that seems to be neglected in the last few Virtualbox How-To’s that I read is installing Guest Additions.

    Installing Guest Additions will provide your Guest OS with the drivers/modules needed for additional features. Such as Shared Clipboard, actually enabling 3D Acceleration in the guest (assuming that the checkbox in the options is enabled) and my personal favorite… The ability to have your mouse enter and leave the VM like a normal application window. No more Right+CTRL to release the mouse from the VM (unless you are in the console).

    To install Guest Additions go to Devices -> Install Guest Additions (or something similar). This will make the Guest Additions show up as a CD drive. Depending on the distro you might have to mount it (mount /dev/hdc /mnt/cdrom) from there you just run the corresponding file. I believe they have both 32 bit and 64 bit for linux and I know they have an installer for windows (they may have multiple ones).

    @Jerry I have been using VirtualBox for quite a while now. And while I have not moved to version 3.0.0 yet, they have been making great strides in the development. I always have a VM of Slackware running on my Windows XP Desktop. I have gotten to the point where I just think of it as another program running on my computer. It runs extremely smooth including KDE4 (although, I don’t have all the eye-candy turned on, due to the 3D acceleration not supporting my old version of X). I would highly recommend trying it out again.

Get Free Articles in Your Inbox!

Join 134,000 newsletter readers

Email:

Go check your email!