HTML5, CSS3, jQuery, JSON, Responsive Design...

Installing Fedora Linux in VirtualBox (for the Domino server)

Michael Brown   March 19 2009 04:10:36 AM
Part 2 of Setting up a home test environment for Notes/Domino 8.5

You should now have VirtualBox installed on your host operating system, as described in Part 1 of this series.

Now we're going to install the server OS - Fedora in my case - as a VirtualBox machine.

Download The Fedora ISO

You can download Fedora from the Fedora Project site.  It's open source and free.  I tested with the 32-bit Gnome Fedora 10, which is currently the default version on the Download Now button on the Fedora site.  If your broadband access comes with a data cap, you should check whether you ISP supplies unmetered servers for such downloads.  Eve if you're on an unmetered plan, downloading from your ISP's own servers should be a lot quicker.

If you want, you can burn the Fedora ISO to a physical CD but because we're virtualising, that's an unnecessary step.  We can associate the downloaded ISO file with a VirtualBox machine so and have it appear there as if it's a physical CD.

Time to start VirtualBox on your host OS.  On a Ubuntu host, you'll find it under Applications->System Tools.

Create a new disk file for Fedora
  1. In VirtualBox, click on File->Virtual Media Manager then the New button to start a wizard.  You can choose  "Dynamically expanding" or "Fixed" storage.  You must set a disk size: 6 Gig should be plenty for Fedora/Domino and few small test databases.  If you chose "Fixed" then the your virtual machine disk file (.VDI extension) will be created at that size immediately even though it's empty.  If you chose "Dynamic" the initial .VDI file with be very small and will grow as needed. (Supposedly, there is a performance penalty for "Dynamic" disks, but I didn't notice it.)   In both cases, however, as .VDI disk file cannot grow above the disk size limit that you originally set.  You can copy a .VDI disk file to new, bigger one, but it is a massive pain to do, so you should err on the large side when setting the initial disk size limit.
  2. On the Next dialog, give your new disk file a name and a location and save it.  Make sure that the disk on which you're saving has at least 30 Gig of free space.  I already had a disk file called fedora10.vdi so with no imagination at all, I'll call this new one fedora10_2.vdi.
  3. Click Next, Finish and Ok until you're out of all the dialogs.  The .VDI file that you just created should should now show in the list of "Hard Disks", as shown below.

Create the virtual machine

We've now created a virtual machine disk file but it is still empty.  We now need to define the parameters of the virtual machine and install our OS onto it.
  1. Click on "New" in the main VirtualBox menu to start the New Virtual Machine Wizard.
  2. On the Next dialog, give your machine a name. I've already have a machine called "Fedora10", so I'll call this one "Fedora 10 the Second" (still no imagination). Change the Operating System to "Linux" and the Version to "Fedora".

  3. On the Next dialog, you'll need to decide how much RAM to allocate to Fedora. Obviously, the more, the better, but it all depends on how much you have installed on the host. Be careful not to allocate so much to your virtual machines that you starve your host OS.  There's two Gig of RAM on my host, so I'm going to allocate 500 Meg to Fedora. That's not much for a Domino server, but it will have to do; there will only be me using it, after all.
  4. On the Next dialog, you'll need to assign the disk file we created earlier to the virtual machine. If this is your first virtual machine, then it should be selected automatically. Otherwise, select it from the drop down. Leave the Boot Hard Disk (Primary Master) checkbox ticked.

  5. Click "Next", "Finish" and "Ok" until you're out of all the dialogs.
    You should now see the virtual machine that you requested listed in the main VirtualBox windows.

    Not quite time to start it up yet though.  Our "hard drive" is still empty, so we need to give it an installation "CD" from which to boot our virtual machine.

Associate a boot ISO

You can burn the Fedora ISO to a physical CD and then associate that with the virtual machine if you wish, but that's an unnecessary step. VirtualBox will boot from the ISO on your hard drive if you tell it to.
  1. Click on File->Virtual Media Manager again, but this time click on the "CD/DVD Images" tab in the dialog.
  2. Tick the Mount CD/DVD Drive checkbox and then the ISO Image FIle radio button.  There should be one ISO file listed in the drop-down box already, called "VBoxGuestAdditions". (More on that later.)
  3. Click the Add button then go and find the Fedora ISO file that you downloaded earlier. Ok out of that dialog.

  4. We've now added our Fedora ISO as "CD" in VirtualBox, but have not yet associated with our virtual machine.  Back in the main VirtualBox window, highlight your Fedora machine on the left and then click the Settings button.
  5. In the next dialog, click on CD/DVD-ROM in the left-hand panel. Tick Mount CD/DVD Drive and then ISO Image File. In the drop-down box, select the ISO file that you added in step 2, then Ok your way out of the dialog.

