Ubuntu Clean Install For A Test Ubuntu Server - Part 1: Set Up VMWare Virtual Machine

(I love CamelCase for titles ;) )

In this post I'm going to explain what I mean with "Clean Installation of Ubuntu Server", which I use as a base for testing tools and commands for this blog... and to complain aftewards! XD But this first part could also be used as a basic explanation on how to create a basic virtual machine.

So, to begin, I obviously use a virtualization tool. The one I like most, at the moment, is VMWare, for I can actually install the OS - something I really like to do for no other reason than doing it ;) . To develop, instead, I use Vagrant, for it's really really easy to build a development environment - and destroy it when you need to start again in a cleaner environment. Maybe I'll write about this another time.

SHORT ANSWER
Well, maybe this is not gonna be so short, but I hope it's gonna be mainly images. ;)
Anyway, you should download and install the latest VMWare Player (VMWare Player Download). This, the install phase, really depends on the operating system you're on, so I'm not telling you how to do it.

Then you should download the Ubuntu ISO. I like to test for something that could be a production environment, so I stick with LTS - which are much more stable and supported - that is 12.04 or 14.04 at the moment of this writing. I strongly suggest to download the "PC (Intel x86) server install CD"; I'll give you more informations about this in the "Long Answer" section.

These are the ISO links:
Ubuntu 12.04 - Precise Pagnoline
Ubuntu 14.04 - Trusty Tahr

Remember, for this kind of testing you need to download those softwares just once. Then, for a couple of years or maybe more, you're done.

Now, let's create the VM. Start VMWare Player (mine is version 7), then click on "Create New Virtual Machine":
Create New Virtual Machine - Easy so far, right?

Select "I will Install the OS Later", then click Next. That's because otherwise VMWare player will wtry to make a default configuration without asking anything during the insal phase. But we want to have a precise configuration, so this option in our case isn't useful.
I will install the operating system later - We don't like default options, right?
Select "Linux", version "Ubuntu"; then click "Next"
Anyway, we know we're installing a Ubuntu Server.
Pick a name for your VM; I like to use useful and not too long names, with a clear meaning even to people who see them for the first time, so I choose "TemplateUbuntuServer1204". No spaces in filename - in linux it is known they may cause problems, so let's try to avoid at least these one.
Template, something we will reuse; Ubuntu, the OS; Server, the kind of operating system; 12.04, the version. No dots, even if it shouldn't give problems (at least in linux).
Select "Split virtual disk in multiple files" - in my case it was the default selection. Leave 20 GB as "Maximum disk size" - it should be more than enough in most cases.
This will be useful later.
Click on "Customize hardware":
Customize hardware, we have to do something in there.
Leave Memory and CPU as they are by default (in my case 1GB and 1 Core).
Select section "New CD/DVD (SATA)", select "Connect at power on", click on "Use ISO image", then "Browse", navigate to the directory where you downloaded the Ubuntu ISO, select it and press "Open".
Now select the right ISO.
Select section "Network Adapter", select "Connect at power on", then select "Bridged: Connected directly to the physical network" and enable "Replicate physical network connection state". If I understand this correctly, this last field means that if your PC is connected or disconnected, the same will be the virtual network adapter in the virtual machine.
Bridged - we need the virtual machine to access directly to internet.
Remove "Sound Card" and "Printer" by selecting those sections and clicking on "Remove".

The basic final configuration should look like this:
They are simply useless on most standard servers.
Click "Close", "Finish", and "Close" again. You should be on the basic VMWare Player interface.

Click on "Play virtual machine"
PLAY!!! Finally!!!
There could be an "Hint" on the new black window, you can click on "OK" or click "Never show this hint again" and then ok if you prefer.

That's it for this first part! I chose to divide the installation process in two parts to avoid a post too long. In the next few days I will publish the second part, that is the actual installation of Ubuntu Server 12.04 Precise Pagnoline

LONG ANSWER
This time maybe I should write something like "More in depth" instead of "Long Answer", for this section will never be longer than the above ;)

The idea behind this test virtual machine is to have a really clean and default environment to test software installations and behaviours. It's not fault-proof, but gives me a really solid way to reproduce and/or isolate any bug or problem I find, and if it's related to something else I installed/did or it's the procedure itself that returns an error.

The other idea is to have an environment as clean as possible, starting from the hardware: no sound card and printer, for these could imply drivers and software not really needed.

I chose to use a bridged network interface for NATted network card can sometimes give some problem to reach internet (needed do download software and updates), and the process to debug may invalidate the goal of a clean installation. With bridged network interfaces, instead, I never met any problem (for the moment!!!).

The choice to suggest a 32 bit Ubuntu has two main reasons. First: 64 bit softwares often are porting of their 32 bit versions, even in 2015; or may depend on something not available as 64 bit. In general I find that 64 bit programs are still less stable than 32 bit, even if I don't know the exact reason. This means that you may incur in more compatibility problems due to system architecture and not to other things.
The second reason is that VMWare Player does not support every 64-bit CPU to virtualize 64-bit OSs (for more informations on this topic, VMWare KB1003945 - Hardware and firmware requirements for 64-bit guest operating systems). For example, my I7 is not supported, and it isn't a special or particular CPU. As always, standards and simplifications simply doesn't exists, there are tons of compatibility problems and exceptions even in the most used and developed software. Anyway, for the sake of portability (at least on desktop environments), I chose to use 32 bit Ubuntu. I will have enough problems just concentrating on the software I'm testing, without having to deal with compatibility or architecture problems.

Labels: ,