Installing Ubuntu inside a virtual machine in Windows
This is a tutorial aimed at the people that always used Windows, heard a lot about Linux, want to test it, but don’t want to repartition nor format the hard drive.
VirtualBox is a virtualization software package, it’s a program able to act as if it was an entire new computer. You can run VirtualBox over any operating system, and inside VirtualBox any other OS can be run.
I’m gonna show you how to install VirtualBox on Windows and then install Ubuntu Linux inside of VirtualBox. This tutorial and the accompanying screencast were made as part of my activities in the PET Computação - UFSC group, of which I’m part of.
These materials were written when Ubuntu was on version 8.10, but no significant changes were made in regard to the steps described here. For those who prefer to learn visually, I published a screencast on YouTube with the complete tutorial.
And here come the steps to fearlessly install Ubuntu :)
Installing VirtualBox and creating a virtual machine
Download the most recent VirtualBox package (Windows version) at the official website
A warning will be shown saying that the Internet connection may hang during the installation process. Proceed.
Click “install” to begin the installation.
A warning will be shown asking you to confirm the installation of the VirtualBox driver files. Accept it.
After the installation finishes, VirtualBox will run and a registration form will appear. Fill the form and proceed.
In the upper-left corner of the window, click “New” to create a new virtual machine.
Click “next” and fill in the desired name for the new virtual machine. Then choose “Linux” as operating system and “Ubuntu” as version.
- Choose the amount of RAM that will be given to the VM.
- For Ubuntu, the minumum required is 384MB.
Now it’s time to create a virtual disk to connect to the VM. A virtual disk is just another file in your Windows filesystem, but that will be used by the VM as a hard disk. + Click “New” to open the New Virtual Disk wizard. + Click next, and then choose “Dinamically expanding storage”. - By choosing this option, the disk file will have only the necessary size to host the CURRENT contents of the Ubuntu system. + Then choose the size of the virtual disk. For Ubuntu, the recommended size is at least 5GB. + Click “Finish”
And back to the main VM creation wizard, click “Next” and them “Finish”. Now you’re ready to begin installing Ubuntu in your new VM!
Installing Ubuntu from the CD ISO image
Now let’s install the most recent Ubuntu version on the virtual machine we’ve just created: we’re installing it from the
.iso file, downloaded from the official site. The first step is to configure the VM to boot from the CD (CD image). Then we’ll do the installation itself.
Select the recently created VM and click “Settings”
Go to the “CD/DVD-ROM” panel, enable “Mount CD/DVD-ROM” drive, then choose “.ISO image file”
Then the “Virtual Media Manager” will open. Click “Add” and find Ubuntu’s .ISO image. The click “Select” in the bottom-right corner of the window.
Back to the VM settings window, click then “OK” so that the changes are applied. Now the Ubuntu installation CD is already in the VM’s CD drive.
Back to the main window of VirtualBox, click “Start” to boot the Ubuntu VM. A dialog will show you how to capture and release the keyboard from the VM.
The Ubuntu installer will start. Choose the language to use during installation and then, from the menu, choose “Install Ubuntu”. Wait a few seconds while the install wizard is loaded.
- Now it’s time for the easiest part: The Ubuntu installation in itself :)
- Choose the language for the installed system, click “Next”
- Choose your location on the map, click “Next”
- Select a keyboard layout, and test it in the text box below. Click “Next”
- On the partitioning screen, accept the defaults and click “Next”
- Fill in your personal details, and the username and password to log into the system. “Next”!
- Click “Install”. After some 20min the installation will be complete.
After the installation is complete right-click the little CD icon in the statusbar of the VM window and choose “Unmount CD/DVD-ROM” to eject the installation CD off the VM. Now click “Reboot now” on the final screen of the Ubuntu wizard. You’re done!