Bug 848926

Summary: virt-v2v should verify that the RHEV-M domain is an export storage domain
Product: [Community] Virtualization Tools Reporter: Richard W.M. Jones <rjones>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: NEW --- QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: cwei, jwu, mzhan, ptoscano, tzheng
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Richard W.M. Jones 2012-08-16 20:31:03 UTC
Description of problem:

Currently it is possible to perform a p2v/v2v operation
at a regular data domain.  After doing this, the guest
"disappears".

We should avoid this user error by checking that the type
of the domain is an export storage domain (apparently
CLASS=Backup in the domain metadata according to AiC)

Comment 1 Richard W.M. Jones 2014-09-10 13:17:02 UTC
The way to do this is to look for the <UUID>/dom_md/metadata
file and look for the CLASS= field.  It is CLASS=Backup for
export storage domains and CLASS=Data for data domains:

$ find v2v-rhevm-export v2v-rhevm-data -name metadata | xargs grep CLASS
v2v-rhevm-export/39b6af0e-1d64-40c2-97e4-4f094f1919c7/dom_md/metadata:CLASS=Backup
v2v-rhevm-data/b592eac5-7c12-4843-ae51-7b0f90a9dfb4/dom_md/metadata:CLASS=Data

However if we are going to support exporting directly to
data domains then we may in fact *not* want to do this
check.