To recap what we've done so far:
  1. We created a VDI disk image file on your hard drive. This is where we're going to install Fedora: to a file.
  2. We set up a Fedora virtual machine and told it that your new VDI disk image file is going to be it's "hard drive".
  3. We defined the Fedora ISO image to be a CD image in VirtualBox and then told our new Fedora virtual machine to use that as its "CD drive".

Booting the Fedora virtual machine

Time to boot the virtual machine and install Fedora onto it.
  1. Highlight your Fedora virtual machine in VirtualBox and click the Start button at the top.
  2. When the Fedora menu comes up, highlight "Boot" if it's not already highlighted (use the up and down arrow keys on your keyboard) and then hit your Return key.

  3. Fedora will now boot from the CD image file that we defined earlier. Indeed, at this stage, there is nowhere else that it can boot from: the "hard drive" that we defined for it earlier is still blank.  You may notice that clicking inside the virtual machine window causes the mouse pointer to be "captured" by the virtual machine. Hit the right-hand Ctrl key on your keyboard and the mouse pointer will be "released" again.
  4. After a minute or two, you'll get to the Fedora login box. Click the Login button to proceed.

Your Fedora virtual machine should now show you the Gnome desktop running off our live "CD". The Gnome desktop is a bit different to Windows. If you've not used it before then the first thing you'll notice is that you have menu and task bars at the top and the bottom, instead of just one at the bottom a la Windows.  It's quite easy to make Gnome appear more Windows-like - i.e. with just one bar, at the bottom - but let's get Fedora installed first.

Installing Fedora virtual machine

At this stage we're still running Fedora from our "CD". We need to now install it to our new "hard drive", which is the VDI file we created earlier.
  1. Double-click on the Install to Hard Drive icon on the Fedora desktop and click Next on the dialog that appears.
  2. Pick the appropriate keyboard layout for your country. Being in Australia, I have to choose "U.S. English", which is a bit odd because the United States didn't actually discover Australia, but there you go.
  3. On the Next dialog, give the server a host name. I set mine to fedora.domino01 .
  4. On the Next dialog click on your place in the world - literally: the map is interactive.
  5. On the Next dialog, set the Root password. In Linux, the Root user is Lord God Almighty. If you forget the Root password then you have big problems, so make it something memorable. Because this is a virtual machine that we're only using for testing, don't fret about it being the most secure password in the world. Just make sure that you can remember it. (NB: this is different to distributions such as Ubuntu where use of the Root user is discouraged, and a Root password is not even set by default.)
  6. At this point Fedora should detect that the only hard drive it can see (actually our .VDI file) is "unreadable" because it's still empty. A dialog offers to initialise it for you but warns that this will mean "erasing ALL DATA".

  7. Help!! Panic!! It's going to wipe my hard drive!!! No, it isn't. It can't do anything directly to your hard drive.  The dialog is actually referring to the VDI file that we created earlier, although Fedora has no way of knowing that of course.  Fedora is going to wipe the contents of that file and nothing else. Click Yes on the warning dialog.
  8. On the next dialog, just accept the defaults. We do not need to be encrypting this partition. Click Next and then the Write changes to disk button on the next scary-looking warning dialog.

Fedora will now begin installing to your virtual machine's "hard drive". This will take a few minutes. When it's finished it will ask you reboot the system to use the new installation. Close the dialog, but don't reboot Fedora just yet. We first need to set up the installation of VirtualBox Guest Additions, which will greatly improve our Fedora virtual machine experience.

