v2v: -i ova: Use full path for backing file.

Works around a libvirt bug:
https://bugzilla.redhat.com/show_bug.cgi?id=1431652
This commit is contained in:
Richard W.M. Jones
2017-03-13 14:21:56 +00:00
parent f34636700a
commit 91b5fb3641
4 changed files with 8 additions and 4 deletions

View File

@@ -284,6 +284,10 @@ object
* tar also works with 512 byte blocks.
*)
let size = roundup64 size 512L in
(* Workaround for libvirt bug RHBZ#1431652. *)
let ova_path = absolute_path ova in
let doc = [
"file", JSON.Dict [
"driver", JSON.String "raw";
@@ -291,7 +295,7 @@ object
"size", JSON.Int64 size;
"file", JSON.Dict [
"driver", JSON.String "file";
"filename", JSON.String ova]
"filename", JSON.String ova_path]
]
] in
let uri =

View File

@@ -55,7 +55,7 @@ if grep -sq json: $d/source ; then
# Normalize the output.
# Remove directory prefix.
# Exact offset will vary because of tar.
sed -i -e "s,\"$d/,\"," \
sed -i -e "s,\"[^\"]*/$d/,\"," \
-e "s|\"offset\": [0-9]*,|\"offset\": x,|" $d/source
diff -u test-v2v-i-ova-subfolders.expected2 $d/source
else

View File

@@ -54,7 +54,7 @@ if grep -sq json: $d/source ; then
# Normalize the output.
# Remove directory prefix.
# Exact offset will vary because of tar.
sed -i -e "s,\"$d/,\"," \
sed -i -e "s,\"[^\"]*/$d/,\"," \
-e "s|\"offset\": [0-9]*,|\"offset\": x,|" $d/source
diff -u test-v2v-i-ova-tar.expected2 $d/source
else

View File

@@ -59,7 +59,7 @@ if grep -sq json: $d/source ; then
# Normalize the output.
# Remove directory prefix.
# Exact offset will vary because of tar.
sed -i -e "s,\"$d/,\"," \
sed -i -e "s,\"[^\"]*/$d/,\"," \
-e "s|\"offset\": [0-9]*,|\"offset\": x,|" $d/source
diff -u test-v2v-i-ova-two-disks.expected2 $d/source
else