Monday, February 1, 2010

Recovering from XenServer Root Drive Full -- Oppsie!


I was trying to import a VHD straight into XenServer the other day. I was moving a VM from HyperV to XenServer 5.5, so instead of starting from scratch, I thought I would simply copy the VHD from HyperV to XS using WinSCP. Following the directions from Trevor Mansell's Citrix Blog

All went well until my XenServer died on me...
Of course, we all have those Homer moments (slap on head, "DOH!"). I realized, AFTER THE FACT, that I was actually copying the VHD to the ROOT volume, not the SR I intended too.  The XenServer was still running, but I could not manage the server via CLI nor XenCenter.  Trying to launch the xsconsole, nothing would happen.


As several of you may have guessed off the bat, and I realized after the fact, I copied the file not to the local SR, but to the kernel install partition. OOPS!

When that partition filled up, the console crashed. BOOM!  (well, more of a whimper really, but still...)

I was able to recover by doing the following process:
  • PuTTY into the XS
  • navigate to the SR location I attempted to copy the VHD to, then delete the .FILEPART
  • (for not linux folk, RM is the remove [delete] command)
  • then run the xe-toolstack-restart command
  • Everything was happy after that
I did not attempt to reboot the XenServer for fear it might not revive.  Luckily, the toolstack came up after clearing the space.  Hopefully, you won't encounter this... but if by accident you do, now you know how to recover.

2 comments:

  1. Thanks for sharing! Great to know if some midnight sessions turns bad :)

    ReplyDelete
  2. To recover Virtual hard drive data, only reliable application should be deployed. VHD recovery software is the fail-safe solution to repidly retrieve entire data from corrupted/damaged VHD file. Tool support all Windows OS and Virtual Server editions. Get more information:-
    http://www.filesrecoverytools.com/vhd-data-recovery.html


    ReplyDelete