Saturday, May 22, 2010

Resetting UUID on VDI for VirtualBox

Ran up against a problem when I ‘cloned’ the VDI hard drive files from my Sun VirtualBox lab environment.  The VDI files contain a unique ID (UUID) for the file itself.  THere are commands to clone the file, but if the file has already been copied, the UUID needs to be reset.

Google turned up a hit on Steve Smith’s Blog about what is going on, and how to resolve it.

Documenting the command line syntax here for my own reference:

VBoxManage internalcommands setvdiuuid “MyCopy.vdi”

Lab Rebuild

Been a while.  Have gone through quite a bit on the computing front.  For starters, managed to wipe out not only all the data on my primary system, but also on my backup in one fell swoop.  Needless to say, that was a very painful lesson, and some digital photos were lost, possibly permanently (there may be a few items on my wife’s laptop that I haven’t searched through yet).  So, major lesson learned?  NEVER do anything to your backup drives before completing a recovery if you blow away your system on accident.

This also means I have to rebuild my virtual lab environment.  For the second go round I’ve picked up a copy of Deployment Fundamentals by Johan Arwidmark and Mikael Nyström.  The book details setting up a Windows 7 deployment infrastructure in a fictitious enterprise environment.  So will be using their examples to rebuild my lab.

The first order of business, start configuring virtual hosts!  Downloaded and installed VirtualBox, which can handle x64 hosts, so I don’t have to load Server 2008 HyperV over the top of my carefully rebuilt Windows 7 system (Really didn’t want to give up my workstation for the lab environment completely, maybe one day…  when I have a Core i7 notebook…).  Time to build the Server 2008 R2 master image for the lab environment, since we will be using three or four of these systems.  Complete the install, download any patches from Microsoft/Windows Update, and then run sysprep.  The best method looks like running from the command line, a quick google search turned up this blog post by Matt Groves, http://www.mattgrovesblog.com/2009/11/sysprep-windows-2008-r2.html.

Matt notes that this command should be run from an elevated command prompt:  c:\windows\system32\sysprep\sysprep.exe /quiet /generalize /oobe /shutdown

Once sysprep is completed and the virtual machine is shut down, copy the virtual drive file to create the GOLD image.