Text 20 Feb Building a Cloning/Imaging System

Welcome to the inaugural blog entry here at DMorrisonRT.  I hope you find it very informative.

My reason for the following project is to facilitate an easy and efficient system for managing my Virtual Classroom and all the training machines. Currently we use a pool of about 10 to 15 VM’s with Windows XP. Each of our classes has much different software requirements that force us to uninstall and reinstall quite frequently. We have tried using VMWare snaphots, which has helped alot as well. But, this is only really useful on the specific VM you are running - meaning, you cannot clone a snapshot to multiple VM’s only the one it was created on. So, I have been testing several solutions out in my lab environment and have now decided this is the direction we will be taking.  I will update this blog as we use the Imaging System for future classes to see how well it is performing.

This post will explain my process for building a server that will clone disks and allow for quick and easy imaging of machines.  I have decided to use FOG (http://fogproject.org/?q=node/1) as a VM on ESX 4.1. 

Step1:  Download the FOGVM from here - http://sourceforge.net/projects/freeghost/files/FOG_VM/fog_vm_0.27/

Download and extract the zip file which contains a VMX file and a VMDK file.

Step2: Use VMWare Converter to load the FOGVM server to your ESX server. You will need to use the source type of VMWare Workstation or other VMWare virtual machine. Browse to the VMX file and it will load the settings.

Step3: Conversion complete. Start VM in VI Client for the first time. You will go through all these prompts to configure the server: http://www.fogproject.org/wiki/index.php?title=Integrating_FOG_into_an_Existing_Network Assign an IP address and point to the DHCP server you have running on your network.

Step4: Configure your DHCP server to allow machines to boot into FOG: http://www.fogproject.org/wiki/index.php?title=Modifying_existing_DHCP_server_to_work_with_FOG.  Keep in mind which IP address you will be assigning to the FOG server and add that to the DHCP server’s configuration.

Step5: Type the FOG ip address into a browser to log in and see the web configuration page. 

Now we are ready to use FOG to take an image of a machine.  First you need to edit the BIOS settings to boot from network first.  FOG will display a short menu on the network boot that will boot from hard disk if there is no selection made.

The first time you boot into FOG on a machine, you will want to select Perform Full Host Inventory. Then you can add a hostname, IP, assign an image ID and also an OS id. One caviat here, I am using this with Windows 2003 server and needed to assign the Windows XP OS id to allow for imaging of the machine: http://fogproject.org/wiki/index.php?title=Imaging_Windows_2003

Now that the host has been added to FOG, you can go to the FOG management page and see the entry. The third icon from the left is “Host Management”.  Also, you will want to create a new Image for cloning. This step can also be done before you run an inventory to streamline things a bit. The image management icon is the fifth from the left. Once you have created an image, you will need to go into host management and edit the host to reflect that image ID.

Once the image has uploaded, we can now deploy it to new machines.  I am creating machines from scratch with the same specs as the original (mem & hd). Once created I will want to edit the BIOS to have network boot as the first option. Booting into FOG, I can register the host and assign the Image ID for the image we created above.  Now at the end of the host registration, I can choose the option to load the image onto the host.  I can load the same image to multiple machines simultaneously! Very cool….

So, this wraps up the Imaging System Build and as I said before, I will post updates as I run this system through the rigors of our weekly classroom set up and deployments.

Design crafted by Prashanth Kamalakanthan. Powered by Tumblr.