Blame SOURCES/0055-v2v-Add-Disk-ovf-capacity-attribute-containing-disk-.patch

97ae69
From 4c82b8c137b9337a80f0658c1712f2318e631bef Mon Sep 17 00:00:00 2001
97ae69
From: "Richard W.M. Jones" <rjones@redhat.com>
97ae69
Date: Mon, 18 Jun 2018 10:31:18 +0100
97ae69
Subject: [PATCH] v2v: Add <Disk ovf:capacity> attribute containing disk
97ae69
 virtual size (RHBZ#1592468).
97ae69
97ae69
Virt-v2v transfers to newer versions of ovirt-engine can fail with:
97ae69
97ae69
  ovirtsdk4.Error: Fault reason is "Operation Failed". Fault detail is "failed to parse a given ovf configuration ovf error: [empty name]: cannot read '//*/disksection' with value: null". HTTP response code is 400.
97ae69
97ae69
This was caused by a change made to oVirt:
97ae69
97ae69
  https://gerrit.ovirt.org/#/c/91902/
97ae69
97ae69
so that it now requires the <Disk ovf:capacity> attribute.
97ae69
97ae69
Thanks: Arik Hadas
97ae69
(cherry picked from commit 7c2afc88fd6aceb869a5e1c47a8183879ddec5fc)
97ae69
---
97ae69
 v2v/create_ovf.ml | 1 +
97ae69
 1 file changed, 1 insertion(+)
97ae69
97ae69
diff --git a/v2v/create_ovf.ml b/v2v/create_ovf.ml
97ae69
index ac3c61b13..e0f81e0a2 100644
97ae69
--- a/v2v/create_ovf.ml
97ae69
+++ b/v2v/create_ovf.ml
97ae69
@@ -835,6 +835,7 @@ and add_disks targets guestcaps output_alloc sd_uuid image_uuids vol_uuids
97ae69
           | OVirt -> image_uuid
97ae69
           | RHVExportStorageDomain -> vol_uuid);
97ae69
           "ovf:size", Int64.to_string size_gb;
97ae69
+          "ovf:capacity", Int64.to_string ov.ov_virtual_size;
97ae69
           "ovf:fileRef", fileref;
97ae69
           "ovf:parentRef", "";
97ae69
           "ovf:vm_snapshot_id", uuidgen ();
97ae69
-- 
c71420
2.20.1
97ae69