Fedora post-configuration
  1. In Fedora, click on the System menu at the top and then Shut Down, and then Shut Down again from the resulting dialog.
  2. Back in the main VirtualBox window, highlight the Fedora virtual machine and click the Settings button. Click on CD/DVD-ROM on the left. VirtualBox should have disassociated the Fedora installation ISO from our virtual machine, which is good because we don't want to be booting from that again. Tick Mount CD/DVD Drve and then ISO Image File. This time in the drop-down box, select VBoxGuestAdditions.iso.

  3. Ok your way back to the main VirtualBox window. With your Fedora virtual machine still highlighted, click on the Start button.
  4. Back in Fedora, you'll be guided through some more Welcome configuration screens. Just Forward your way through them until you reach the Create User dialog.
  5. Remember, we're setting this up to be a Domino server. Various online articles that I found on this subject recommend that you create a user called "notes" to run the Domino server, so let's do that and give that user a password - not the same password that you used for the Root account!

  6. Forward to the Date and Time dialog and set those.
  7. Forward and send your profile to the Fedora Project if you want. They seem quite keen for you to do so!
  8. We're done....almost! Fedora is installed and configured in our virtual machine. You should now be looking at the login dialog. Click on "notes", which is our only defined user (apart from Root, which doesn't show here) and enter the password for the "Notes" account.

Update Packages

We now have a working Fedora virtual machine, but in all likelihood, an out of date one. LiveCDs are not generally ketp up to date. It is assumed that you will update the packages after installation, and that's what we're going to do now.

Before proceeding, you may want to change the internet location of your Fedora repositories to use your ISP's repository mirrors, if available.  Fedora is about to download a lot of data, and if you're on a metered broadband plan, that data is going to count directly against your cap. If you're on an unmetered broadband plan and/or are doing this at work, then you probably won't care too much about this. If you are on a cap though, you may be able to save some data (and money) by making this change now.

If you're happy with the location of your repositories, then initiate the system package update.

  1. Click on System->Administration->Update System from the main Fedora menu.
  2. Click on the Update System button then enter the Root password when prompted.

  3. Once this process has finished - and it took well over 90 minutes on my PC - you should reboot Fedora within the virtual machine; System->ShutDown->Restart.

Install Guest Additions

We're now up to date with all our packages, yet our Fedora virtual machine could still do with some improvements. For one, you'll see that it's at a very low resolution - 800x600 I think - with no obvious way of resizing it. And when you resize the VirtualBox window it has no effect on Fedora.   This is where we need the VirtualBox Guest Additions. If you associated the Guest Additions ISO image with the Fedora virtual machine, then you should see the VBOXADDITIONS CD mounted on your Fedora desktop.

There's a complication though: the installer for VirtualBox Guest Additions installs from source files. This means that we need a compiler installed and for some reason Fedora doesn't have a compiler installed by default. We also need to ensure that the source header files for our version of Fedora are installed.

To install the compiler and source header files:
  1. Open a console (Applications->System Tools->Terminal).
  2. Change to the Root user by typing "su root" (without quotes) then entering the root password.
  3. Type in "yum install gcc make kernel-devel" (without quotes). Answer "y" when prompted to download the files.

With the compiler and linux headers in place, we can actually install the VirtualBox Guest Additions:
  1. Double-click on the VBOXADDITIONS CD from the Fedora desktop.
  2. The install file that need to run is if you're using the 32-bit version of Fedora, or if you're running the 64-bit version. Drag the install file from the file manager and drop it onto the Terminal window that you opened when you installed the compiler, and which you are still logged into as Root. (If you closed that Window, open a new one and switch to Root again). You should see that the console now says something like'/media/VBOXADDITIONS_2.1.4_42893/'. That's the file we want to run, so just hit the Return key on your keyboard to set it off.
  3. The installation will take a minute or two to run. All being well, you should now see a message saying that you have "successfully installed the VirtualBox Guest Additions" and asking you to "restart the guest operating system". Reboot Fedora now (System->Shutdown->Restart button).

Congratulations, you've now installed Fedora as a virtual machine in VirtualBox. If you resize the guest window then Fedora should now resize to fit it.


At this point, you may want to make a backup of your virtual machine's disk file. You now have a relatively "clean" installation of Fedora, with a lot of updates added. If you need a "clean" Fedora installation in the future, then it's going to be a lot quicker to copy back the VDI file and add it to VirtualBox than to go through all the steps in this article again.

Previous - Download and install VirtualBox for your OS | Next - Installing Windows in VirtualBox


1Oscar Arcila Ramírez  09/26/2009 12:26:07 PM  Installing Fedora Linux in VirtualBox (for the Domino server)

Thanks for your help, always good to have someone to explain easily and effectively in this great language programming LINUX