[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] [PATCH] Look for i686 target for i386 Windows guest



On Fri, Jun 18, 2010 at 01:37:52PM +0100, Matthew Booth wrote:
> We detect a Windows guest with 32 bit userspace as i386. Ensure we look for a
> i686 kvm target in this case.
> 
> Fixes RHBZ#605593
> ---
>  lib/Sys/VirtV2V/Target/LibVirt.pm |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/lib/Sys/VirtV2V/Target/LibVirt.pm b/lib/Sys/VirtV2V/Target/LibVirt.pm
> index cb9961d..199ca9e 100644
> --- a/lib/Sys/VirtV2V/Target/LibVirt.pm
> +++ b/lib/Sys/VirtV2V/Target/LibVirt.pm
> @@ -317,6 +317,9 @@ sub _configure_capabilities
>  
>      my $arch = $guestcaps->{arch};
>  
> +    # i386 userspace means i686 guest
> +    $arch = 'i686' if ($arch eq 'i386');
> +
>      (my $guestcap) = $caps->findnodes
>          ("/capabilities/guest[arch[\ name='$arch']/domain/\ type='kvm']");

ACK.

Maybe better to do:

$arch =~ s/^i[345]86$/i686/;

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://et.redhat.com/~rjones/libguestfs/
See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]