On 01/19/22 19:03, Richard W.M. Jones wrote:
The error was:
virt-builder: error: cannot use ‘--update’ because no package manager has been detected for this guest OS.
If this guest OS is a common one with ordinary package management then this may have been caused by a failure of libguestfs inspection.
For OSes such as Windows that lack package management, this is not possible. Try using one of the ‘--firstboot*’ flags instead (described in the manual). --- tests/test-v2v-conversion-of.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/tests/test-v2v-conversion-of.sh b/tests/test-v2v-conversion-of.sh index 232c630057..5a974d1b74 100755 --- a/tests/test-v2v-conversion-of.sh +++ b/tests/test-v2v-conversion-of.sh @@ -61,8 +61,17 @@ case "$guestname" in ;; esac
+# Don't try to update Windows versions. +case "$guestname" in + windows*) + ;; + *) + extra[${#extra[*]}]='--update' + ;; +esac + # Build a guest (using virt-builder). -virt-builder "$guestname" --quiet -o "$disk" "${extra[@]}" --update +virt-builder "$guestname" --quiet -o "$disk" "${extra[@]}"
# Create some minimal test metadata. cat > "$xml" <<EOF
I wish bash had easier syntax for appending an element to an indexed array. Reviewed-by: Laszlo Ersek <lersek@redhat.com>