Pino Toscano
2019-Dec-10 16:51 UTC
[Libguestfs] [v2v PATCH] v2v: -o libvirt: write CentOS 8 osinfo ID
CentOS 8 is represented with a simpler osinfo ID without a minor version. --- v2v/create_libvirt_xml.ml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/v2v/create_libvirt_xml.ml b/v2v/create_libvirt_xml.ml index dbc24315..002ce2b8 100644 --- a/v2v/create_libvirt_xml.ml +++ b/v2v/create_libvirt_xml.ml @@ -43,9 +43,14 @@ let get_osinfo_id = function i_major_version = major; i_minor_version = minor } when major < 7 -> Some (sprintf "http://centos.org/centos/%d.%d" major minor) - | { i_type = "linux"; i_distro = "centos"; i_major_version = major } -> + | { i_type = "linux"; i_distro = "centos"; i_major_version = major } + when major = 7 -> Some (sprintf "http://centos.org/centos/%d.0" major) + | { i_type = "linux"; i_distro = "centos"; i_major_version = major } + when major >= 8 -> + Some (sprintf "http://centos.org/centos/%d" major) + | { i_type = "linux"; i_distro = "sles"; i_major_version = major; i_minor_version = 0; i_product_name = product } when String.find product "Desktop" >= 0 -> -- 2.23.0
Richard W.M. Jones
2019-Dec-11 10:33 UTC
Re: [Libguestfs] [v2v PATCH] v2v: -o libvirt: write CentOS 8 osinfo ID
On Tue, Dec 10, 2019 at 05:51:17PM +0100, Pino Toscano wrote:> CentOS 8 is represented with a simpler osinfo ID without a minor > version. > --- > v2v/create_libvirt_xml.ml | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/v2v/create_libvirt_xml.ml b/v2v/create_libvirt_xml.ml > index dbc24315..002ce2b8 100644 > --- a/v2v/create_libvirt_xml.ml > +++ b/v2v/create_libvirt_xml.ml > @@ -43,9 +43,14 @@ let get_osinfo_id = function > i_major_version = major; i_minor_version = minor } when major < 7 -> > Some (sprintf "http://centos.org/centos/%d.%d" major minor) > > - | { i_type = "linux"; i_distro = "centos"; i_major_version = major } -> > + | { i_type = "linux"; i_distro = "centos"; i_major_version = major } > + when major = 7 -> > Some (sprintf "http://centos.org/centos/%d.0" major) > > + | { i_type = "linux"; i_distro = "centos"; i_major_version = major } > + when major >= 8 -> > + Some (sprintf "http://centos.org/centos/%d" major) > + > | { i_type = "linux"; i_distro = "sles"; > i_major_version = major; i_minor_version = 0; > i_product_name = product } when String.find product "Desktop" >= 0 -> > --ACK Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v
Possibly Parallel Threads
- [PATCH] v2v: Add support for libosinfo metadata
- Re: [PATCH] v2v: Add support for libosinfo metadata
- [PATCH] v2v: -o libvirt: write win2k19 osinfo ID
- [PATCH] v2v: OVF: write ovirt:id attribute for the OS in OVirt flavour
- Re: [PATCH v2 1/2] v2v: OVF: write ovirt:id attribute for the OS in OVirt flavour