Saturday, October 11, 2008

Tutorial to setup Ubuntu 8.04 Hardy Heron in Virtual Box

The goal of this tutorial is to setup Ubuntu 8.04 in Virtual Box 2.02 on a Acer 6920. You can download the last version of Ubuntu from here. You can choose either a desktop edition or a server edition. Once downloaded, you can choose to keep the ISO file on your hard drive or burn it. This tutorial is based on the first option.

1. Set up the Operating System

Select your Ubuntu Virtual Machine and click launch to start it. A new Wizard will help you install your operating system.
Click Next.

The media type is obviously a CD/DVD-ROM. Floppy disks are used to setup old operating systems such as MS-DOS which are still supported by Virtual Box. Because our Ubuntu installation files are store in a ISO file in our physical hard drive, the media source will be an image file for which we will need to indicate the path. Click Image File and click on the browse button. The following window opens:


Click the Add button and browse to the location of your ISO image of Ubuntu. The Virtual Machine will boot using the image file as a virtual CD/DVD-ROM.


An information window will tell you how to make the mouse pointer captured by the guest window or released to be used by the host operating system.The first option shows the desktop environment of Ubuntu. Use the second one to install Ubuntu in your new virtual machine. A new Wizard will start to help you configuring your locale configuration. The first window will ask you to choose the language.
The next screen will ask you your geographic location or the nearest place.

The next screen allows you to choose you keyboard layout.
The next screen allows you to prepare for your disk partition. We will use the Guided - Use entire disk for the purpose of this tutorial. The next screen will ask you about your personal identification information. The last screen gives you a summary of your new operating system setup before installing Ubuntu on your virtual hard drive.

Once the installation done, you are prompted to restart your virtual machine.

2- Setup the VBoxGuestAdditions
You can see that Ubuntu automatically retrieves the guest network connection.
The next step is to unload the image file of the Ubuntu installation CD and replace it with the VBoxGuestAdditions.iso file that comes with the Virtual Box. This image file contains an application designed to provide closer integration between host and guest, improving the interactive performance of guest systems. To do that, you can shut down the Virtual Machine, click the Preferences button, and click CD/DVD-ROM in the left menu.

Make sure to have the Insert CD/DVD-ROM check box selected with the ISO image file radio button. In the drop down list, select the VBoxGuestAdditions.iso file. Once you start again your your virtual machine, you will see the image file on your desktop like in the screenshot below.
Launch the terminal from the Application menu and Accessories. To reach the CD-ROM, type:

cd /cdrom

Then run the Linux shellscript, using administrator privilege:

sudo sh ./VirtualBoxLinuxAdditions-x86.run

The script will run after prompting the administrator password. Shut down your virtual machine to apply the changes and proceed to the next step.

3- Configuring the sound

From the Preferences, click Audio. Select Activate Audio check box. From the Host Audio Driver, choose Windows Direct Sound; for the Audio Controller, choose ICH AC97.






Wednesday, October 8, 2008

Create a Virtual Machine for Ubuntu Tutorial with Virtual Box

Virtual Box is another Sun's amazing open-source product that basically creates a virtual computer within you real operating system. The product exists for either Linux or Windows platform and can be used to set up any major Linux distribution and Windows for desktop or server purpose. The greatest advantage of virtualization is hardware ressource saving for organisations. But for individual user, it offers the advantages of using 2 operating systems in the same computer without the need to format and partition your hard drive and all the other small configuration issues of dual booting without the need to format your main hard drive. You also have the possibility to install several instances of an operating system, or different operating systems which can be tricky (or even impossible?) in multi booting.
My goal in this tutorial is to show how to set up Linux Ubuntu 8.04 under Windows Vista Home Premium Edition.
1 - Setup Virtual Box
This process is straightforward and does not deserve to be detailed here. The installation file can be downloaded here.
2 - Create a new Virtual Machine
Click New (Nouveau) to launch the New Virtual Machine Wizard.

Give a name to your new VM (as you give a name to your computer when setting up Windows).





The drop-down list box shows all the supported operating systems. The following window asks you to give a size to your memory.

You need to consider though that the amount of memory you give to your Virtual Machine will not be available to your host operating system anymore. On the other hand, you should give to your Operating System enough memory for it to work properly, Windows Vista as a guest for example, will require 512 Mb of memory at least.
The next step asks you to a new boot disk, with a recommanded minimum size of 8192 Mo. Click New.


Another wizard will help you to create a new virtual disk. The next window will ask you to choose between creating dynamic size virtual disk or a fixed size virtual disk. The dynamic size has a minimum size of 2 Gb and grows as it is filled with data. This option is recommanded if you want to save space on your physical hard drive.








You give a name to your virtual hard drive and use a slider to assign a minimum size. Then, you specify the path you want your image file being saved in. Virtual Machine will start to create the image file. I use 20 Gb for the size of the virtual hard drive.



You can create as many virtual disk as you like. But like memory, the disk space you use to create a virtual disk will not be available to your host operating system anymore. The next window appears when Virtual Box has done created a virtual hard drive.













From there, you can create other hard drive by clicking new, or clicking Existing to select other available virtual hard drives to be used as a primary master. The last window is a summary of your virtual machine instance configuration. You can later change the size of your memory and many other parameters.