Saturday, September 5, 2009

Restore XenServer with HP Lefthand Networks SAN

Today I had to restore a XenServer VM with the SR residing on an HP Lefthand Networks iSCSI SAN (SANiQ v8.1). It was smooth as butter and made me all happy inside due to the ease of the restore ;)

I had created a Wiki site for internal admin use on a W2K8 server on IIS. I decided that I didn't want to build another W2K8 server and use another license for the SharePoint site so instead I decided to have it run on the wiki site as well. During the install I made the mistake of creating the SharePoint site as the default site which was very effective for killing my Wiki site.

Luckily I had created a Snapshot on my LH Networks SAN prior to the SharePoint install. Here's the steps I used to restore.
  1. First I gave my test XenServer pool access to the Snapshot in the Lefthand Console.
  2. Turned off the Production server
  3. Detached the SR for the Production Server in question
  4. Created a new SR in the test pool
  5. Target IQN of the Snapshot name
  6. When you click finish it will see the disk and warns not to attach if other pools are using the SR. (thus the reason we turned of and detached the production server / SR). Click Yes
  7. Create a new vm with correct properties.
  8. Select any install media, it won't matter as you won't be installing
  9. You won't be able to select the Virtual Disk you want since it won't have free space. So just select any disk and we'll fix later
  10. Give it a nic
  11. UNcheck the Start VM automatically
  12. Go into the properties of your new VM
  13. Change boot order so HD is first
  14. Go to Storage and Attach the correct Virtual Disk
  15. Delete the Virtual Disk from when you created the VM (if you selected one)
  16. Ensure RAM / CPU are set correctly and boot.
  17. Check over the server to ensure it's what you want to restore

Once I verified that this was the server snapshot that I wanted I went to pull this into production

  1. Turn off the test server you just created
  2. Forget the Virtual Disk (this doesn't destroy data)
  3. Go into the HP Lefthand console and and right click the Snapshot you want and choose "Rollback".
  4. All Snapshots and changes created after that snapshot will be lost! Make sure this is what you want first.
  5. Go back to XenServer Console and click the Production SR and click Attach.
  6. Fill in the IP info and Discover LUN etc. Click yes to the warning about other VM's on it again.
  7. Start server
  8. Glance around the office to see if anyone noticed that the wiki was down ;)

No comments:

Post a Comment