We detect a Windows guest with 32 bit userspace as i386. Ensure we look for a
i686 kvm target in this case.
At the same time, ensure that i[45]86 Linux userspace will also use i686.
Fixes RHBZ#605593
---
lib/Sys/VirtV2V/Converter/Linux.pm | 4 ++--
lib/Sys/VirtV2V/Converter/Windows.pm | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/lib/Sys/VirtV2V/Converter/Linux.pm b/lib/Sys/VirtV2V/Converter/Linux.pm
index ecee5bf..adfd2e5 100644
--- a/lib/Sys/VirtV2V/Converter/Linux.pm
+++ b/lib/Sys/VirtV2V/Converter/Linux.pm
@@ -334,8 +334,8 @@ sub _get_os_arch
# Default to i686 if we didn't find an architecture
return 'i686' if(!defined($arch));
- # i386 should really be i686
- return 'i686' if($arch eq 'i386');
+ # We want an i686 guest for i[345]86
+ return 'i686' if($arch =~ /^i[345]86$/);
return $arch;
}
diff --git a/lib/Sys/VirtV2V/Converter/Windows.pm b/lib/Sys/VirtV2V/Converter/Windows.pm
index e55d0f3..7f4604d 100644
--- a/lib/Sys/VirtV2V/Converter/Windows.pm
+++ b/lib/Sys/VirtV2V/Converter/Windows.pm
@@ -135,6 +135,9 @@ sub convert
$guestcaps{arch} = $desc->{arch};
$guestcaps{acpi} = 1; # XXX
+ # We want an i686 guest for i[345]86
+ $guestcaps{arch} =~ s/^i[345]86/i686/;
+
return \%guestcaps;
}
--
1.7.1