generate OVF xml from libvirt xml and Import existing data domain

Latest response

I have a couple of questions regarding RHEV VMs and storage domains that I'd really appreciate everyone's insights on:

1] Is there a way to generate an OVF from the libvirt xml obtained from https://[RHEVM]:443/api/vms/[VMGUID] ?
- essentially, I see that the way to do this is to create an export domain and to export each VM manually. As a part of this, the disk images get copied to the export domain and the libvirt xml gets converted to OVF and copied to "master/vms" on the export domain. Can we do this second part separately via an supported/unsupported API/operation?

2] On a related note, can we import a non-export (i.e. data) storage domain into the RHEV datacenter?
Use case: storage vendor based snapshot of the lun on which the block storage domain exists could be taken and the resulting lun may be exposed back as a valid storage domain.

Thanks!

Responses

Regarding #2 - I would be extremely careful with that method (if I understand what you are proposing). Essentially all the VM disks are Volumes and each datastore is a VG (I believe). I would assume that if you weee to take a snapshot of an existing datastore then attempt to mount that datastore, you would have duplicate PVs, etc.. with Duplicate VMs.

If I did not understand what you are proposing, I apologize.

Thanks James - good point, and I understand the complexity associated with the duplicate PV UUIDs and LVM structures.
A simplified approach could be to simply create an export domain and overlay the images/ovf onto it and import VMs from the export domain.
However, this essentially slows things down quite a bit.
Is there was a way to attach an image from an export domain to a VM without actually importing the VM on the export domain?

Ah -- I see what you are saying now... the "actually importing the VM" is a time-consuming process as it literally copies the disk image from one domain to the other (correct)? As opposed to just scanning in some new LUNs and attaching a virtual disk from that snapshot to a running VM.

I would look at the documentation for how Red Hat recommends implementing a DR recovery.
https://access.redhat.com/sites/default/files/attachments/2012_rhev_3_dr_0.pdf

The reason I recommend that doc is that it talks quite a bit about how RHEV works with the VGs/LVs/etc... and perhaps would give you some idea of how you could use a portion of their processes.

I have to evacuate one of my RHEV clusters (to VMware) and I, too, am looking for some shortcuts. I'll dig through some of the docs I found recently too see if any of them seem helpful.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.