Pino Toscano
2017-Mar-14 14:17 UTC
[Libguestfs] [PATCH 1/2] v2v: OVF: add Debian and Ubuntu osinfo variants
Unfortunately, there are very few osinfo types available for Debian and Ubuntu, so make sure to use them only when the version is enough, and use the higher version available also for any following version. --- v2v/OVF.ml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/v2v/OVF.ml b/v2v/OVF.ml index 0e09d29..1f838f5 100644 --- a/v2v/OVF.ml +++ b/v2v/OVF.ml @@ -105,6 +105,26 @@ and get_ostype = function i_arch = "ppc64" | "ppc64le" } -> "sles_11_ppc64" + (* Only Debian 7 is available, so use it for any 7+ version. *) + | { i_type = "linux"; i_distro = "debian"; i_major_version = v } + when v >= 7 -> + "debian_7" + + (* Only Ubuntu 12.04 to 14.04 are available, so use them starting + * from 12.04, and 14.04 for anything after it. + *) + | { i_type = "linux"; i_distro = "ubuntu"; i_major_version = v; + i_arch = "ppc64" | "ppc64le" } when v >= 14 -> + "ubuntu_14_04_ppc64" + + | { i_type = "linux"; i_distro = "ubuntu"; i_major_version = v } + when v >= 14 -> + "ubuntu_14_04" + + | { i_type = "linux"; i_distro = "ubuntu"; i_major_version = maj; + i_minor_version = min } when maj >= 12 -> + sprintf "ubuntu_%d_%02d" maj min + | { i_type = "linux" } -> "OtherLinux" | { i_type = "windows"; i_major_version = 5; i_minor_version = 1 } -> -- 2.9.3
Reasonably Related Threads
- Re: [PATCH v2 1/2] 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
- [PATCH v3 0/3] v2v: improve OVF in OVirt flavour
- [v2v PATCH] v2v: -o libvirt: write CentOS 8 osinfo ID
- Re: [PATCH v2 1/2] v2v: OVF: write ovirt:id attribute for the OS in OVirt flavour