UPDATE: This blog post would have been really helpful.
A while back I blogged about our first 64bit server, Windows Server 2008, and Hyper-V. Well, it turns out I didn’t really know what I was doing. But, I had been using this box just to learn on, so it wasn’t a big deal. But, we are now looking at putting this server into production. Soooo… It was time to re-do the server. Turns out… I still don’t know what I’m doing…
We only had one VM on this server, and this VM has a limited user-base. So, I was free to do this work in the middle of the day, which was nice. In the end, I wish I had researched this process more before starting. I made too many assumptions and they cost me.
This server connects to our iSCSI SAN and uses a virtual disk for VM file storage. My original thought was; disconnect the virtual disk, re-install Hyper-V, reconnect the virtual disk, VIOLA! But, it didn’t go quite that smoothly.
The re-install was the easy part. I love how simple it is to install Server 2008, and the way they implement Roles and Features is great. I installed the Hyper-V Role and the Windows Powershell Feature. I was then ready to reconnect my virtual disk and get my VM back up and running.
Except that I could not find a way to get Hyper-V to recognize my VM. Now, truth be told, I didn’t look very hard (big mistake!). But all I saw was an Import feature that required a previous Export (which I didn’t do). My goal was to be able to save the snapshots I had. I was not able to figure out a way to do that. So, I ended up just creating a new VM and using the VHD file I had. As I type this, however, I am realizing a significant problem…
I didn’t commit the snapshots to the base VHD file before I did this. Again, my assumption was that I was going to be able to re-discover my VM and everything would show up intact. Now, I realize, while my VM is back, it is in its pre-snapshot state. All of my post-snapshot changes have been lost. I just confirmed this… Looked at the Event Viewer logs in the VM, prior to today, the most recent log entry is on 9/16/08.
Moral of the story: THINK through your process… I totally missed the boat on this one. I didn’t spend enough time thinking through this, following the various options, caveats, and hiccups that could have come up. And, when one did come up, I should have stopped and THOUGHT.
Think think think!
Oh, and, commit any snapshots to the base VHD file. This is done by deleting the snapshot within Hyper-V. Then, when you turn the VM off, any differencing disks are merged in tot he base VHD.
I am sick to my stomach…