Solved

Metadata Restore Failed. The uuid you supplied was invalid

Posted on 2010-08-30
6
4,620 Views
Last Modified: 2013-11-11
Hi folks, new to XenServer and haven't played with 'nix so this is all a bit strange. On XenServer 5.5.0 used the Backup, Restore and Update wizard to create a backup on an NFS based SR. Blew away the XenServer with a fresh install and reconnected the SR but an attempt at restoring "ALL VM data" results in the error "Metadata Restore Failed. The uuid you supplied was invalid". However the dry run option seems to succeed. Best guess is that the built in wizard is a bit dumb and I'll need to come to terms with the command line version of the restore action, after having first looked up all the required uuids - based on the command line options for the restore action. Can anyone confirm if this is the case?

Thanks in advance, Doug.
0
Comment
Question by:doug_murray
  • 3
  • 3
6 Comments
 
LVL 9

Accepted Solution

by:
ToxicPig earned 500 total points
Comment Utility
Totally correct.  I have seldom had a restore work 100%.  It frequently fails on at least one VM.  The data is there, just something in the metadata got hosed up, and prevents one (or a few) VM's from restoring.  The interface is nice about telling you which ones, so all I have to do is match up uuid's from the VBD's, reattach them to new VM's, and boot things back up.  Yes, it's a pain in the butt, and I've found no consistency between when it does and doesn't work.  Can't even repeat the same error on the same VM on a second try.  As near as I can figure, it must be some sort of packet loss between the pool master and the SR.  Just enough to lose some data or put it in the wrong place.  I'd need to tear apart the metadata backup to be sure, but I haven't had the time.  The Citrix forums only have a couple of posts about restoring metadata while the VM is still running (bad idea).  Citrix support is not especially helpful either because it's not a consistent error.  Just one of those maddening little things.  As long as the data is safe, I can deal with a little bit of headache.

BTW, my most recent detach/reattach procedure with an SR was between two XS 5.6 machines about a month ago.  Three VM's failed.  One disk each, all Windows, easy restore.  Again, just a pain.

Oh, but to answer your actual question: Yes, use the command line or the xsconsole menu system to run your backups.  Low level operations like that just work better for me, but I'm a Linux guy from way back, so I'm somewhat command-line biased.  Still have errors even doing it that way.  You do eventually get everything back because all the needed data is still in the VBD in the SR.  Just need to wrap some new VM metadata around it.
0
 

Author Closing Comment

by:doug_murray
Comment Utility
solution spot on based on what I actually asked. Now have to ask how to fix the problem.
0
 

Author Comment

by:doug_murray
Comment Utility
thanks for the reply ToxicPig! You lost me though at "Just need to wrap some new metadata around it" :-). I ran the command line:
xe-restore-metadata -x 4b3c7215-ad0d-4b08-98cb-b29ad04d86f6 -u 742d2195-3bb3-871b-209b-96423e549a5f -m all

and got the same error on the command line, which ties with what you said about metadata being stuffed up. The command line output (like the wizard) tells me the uuid that is the problem but I've no idea what to do with that information. By the sounds of it I need to bust open the backup VDI and make changes? Any clues on how to fix it or should I put in a support call?

Thanks,
Doug.
0
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 9

Expert Comment

by:ToxicPig
Comment Utility
Try this:

Do a manual spot-check of your VM's and VBD's by saving the output from xe vm-list and xe vbd-list.  Those will help you correlate VM's and disks later.

Restore all as normal.  If you have a VM or two that does not come back, check the contents of your SR.  You should see disks that were restored and assigned to VM's, and you should see a couple that weren't.  The metadata for those is unreadable for whatever reason.  

Create a NEW VM.  You can name it something temporary, or name it appropriately if you can clearly see what it is from those command dumps.  Size the memory and vCPUs appropriately, and give it the right number of interfaces on the right networks.  DO NOT assign it a disk yet.  Set it not to auto-boot.  Once created it will be in an off state.  Now just attach one of the unassigned disks to it.  Again, if you can tell from the UUID's exactly which one is which, then you're set.  Otherwise, there is some trial and error here in figuring out what's what.  Boot the VM with the newly attached disk, and see what comes up.  Based on what you see, you can adjust all of the new VM settings as needed.

What you have now is a NEW VM with NEW metadata, and the OLD disk attached to it.  Note that all of the UUID's (except storage) will have changed, and the MAC address will have changed.  Update any documentation, DHCP scopes, or scripts that depend on that level of information, and you are all set.
0
 

Author Comment

by:doug_murray
Comment Utility
thanks again Master ToxicPig. However my situation is that I was testing how I could recover my XenServers, or at least trying to work out how I can. I had a single XenServer with a CAG VPX VM on local storage, created an NFS based SR and ran manual backup from the xsconsole, thinking that when I selected my NFS based SR during the wizard that I was backing up *to* that SR. Not so, I discovered, after a really long call to support. In fact I was just backing up any VM metadata for VM's that had vdisks *on* that SR, which in my case was none, because I created the NFS SR purely to store my backups. It's official, the admin guide really sucks for Windows Admins - it leaves out important details.

What I had done was re-install XenServer over the top, thinking I could just run the restore wizard and bring back the VM metadata, Pool database and SR related metadata. Ba-pow. The recommendation from support in the end was to use the command line xe vm-export metadata=true -multiple filename etc...(still gotta look up the syntax) then somehow grab the resulting file off the boot partition. Alternately use the xe vm-export command from a Windows server that has the XenCenter console installed so that the file can be (apparently) saved to the Windows server, because ultimately I need the backup files on a Windows server so that they can be scooped up by Tivoli - they're no good to me sitting on the SR's or on the boot partition of the master XenServer.

Getting there, slowly. Getting to have use a lot more of the command line than I intended :-)
0
 
LVL 9

Expert Comment

by:ToxicPig
Comment Utility
Ah yes, the eternal question of how best to back up your VMs.  The best practice answer is still to use StorageLink or the native replication method of your favorite storage array.  Bring the metadata along in an SR backup, and you are good, mostly.  At the end of the day, the single best way to be assured that you have good and recoverable backups is still to shut down the VM, take a cold export, and backup the export.  
0

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Join & Write a Comment

Suggested Solutions

Create your own, high-performance VM backup appliance by installing NAKIVO Backup & Replication directly onto a Synology NAS!
Will try to explain how to use the VMware feature TAGs in the VMs and create Veeam Backup Jobs using TAGs. Since this article is too long, I will create second article for the Veeam tasks.
In this video tutorial I show you the main steps to install and configure  a VMware ESXi6.0 server. The video has my comments as text on the screen and you can pause anytime when needed. Hope this will be helpful. Verify that your hardware and BIO…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now