November 2009 Entries

Virtualising “Desktop Servers”

We have a number of old Desktop in our server room running apps that do not need a server to run them but due to the complexity and age of the application they are left running on a windows 2000 Pro or windows XP box, so I took the decision to virtualise these using MSVMMC.

I have a server with 2 x 2.50 Quad Core E5420 Intel Xeon Processors and 16GB RAM The server originally was intended to be a backup server for our File server that is on the SAN, however as it has server 2008 Ent R2 on it and 250GB of free space I thought that I would start using it for virtualising these “Desktop Servers” and some low end servers. The server originally only had 1 processor and 4GB Ram but for a mere £600 we managed to upgrade the RAM to 16GB and buy an additional Processor.

I now have 8 Guests running on it and it is only using 8GB of the memory and the average CPU usage isn’t about 3%.

This server is now also connected to an MD3000i for a scanning project, it has an additional 5TB of space so I have so extra disk space to use now too as the only restriction of the server was disk space.

The next step for this server is to run it on a clustered environment and move the current guests on to the shared storage so if the server went down these servers would still be available.

Clustering and HyperV on Server 2008 R2

Recently I ordered 2 PowerEdge r710 Servers with a PowerVault MD3000i shared disk array. Each servers had 2 x 2.53GHz Quad Core Intel Xeon E5540 Processors  and 32 GB RAM.

The idea is to virtualise the entire Harrogate Datacenter that we have, to:

  1. Save on Power
  2. Consolidate out of date hardware
  3. reduce costs
  4. provide a High Availability system to our End Users and clients who will log in via our extranet.

I have only until now installed proof of concept and test labs with Microsoft Hyper V and Clustering using 3 Optiplex Desktops (2 for the cluster nodes and one with windows 2008 storage server  for the shared storage).

I could not believe how simple it was to actually setup and configure the cluster and then deploy Hyper V on to it.

The live environment will be completely resilient, 2 connections to the iSCS SAN Dual Power etc so there will no one single point of failure. As I am only using 2 nodes I can connect the SAN directly to the servers as there are 4 iSCSI ports on the MD3000i, had I had more nodes then I would need to use 2 switches dedicated for the iSCSI SAN.

Once the servers were installed I then setup the clustered environment. The cluster wasn’t only for HyperV but for SQL as well.

I had some issues installing the SQL cluster initially, turned out I needed to slip stream SP1 in to SQL 2008 in order to install it on a cluster. Once SQL and HyperV were installed on the server I was ready to start deploying guests on to the server.

The difference with HyperV on Server 2008 R2 from Server 2008 is that you can benefit from “Live State Migration” you can move a guest from one node to another with 0 down time on the guest, much like the V-Motion that you get with VMWare. In order to make use of the Live State Migration I needed to assign a virtual disk to each guest if you have more than one guest on a virtual disk the live migration will fail.

Again until now I would always create the virtual disk on the cluster and then format it and assign a drive letter to it, I then thought what if I went over 23 guests? how would it then work once I have reached the end of the alphabet?

The answer was simple, don’t assign a drive letter to the Virtual Disk, I wouldn’t have actually thought about that if I had not been “playing around” with Ubuntu recently, as linux does not assign a C:\, D:\ etc to disks. OK so if I do not assign a letter it assigns a rather long ID to the disk but you can suss it out when it comes to adding the guest on the host as to what disk is for what guest.

Also up until now I had not used any management tools for HyperV except the standard HyperV Manager that is installed initially. So I downloaded Microsoft Virtual Machine Manager Console 2008 R2 (MSVMMC) and started looking at this. I installed this as a guest on the Cluster. I have to say that I would now be lost without MSVMMC as it is a vital tool to managing HyperV servers regardless of being in a cluster or not. There are a lot of tasks that can be done with it that you could not do with the standard HyperV manager one for example is to create a virtual from a physical (P2V) Very useful indeed!

I am still learning about the management of the environment but at present I have a very stable and highly available environment for the external facing servers. I have recently started at looking at virtualising our Edinburgh office server infrastructure as we can possible consolidate 20 servers to a 3 node clustered HyperV environment.

I know that many of my peers in other firms would have considered and some already are deploying VMWare, however As we are already licensed for HyperV and Clustering with our Server 2008 Ent R2 licenses I cannot see why we need to look at another alternative as this is the most cost effective way of moving forward. The next step forward for me is to look at Windows Server 2008 R2 Datacenter I believe that we can step up our current Windows Server Std and Ent licenses to Datacentre which would then mean we would be licensed to run and unlimited number of Windows guests on our HyperV cluster.

