Creating a Linux virtual machine server with the HP microserver gen 8 server
Jul 1, 2017
3 minutes read

I am using:

  • HP MicroServer Gen 8
  • Ubuntu Server
  • A laptop with Linux installed as my local machine (This means that I can only provide Linux commands and software that I will be using)

My HP MicroServer

  • 8GB Ram
  • Intel Celeron Processor (2 core)
  • 1x 320 HDD
  • 2x 1TB HDD

Precursor:

I have set up my server a while ago and am not sure what I did during the config.

Step one - Install the server

Download the Ubuntu Server ISO here and follow this guide.

Using a USB input on the server (I used the internal one), insert the USB with the Ubuntu Server installer.

Turn on your server and wait for it to boot - you may need to press F11 to boot the USB drive. Follow the on screen instructions to install your Ubuntu Server instance.

Bonus step

Generate your SSH key if you haven’t got one and then edit add an entry to your SSH config file with Host <server-name>.

Login to your server via ssh <server-name> and then enter your password when asked - this is due to the key not being on that server yet - via your main machine to ensure SSH is working correctly. It will ask you to answer (yes/no), just confirm and you should be in your servers shell. You should now see something similar to the following:

Welcome to Ubuntu 16.04.2 LTS (GNU/Linux 4.4.0-62-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

131 packages can be updated.
61 updates are security updates.


Last login: Fri Jun 30 18:22:57 2017 from <your-client-ip-address>
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

<user>@<server-name>:~$

Log out by pressing ctrl-d (saves you having to write exit in the servers shell environment) and run the following on you local machines shell:

ssh-copy-id <server-name>

You should then be able now run ssh <server-name> and gain access straight away - without having to enter your password ever again - unless you have created an SSH key with a password.

Step two - Setup the networking

I simply follow this article as it gives you all you need. I’ve settled for relying on DHCP at the moment but I will set it to static IP addresses eventually.

Step three - Setup my first Virtual Machine

First, lets check that KVM has been installed correctly by running virsh --connect qemu:///system list --all

Now, get your OS ISO and run scp /path/to/os.iso <server-name>:/home/<user>/ to get the ISO on the server.

You could use the command line, but I have not gone down that road and will be using virt-manager.org which I’ve installed locally. I was installed RancherOS as I want to learn Docker and devops orientated skills, but through virt-manager.org it is

What’s next?

As I have stated in the previous step, I said for you to get your chosen OS. My OS will be mainly Rancheros for running Docker containers in order for me to extend my skills. As well as writing about installing and configuring Rancheros, I will be writing about getting the RAID array configured to allow for extra storage/persistance for containers.

Caveats

  • When using virt-manager.org, ensure you have the Network source set as the bridge, in my case it was Bridge br0: Host device eno1.

Previous