[Libguestfs] [v2v PATCH] v2v: -o libvirt: write CentOS 8 osinfo ID

Richard W.M. Jones rjones at redhat.com
Wed Dec 11 10:33:13 UTC 2019


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




More information about the Libguestfs mailing list