Matthew Booth
2011-Apr-26 16:54 UTC
[Libguestfs] [PATCH] Don't set distro for non-Linux guests
'distro' isn't used anywhere for Windows guests. However, if it's set, it's required to be matched in virt-v2v.conf. Rather than have to update the config again, just don't set it for Windows guests. --- lib/Sys/VirtConvert/Converter.pm | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/lib/Sys/VirtConvert/Converter.pm b/lib/Sys/VirtConvert/Converter.pm index 28c57d5..6b9f8f9 100644 --- a/lib/Sys/VirtConvert/Converter.pm +++ b/lib/Sys/VirtConvert/Converter.pm @@ -102,7 +102,8 @@ sub convert my %desc; $desc{os} = $g->inspect_get_type($root); - $desc{distro} = $g->inspect_get_distro($root); + $desc{distro} = $g->inspect_get_distro($root) + if $desc{os} eq 'linux'; $desc{product_name} = $g->inspect_get_product_name($root); $desc{major_version} = $g->inspect_get_major_version($root); $desc{minor_version} = $g->inspect_get_minor_version($root); -- 1.7.4.4
Richard W.M. Jones
2011-Apr-26 16:58 UTC
[Libguestfs] [PATCH] Don't set distro for non-Linux guests
On Tue, Apr 26, 2011 at 05:54:05PM +0100, Matthew Booth wrote:> 'distro' isn't used anywhere for Windows guests. However, if it's set, it's > required to be matched in virt-v2v.conf. Rather than have to update the config > again, just don't set it for Windows guests. > --- > lib/Sys/VirtConvert/Converter.pm | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/lib/Sys/VirtConvert/Converter.pm b/lib/Sys/VirtConvert/Converter.pm > index 28c57d5..6b9f8f9 100644 > --- a/lib/Sys/VirtConvert/Converter.pm > +++ b/lib/Sys/VirtConvert/Converter.pm > @@ -102,7 +102,8 @@ sub convert > my %desc; > > $desc{os} = $g->inspect_get_type($root); > - $desc{distro} = $g->inspect_get_distro($root); > + $desc{distro} = $g->inspect_get_distro($root) > + if $desc{os} eq 'linux'; > $desc{product_name} = $g->inspect_get_product_name($root); > $desc{major_version} = $g->inspect_get_major_version($root); > $desc{minor_version} = $g->inspect_get_minor_version($root); > --ACK. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/
Possibly Parallel Threads
- [PATCH 1/7] Push $desc creation into Sys::VirtConvert::Converter->convert
- Re: [PATCH] virt-v2v: Convert RedHat.pm to Linux.pm - for SUSE support
- APIs affected by btrfs subvolumes
- Re: [PATCH] virt-v2v: Convert RedHat.pm to Linux.pm - for SUSE support
- [PATCH 0/4] virt-v2v: Add support for SUSE guest conversions