mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
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:
@@ -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 =
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user