Michael Brown March 19 2009 04:10:36 AMPart 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
- 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.
- 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.
- 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.
- Click on "New" in the main VirtualBox menu to start the New Virtual Machine Wizard.
- 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".
- 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.
- 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.
- 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.
- Click on File->Virtual Media Manager again, but this time click on the "CD/DVD Images" tab in the dialog.
- 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.)
- Click the Add button then go and find the Fedora ISO file that you downloaded earlier. Ok out of that dialog.
- 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.
- 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:
- We created a VDI disk image file on your hard drive. This is where we're going to install Fedora: to a file.
- 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".
- 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.
- Highlight your Fedora virtual machine in VirtualBox and click the Start button at the top.
- 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.
- 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.
- 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.
- Double-click on the Install to Hard Drive icon on the Fedora desktop and click Next on the dialog that appears.
- 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.
- On the Next dialog, give the server a host name. I set mine to fedora.domino01 .
- On the Next dialog click on your place in the world - literally: the map is interactive.
- 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.)
- 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".
- 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.
- 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.
- In Fedora, click on the System menu at the top and then Shut Down, and then Shut Down again from the resulting dialog.
- 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.
- Ok your way back to the main VirtualBox window. With your Fedora virtual machine still highlighted, click on the Start button.
- 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.
- Remember, we're setting this up to be a Domino server. Various online articles http://www.novell.com/coolsolutions/appnote/17052.html 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!
- Forward to the Date and Time dialog and set those.
- Forward and send your profile to the Fedora Project if you want. They seem quite keen for you to do so!
- 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.
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.
- Click on System->Administration->Update System from the main Fedora menu.
- Click on the Update System button then enter the Root password when prompted.
- 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:
- Open a console (Applications->System Tools->Terminal).
- Change to the Root user by typing "su root" (without quotes) then entering the root password.
- 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:
- Double-click on the VBOXADDITIONS CD from the Fedora desktop.
- The install file that need to run is VBoxLinuxAdditions-x86.run if you're using the 32-bit version of Fedora, or VboxLinuxAdditions-amd64.run 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/VBoxLinuxAdditions-x86.run'. That's the file we want to run, so just hit the Return key on your keyboard to set it off.
- 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.
- Comments