A long while ago I was taking a look at an open source application called FOG to look at a method of quickly deploying server images at that time, our MS Virtual Server environment. Flash forward to now, I got some time in the office to look at this again, but now we are using VMware ESXi (until we get our Enterprise licensing this summer sometime). This will probably become obsolete when we get the Enterprise version, but I also wanted to look at this as a solution for my home network as I usually like to get something built on the fly and not have to invest a lot of time into the build.
So what made FOG an appealing solution. First off, it was very easy to setup. These are the steps I took to get an environment up in about a hour of work:
- Built a Ubuntu Server 8.10 VM with the following specs:
- 1 Processor
- 512 megs of RAM
- 2 hard drives: 1 drive at 8gigs, this contains the OS and the FOG install, the 2nd drive at 100gigs that is hooked up to a NFS share which is connected to our SAN. Not extremely fast, but fast enough with plenty of storage space
- Loaded the Ubuntu server with OpenSSH and the most recent version of FOG (as of this writing 0.25), the only tweak I had to do was I setup the 100gig partition under /opt/fog_images. I had to make changes to the FOG’s common/config.php and /etc/exports file. I just followed the simple instructions for the install, the FOG install takes care of everything else (like apt-get all of the necessary components like Apache, PHP, MySQL, TFTP, etc), real nice! I did not load the DHCP part as we are using a Windows 2003 server to service our DHCP addresses.
- Setup the PXE parameters on our Windows 2003 DHCP server to point to the FOG server. That is the beauty of ESXi, brand spanking new VM guests will boot via PXE since their hard drive hasn’t been configured yet.
- Now for the cloning of a Windows Server 2003 R2, I created a VM image. I did a typical Windows 2003 server, but with one addition, I changed the boot options to go for 5 seconds. This would give me enough time to hit F12 to boot via network. This will be important later on.
- The Windows 2003 Server is one of our standard production server builds, latest/greatest service packs plus some of our monitoring, anti-virus, etc applications. Once I was happy with that, I ran the sysprep tools image and shut it down.
- The next step you can do one of two ways, you could manually add the new Windows server “host” to FOG by getting its MAC address from VMware, or do a PXE boot and select Quick Inventory option. The only problem I had with the second one (Quick Inventory is that it reboots the machine after the inventory, and during my testing I was not able to shut it down quick enough, thus making my sysprep useless. The other thing I could have done if I thought about it was do a Quick Inventory before building the machine and sysprepping.
- The final steps I won’t go into much detail (they are laid out in the FOG documentation) was creating an image (Windows 2000/XP) for my new host then setting up an upload task. Rebooted the new VM host and it pushed it up in about 10 minutes. This is where having enough time to hit F12 was important as I didn’t want the OS to start loading and messing up my sysprepped image. A download of an image was about the same amount of time, and the sysprep goes rather quickly (I have everything automated for the sysprep install).
Some other notes, I am going to look at having FOG rename the machine as well (not add to AD though). This could eliminate one more step with deployments.
I know FOG is more catered to the workstation environment, but this solution seems to work rather nice for deploying server quickly in our VM environment and given it really only took about a hour to setup (once I knew what I was doing). It also has the added benefit that I can set it up for our physical boxes as well, I just would need to create separate image of a standard server with its particular drivers.
So if you are looking for a pretty easy imaging systems, I would check out FOG (http://www.fogproject.org/).