Matthew Booth
2010-Jun-18 12:37 UTC
[Libguestfs] [PATCH] Look for i686 target for i386 Windows guest
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']"); -- 1.7.1
Richard W.M. Jones
2010-Jun-18 14:24 UTC
[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
Reasonably Related Threads
- [PATCH 1/2] Refactor guest and volume creation into Sys::VirtV2V::Target::LibVirt
- [PATCH 1/2] Allow reading more data than the reported size of a volume
- Refactor virt-v2v to be more like a 'big script'
- [PATCH 1/2] Target: Pass os description to create_guest
- [PATCH 0/2] Remove troublesome devices when outputting to libvirt