Hello Francesco Romani, Tomas Golembiovsky,
I'd like you to do a code review. Please visit
https://gerrit.ovirt.org/63133
to review the following change.
Change subject: v2v: filter out Xen VMs with block storage
......................................................................
v2v: filter out Xen VMs with block storage
virt-v2v is not support importing Xen VMs with block storage domain.
No need to return these VMs via get_external_vms verb
Change-Id: I84512f54f9949640a568a444dd7eeb78db852134
Bug-Url: https://bugzilla.redhat.com/1365411
Signed-off-by: Shahar Havivi <[email protected]>
Reviewed-on: https://gerrit.ovirt.org/62368
Reviewed-by: Tomas Golembiovsky <[email protected]>
Tested-by: Shahar Havivi <[email protected]>
Continuous-Integration: Jenkins CI
Reviewed-by: Francesco Romani <[email protected]>
---
M lib/vdsm/v2v.py
1 file changed, 12 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/33/63133/1
diff --git a/lib/vdsm/v2v.py b/lib/vdsm/v2v.py
index 62ccd3c..057704d 100644
--- a/lib/vdsm/v2v.py
+++ b/lib/vdsm/v2v.py
@@ -861,6 +861,8 @@
except ET.ParseError as e:
logging.error('error parsing domain xml: %s', e)
return
+ if not _block_disk_supported(conn, root):
+ return
try:
_add_general_info(root, params)
except InvalidVMConfiguration as e:
@@ -876,6 +878,16 @@
vms.append(params)
+def _block_disk_supported(conn, root):
+ '''
+ Currently we do not support importing VMs with block device from
+ Xen on Rhel 5.x
+ '''
+ if conn.getType() == 'Xen':
+ return len(root.findall('.//disk[@type="block"]')) == 0
+ return True
+
+
def _add_vm_info(vm, params):
params['vmName'] = vm.name()
# TODO: use new API: vm.state()[0] == libvirt.VIR_DOMAIN_SHUTOFF
--
To view, visit https://gerrit.ovirt.org/63133
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I84512f54f9949640a568a444dd7eeb78db852134
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-4.0
Gerrit-Owner: Shahar Havivi <[email protected]>
Gerrit-Reviewer: Francesco Romani <[email protected]>
Gerrit-Reviewer: Tomas Golembiovsky <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/admin/lists/[email protected]