2

I have recently reinstalled XenServer on my server. All the VHD files were stored on my NAS via NFS, so I re-added the NFS SR after reinstallation.

However, all my VMs seem to be missing, and the VHDs in the SR are "blank" - no description, no name, just the size of the disk.

What can I do to reattach the VHDs back to VMs? I was under the impression that I could just create a new VM, point the VM to use the VHD file as the hard disk (like Hyper-V), but that does not work...

Screenshot

1 Answer 1

2

This is normal behavior of XenServer. All the metadata for the image (VDI) is in the Xapi database files, not in the image files themselves. Note that the UUIDs of images are also gone, so no matter if you've imported diskless VMs back from old hosts or recreated them from scratch, there's no way to Xapi to find which VDI belongs to which VM.

Same goes for combined detach and forget operation on storage repositories (SRs) - you will also lose these pieces of information.

I can only advice to mount your images to any VM, read the contents of disk, name them and in the end connect VDIs to VMs manually. Or if you have saved your old installation, search for Xapi databases, they are in XML format IIRC, under /var/xapi or like (path and format written from my memories, no Xen installation available at the monent to check).

1
  • Thanks for your reply. I did not know that the VM info was stored outside the SR and I've already formatted the entire server. I ended up 'working around' by converting the VHDs to VMDKs and using ESXi to boot them. Small homelab project, so it was still OK.
    – ryanswj
    Feb 18, 2015 at 16:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .