Pino Toscano
2019-Feb-28 10:12 UTC
[Libguestfs] [PATCH] v2v: -o libvirt: write win2k19 osinfo ID
When writing the libosinfo metadata in the libvirt XML, use the newly added (in osinfo-db) ID for Windows Server 2019; sadly, this version of Windows has the same version as Windows Server 2016, so distinguish it by looking at its product name. --- v2v/create_libvirt_xml.ml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/v2v/create_libvirt_xml.ml b/v2v/create_libvirt_xml.ml index a8dc1f2f0..dbc24315f 100644 --- a/v2v/create_libvirt_xml.ml +++ b/v2v/create_libvirt_xml.ml @@ -124,6 +124,11 @@ let get_osinfo_id = function | { i_type = "windows"; i_major_version = 6; i_minor_version = 3 } -> Some "http://microsoft.com/win/8.1" + | { i_type = "windows"; i_major_version = 10; i_minor_version = 0; + i_product_variant = "Server"; i_product_name = product } + when String.find product "2019" >= 0 -> + Some "http://microsoft.com/win/2k19" + | { i_type = "windows"; i_major_version = 10; i_minor_version = 0; i_product_variant = "Server" } -> Some "http://microsoft.com/win/2k16" -- 2.20.1
Martin Kletzander
2019-Feb-28 13:25 UTC
Re: [Libguestfs] [PATCH] v2v: -o libvirt: write win2k19 osinfo ID
On Thu, Feb 28, 2019 at 11:12:19AM +0100, Pino Toscano wrote:>When writing the libosinfo metadata in the libvirt XML, use the newly >added (in osinfo-db) ID for Windows Server 2019; sadly, this version of >Windows has the same version as Windows Server 2016, so distinguish it >by looking at its product name. >--- > v2v/create_libvirt_xml.ml | 5 +++++ > 1 file changed, 5 insertions(+) >Looks OK to me. FWIW: ACK>diff --git a/v2v/create_libvirt_xml.ml b/v2v/create_libvirt_xml.ml >index a8dc1f2f0..dbc24315f 100644 >--- a/v2v/create_libvirt_xml.ml >+++ b/v2v/create_libvirt_xml.ml >@@ -124,6 +124,11 @@ let get_osinfo_id = function > | { i_type = "windows"; i_major_version = 6; i_minor_version = 3 } -> > Some "http://microsoft.com/win/8.1" > >+ | { i_type = "windows"; i_major_version = 10; i_minor_version = 0; >+ i_product_variant = "Server"; i_product_name = product } >+ when String.find product "2019" >= 0 -> >+ Some "http://microsoft.com/win/2k19" >+ > | { i_type = "windows"; i_major_version = 10; i_minor_version = 0; > i_product_variant = "Server" } -> > Some "http://microsoft.com/win/2k16" >-- >2.20.1 > >_______________________________________________ >Libguestfs mailing list >Libguestfs@redhat.com >https://www.redhat.com/mailman/listinfo/libguestfs
Richard W.M. Jones
2019-Mar-25 15:03 UTC
Re: [Libguestfs] [PATCH] v2v: -o libvirt: write win2k19 osinfo ID
On Thu, Feb 28, 2019 at 11:12:19AM +0100, Pino Toscano wrote:> When writing the libosinfo metadata in the libvirt XML, use the newly > added (in osinfo-db) ID for Windows Server 2019; sadly, this version of > Windows has the same version as Windows Server 2016, so distinguish it > by looking at its product name. > --- > v2v/create_libvirt_xml.ml | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/v2v/create_libvirt_xml.ml b/v2v/create_libvirt_xml.ml > index a8dc1f2f0..dbc24315f 100644 > --- a/v2v/create_libvirt_xml.ml > +++ b/v2v/create_libvirt_xml.ml > @@ -124,6 +124,11 @@ let get_osinfo_id = function > | { i_type = "windows"; i_major_version = 6; i_minor_version = 3 } -> > Some "http://microsoft.com/win/8.1" > > + | { i_type = "windows"; i_major_version = 10; i_minor_version = 0; > + i_product_variant = "Server"; i_product_name = product } > + when String.find product "2019" >= 0 -> > + Some "http://microsoft.com/win/2k19" > + > | { i_type = "windows"; i_major_version = 10; i_minor_version = 0; > i_product_variant = "Server" } -> > Some "http://microsoft.com/win/2k16"Yes simple change, ACK Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org