Installing Fedora Core 10 on Virtualbox
VirtualBox is a family of powerful x86 virtualization products for enterprise as well as home use. This posting is a look into the steps to install the modern Fedora inside VirtualBox, using Mac OS X as the host in case that matters.
The basic installation steps are very straightforward. The basic steps are to
- Download the Fedora .ISO file for x86 systems. VirtualBox will work with either the 32-bit or 64-bit versions of Fedora.
- Click on the New button and follow the directions in the wizard.
- Create a new virtual disk image. The default of 8gb, dynamically sized disk is sufficient for most purposes.
- I found it important to specify 64mb of video memory. Specifying 32mb of video did not work.
- Once the wizard finishes I make a couple other settings changes not covered in the wizard.
- In Audio settings turn on audio support and select "Core Audio".
- In the CD/DVD-ROM section select the .ISO file you downloaded. You can optionally burn a CD from the .ISO file, but it's sufficient to directly reference the .ISO
- Boot the system.
- Once the live CD session is booted there is an "Install to Hard Disk" icon, double click that and follow the directions.
- Once that finishes shut down the computer (without restarting).
- In the settings disconnect the .ISO file.
- Click on Start to boot the virtual machine.
- Once it starts up you're brought through a brief setup process to create a root password, a user account, and make a few settings.
- Once you're done you can log in and enjoy your new Fedora installation.
There are two highly important steps to take: 1) update the system to the latest bits from the Fedora project, 2) install the VirtualBox guest additions.
The Fedora project is continually updating the packages, fixing bugs and making security fixes. The .ISO file isn't necessarily kept up-to-date. You can update a Fedora system through the GUI menus using the System / Administration / Update System menu. It connects to the Fedora servers, downloads information about the latest packages, and walks you through updating them with the latest versions. It's very simple and straightforward.
The VirtualBox guest additions allow for better integration with VirtualBox. This is done outside the Fedora guest, on the VirtualBox menus is the Devices / Install Guest Additions menu choice. Click on that and a new CD will mount inside the virtual machine (this may take a short time to appear). A new directory is available on your system in /media/VBOXADDITIONS* and contains two .run files for Linux. Use VBoxLinuxAdditions-amd64.run if you installed 64-bit Fedora, otherwise use the -x86 version. Installation happens like so:-
$ su -
# sh /media/VBOX*/VBoxLinuxAdditions-<>.run
If all is well it compiles and installs required kernel modules. A prerequisite step is to install compilers and kernel headers etc. Unfortunately this step fails giving the message in this picture: "Please install the build and header files for your current Linux kernel".
The cure was to reboot the virtual Fedora system. I had updated the system (mentioned way above) and the kernel version was in a state which confused the VBoxLinuxAdditions script. It pays to pay careful attention to the version numbers in various messages.
Installing the kernel and kernel header is accomplished on Fedora with this command: yum install kernel kernel-devel. This prints the kernel version number. Next the VBoxLinuxAdditions also prints the kernel version number it is looking for. If they mismatch, as it did for me, you must reboot the system and rerun the VBoxLinuxAdditions script.
Upon successfully running the VBoxLinuxAdditions script you must reboot the system again. You'll be greeted with a new dialog box like so:
It tells you the guest additions have been added and you now have new features available. Mouse pointer integration makes interaction with the virtual machine much more fluid, rather than having to purposely capture and uncapture the mouse to interact with apps running in the virtual machine you simply move the pointer in and out of the window very naturally.