Emailing Posts to Wordpress

Ok so you are probably wondering why am I posting something like this up on a subtext blog? Well I have recently set up a Ubuntu server running apche2 and MySQL so I thought I would start using it for Wordpress as I cannot install Subtext on Ubuntu.

Any way my new blog www.blogwhenbored.com is now up and running and I wanted to be able to email posts into it. As I use Google mail I set up the pop3 Server as pop.gmail.com and the port as 995, I then added the username and credentials in and emailed in a post but nothing appeared. I then found that there is a file that you need to run on your website called wp-mail.php that I needed to load up.

so I ran the file from the website and waited… and nothing happened for a wee while then I got the following error:

pop3 quit: connection does not exist.

helpful error hey!

After doing some digging I then discovered that because Google mail uses SSL on port 995 I needed to specify that the pop3 server was SSL this is done by adding the pop3 server as:

ssl://pop.gmail.com port 995

I ran wp-mail.php and it imported the test emails that I had sent in previously.

However this would then mean ever time I emailed in a post I would need to run the wp-mail.php file. So after some more digging I discovered that you needed to add a bit of code in the bottom of your footer.php

So I needed to add the following code to my footer:

<iframe src="http://yourblogdomain/wordpressinstalldir/wp-content/plugins/postie_
/get_mail.php?Submit=Run+Postie" name="mailiframe" width="0" height="0" frameborder=_
"0" scrolling="no" title=""> </iframe> 

Just substitute yourblogdomain/wordpressinstalldir with your domain name and wprdpress directory and that's it, every time the site is accessed this script is run and it will check for new email post.

Formatting your V+ Box to factory re-set it

So I have had about 5 V+ boxes in the last year to 18 months, Box kept re-booting itself and various other issues. Well today I had an engineer out (again) and instead of replacing the box he just gave me instructions on how to factory re-set my V+ box (format it) like most computer related issues a reset is usually a last resort but the most affective, but you loose all your existing data (if you have not backed it up).

Backing up your PC/Laptop data is one thing (relatively easy) However backing up your V+ box isn’t as easy.

The reason I subscribed to Virgin Media’s V+ service was to take out of the equation a need for a DVD recorder, and who these days still uses Video’s? I cannot remember the last time I owned a Video player/recorder, must be about 10 years ago!

However to back up your V+ box you need either a DVD Recorder or a Video recorder and you can use the archive feature on your box.

I still have some digging around on the internet to do must I am sure you must be able to backup off your V+ box to an external HDD or PC??

Anyhow that is for another day. Most of the issues I have had on my V+ box apparently can be fixed by a factory re-set. so here are the instructions how to:

  1. Press HOME button
  2. Hold PLAY button until E-00 appears on the front of the V+ box (LCD Panel)
  3. Press V+ button once – E-01 appears
  4. Press CHANNEL DOWN buttin 5 times – rft appears on the LCD Display
  5. Picture will freeze and box will then re-boot.
  6. Wait for LIVE TV to appear on the LCD Display

That’s it the box is re-formatted, now all you need to do is set all your favourite programs to record again!

Rename a Ubuntu Server

So now I have managed to change the Server IP address the next thing was to change the host name. The hostname is defined in the two following locations:

  1. /etc/hostname
  2. /etc/hosts

To change it you need to edit both files:

sudo nano /etc/hostname and sudo nano /etc/hosts

As with the interfaces file after each edit press Ctrl+X to save and exit.

I restarted the server after changing it but I guess there is a restart of a service you can do.

Changing the IP Address from DHCP to static on ubuntu server

One of the most simple things that only really took me a google search to do was to change the IP Address of my Ubuntu server from a DHCP assigned address to a Static IP address.

This is done through editing two files:

  1. /etc/network/interfaces
  2. /etc/resolv.conf

This is done through using the following commands:

sudo nano /etc/network/interfaces

then making the following changes to the file:

auto eth0
iface eth0 inet static
        address 192.168.1.100
        netmask 255.255.255.0
        gateway 192.168.1.1

press Ctrl+X to save and exit from that file. Then modify the resolv.conf file:

sudo nano /etc/resolv.conf

annd the following line for each DNS server:

nameserver 192.168.0.1
nameserver 192.168.0.2

Again press Ctrl+X to save and exit from the file.

then enter in the following command to restart the networking service:

sudo /etc/init.d/networking restart

Thats it the IP address has been set to a static.