3. Adding Server1 to VirtualBox

In this section, we shall create a new machine in VirtualBox. To ensure that installs quickly, we shall create the machine with its virtual hard-disk on your local machine (which we shall refer to as the “nursery”), not over the network. In a later section, when we have finished the installation, we shall move from the nursery into its “production” environment.

Important

It is important to realise that because your “nursery” environment is local to the workstation you are working on, if you need to stop working on it, you will need to come back to the same workstation, until it has been moved into “production”.

For the rest of this section, please pay close attention, as it can be easy to skip along and miss out an important task.

Procedure 1. Creating the Virtual Machine “tele301-server1”

  1. In VirtualBox, click on New to start creating our new virtual machine.

    You should now see the “Create New Virtual Machine” wizard. Click Continue

  2. Give the virtual machine the name “tele301-server1”, which is what VirtualBox will call it. Giving our virtual machines a common prefix can be useful when sorting them (consider the case if you have other Virtual Machines for other papers).

    Specify the operating system as Linux, with the version being “Ubuntu”. This sets some default values appropriately for the rest of the wizard, such as the amount of memory and an appropriate network card. Note that we could use the 64-bit version, but because the support for 64-bit VirtualBox guests is not as mature, we shall stick with the 32-bit version of Ubuntu.

    Click on Continue

  3. Remember, defaults values are only suggestions. Your host workstation will have 2GB of Memory, so if we give 512MB to the guest, that’s a lot of memory consumed. Additionally, we’re only installing the server version, which is not going to a graphical user interface, and little in the way of big software, so we can get away with much less memory. Reduce the amount of memory to 256MB, by typing in the new value (it’s easier than using the slider). Click Continue.

  4. When asked about the “Virtual Hard Disk”, we do want to create one, so ensure that Boot hard disk is ticked, and Create new hard disk is selected. These should be the defaults, but at the moment we just want to be very careful. Click Continue, then Continue again.

  5. When you get to “Hard Disk Storage Type”, select Dynamically expanding storage, which should be the default anyway, and click Continue.

  6. Proceed cautiously!

    Now things start to get a bit more tricky. Pay close attention or else this lab will take significantly longer to complete!

    When you get to “Hard Disk Location and Size”, click on the folder icon next to the name of the disk, which should already have “tele301-server1”. A file navigation dialog box should appear with “Select a file for the new hard disk image file” in the title.

    Navigate to /scratch, which should be available under the “Macintosh HD”. Click on New Folder to create a folder for yourself with your username as the name of the folder. Click on Save. The name of the disk image file should now be replaced with /System/scratch/your-user-code/tele301-server1.vdi. If this is not what you see, please call a demonstrator.

    Change the default disk size to 4GB. The smaller the disk, the smaller the file can grow to. Our server will not need a lot of storage, as server software is often quite small. On servers, the user data is often much larger and will depend very much on what the server does. Figure 12, “Placing the Virtual Hard Disk in the Nursery” shows how the dialog window should appear. Click on Continue, verify your settings and then click again on Done and once more on Done to finish the wizard.

Figure 12. Placing the Virtual Hard Disk in the Nursery

Placing the Virtual Hard Disk in the Nursery

This is the step in the creation of our server where we specify the location of the new hard disk into our “nursery” environment which is on the local machine.


We have now created the virtual hardware for our server. But we still need to check some of the settings for the new virtual machine. In the VirtualBox window, click on the machine called “tele301-server1”, and then click on Settings to access the settings dialog.

In order to install the operating system, we need to put the “virtual” CD-ROM (which is represented as an “ISO” disc image), into the virtual CD-ROM drive. Click on the Storage icon of the Settings window. Click on the “Empty” slot under the “IDE Controller”. In the CD/DVD Device drop-down box, you would normally select the ISO image you wanted to use, but you havn’t used it yet, so VirtualBox doesn’t know about it. Instead, click on the folder icon next to CD/DVD Device. In the following window, click on Add and navigate to Gallardo’s “Resources” share, to the folder ISOs/Ubuntu, and to the file ubuntu-10.04-server-i386.iso. Click on Open. Then click on Select to select the new ISO file.

You are now back in the Settings window for tele301-server1. Click on Audio and un-tick the Enable Audio. This is because a server doesn’t need audio, and it introduces a bit of complexity that could otherwise cause a problem, such as the virtual machine crashing due to some audio-related bug.

There are some other configurations we will do, but we shall leave those until the relavent sections, to better explain them. Do have a brief look around all the other parts of the Settings, but don’t make any other changes, lest you cause it to behave differently from what we expect. Close the Settings dialog by clicking OK. You are now ready to install the operating system.