Shahar Havivi has uploaded a new change for review.
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 <shaharh(a)redhat.com>
---
M lib/vdsm/v2v.py
1 file changed, 12 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/68/62368/1
diff --git a/lib/vdsm/v2v.py b/lib/vdsm/v2v.py
index c6a9943..0d9882f 100644
--- a/lib/vdsm/v2v.py
+++ b/lib/vdsm/v2v.py
@@ -880,6 +880,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:
@@ -895,6 +897,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.getURI().startswith(_XEN_SSH_PROTOCOL):
+ 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/62368
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I84512f54f9949640a568a444dd7eeb78db852134
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <shavivi(a)redhat.com>