From ed6378bd742a2a1fc5f686ebfa0280ac2637f2d9 Mon Sep 17 00:00:00 2001 From: ZouYuhua Date: Fri, 10 Nov 2023 14:14:20 +0800 Subject: [PATCH 1/8] fix issue: VM's guest id in guest info is 'asianux8_64Guest', not expected 'other4xLinux64Guest'. Signed-off-by: ZouYuhua --- .../set_guestinfo_without_shortname.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/linux/check_os_fullname/set_guestinfo_without_shortname.yml b/linux/check_os_fullname/set_guestinfo_without_shortname.yml index 5bd5d16f7..7b79e8c76 100644 --- a/linux/check_os_fullname/set_guestinfo_without_shortname.yml +++ b/linux/check_os_fullname/set_guestinfo_without_shortname.yml @@ -19,14 +19,14 @@ guest_is_otherlinux: false when: guest_os_ansible_distribution in ["RedHat", "CentOS", "OracleLinux", "AlmaLinux", "Rocky", "SLES", "SLED", "VMware Photon OS", "Amazon", "Fedora", - "Ubuntu", "Debian", "openSUSE Leap", "FreeBSD"] + "Ubuntu", "Debian", "openSUSE Leap", "FreeBSD", "MIRACLE"] - name: "Set fact of expected guest id suffix" ansible.builtin.set_fact: expected_guest_id_suffix: "{{ expected_guest_id_suffix | replace('64', '_64') }}" when: >- guest_os_ansible_distribution in ["RedHat", "SLES", "SLED", - "CentOS", "OracleLinux", "Debian", "FreeBSD"] + "CentOS", "OracleLinux", "Debian", "FreeBSD", "MIRACLE"] - name: "Set expected guest id and full name for {{ vm_guest_os_distribution }}" include_tasks: rhel_fullname_map.yml @@ -64,6 +64,12 @@ expected_guest_fullname: "SUSE openSUSE ({{ guest_os_bit }})" when: guest_os_ansible_distribution == "openSUSE Leap" +- name: "Set expected guest id and full name for {{ vm_guest_os_distribution }}" + ansible.builtin.set_fact: + expected_guest_id: "asianux{{ guest_os_ansible_distribution_major_ver }}{{ expected_guest_id_suffix }}" + expected_guest_fullname: "MIRACLE LINUX {{ guest_os_ansible_distribution_major_ver }} ({{ guest_os_bit }})" + when: guest_os_ansible_distribution == "MIRACLE" + - name: "Set expected guest id and full name for {{ vm_guest_os_distribution }}" include_tasks: otherlinux_fullname_map.yml when: guest_is_otherlinux From 807344d0c17aa9ecc386bfb9a2c2b756880b7131 Mon Sep 17 00:00:00 2001 From: ZouYuhua Date: Tue, 14 Nov 2023 14:12:50 +0800 Subject: [PATCH 2/8] change code as codereview Signed-off-by: ZouYuhua --- .../miracle_fullname_map.yml | 19 +++++++++++++++++++ .../set_guestinfo_without_shortname.yml | 8 +------- 2 files changed, 20 insertions(+), 7 deletions(-) create mode 100644 linux/check_os_fullname/miracle_fullname_map.yml diff --git a/linux/check_os_fullname/miracle_fullname_map.yml b/linux/check_os_fullname/miracle_fullname_map.yml new file mode 100644 index 000000000..6128a109a --- /dev/null +++ b/linux/check_os_fullname/miracle_fullname_map.yml @@ -0,0 +1,19 @@ +# Copyright 2023 VMware, Inc. +# SPDX-License-Identifier: BSD-2-Clause +--- +# Guest id "asianux8_64Guest" and full name "MIRACLE LINUX 8 (64-bit)" is available on ESXi 6.7 or later +# When Miracle Linux 9.x is available, its expected guest id and guest full name is same as Miracle Linux 8.x on ESXi 8.x, +# as there is no Miracle Linux 9 (64-bit) selection in vSphere UI + +- name: "Set fact of expected guest id on ESXi {{ esxi_version }}" + ansible.builtin.set_fact: + expected_guest_major_ver: "{{ [guest_os_ansible_distribution_major_ver | int, 8 ] | min }}" + +- name: "Set expected guest id and full name for {{ vm_guest_os_distribution }}" + ansible.builtin.set_fact: + expected_guest_id: "asianux{{ expected_guest_major_ver }}{{ expected_guest_id_suffix }}" + expected_guest_fullname: "MIRACLE LINUX {{ expected_guest_major_ver }} ({{ guest_os_bit }})" + when: + - vmtools_version is defined + - vmtools_version is version('12.3.5', '>') + diff --git a/linux/check_os_fullname/set_guestinfo_without_shortname.yml b/linux/check_os_fullname/set_guestinfo_without_shortname.yml index 7b79e8c76..7ed93bc42 100644 --- a/linux/check_os_fullname/set_guestinfo_without_shortname.yml +++ b/linux/check_os_fullname/set_guestinfo_without_shortname.yml @@ -38,7 +38,7 @@ - name: "Set expected guest id and full name for {{ vm_guest_os_distribution }}" include_tasks: "{{ guest_os_ansible_distribution | lower }}_fullname_map.yml" - when: guest_os_ansible_distribution in ["Amazon", "CentOS", "OracleLinux", "AlmaLinux", "Rocky", "Debian", "FreeBSD"] + when: guest_os_ansible_distribution in ["Amazon", "CentOS", "OracleLinux", "AlmaLinux", "Rocky", "Debian", "FreeBSD", "MIRACLE"] - name: "Set expected guest id and full name for {{ vm_guest_os_distribution }}" ansible.builtin.set_fact: @@ -64,12 +64,6 @@ expected_guest_fullname: "SUSE openSUSE ({{ guest_os_bit }})" when: guest_os_ansible_distribution == "openSUSE Leap" -- name: "Set expected guest id and full name for {{ vm_guest_os_distribution }}" - ansible.builtin.set_fact: - expected_guest_id: "asianux{{ guest_os_ansible_distribution_major_ver }}{{ expected_guest_id_suffix }}" - expected_guest_fullname: "MIRACLE LINUX {{ guest_os_ansible_distribution_major_ver }} ({{ guest_os_bit }})" - when: guest_os_ansible_distribution == "MIRACLE" - - name: "Set expected guest id and full name for {{ vm_guest_os_distribution }}" include_tasks: otherlinux_fullname_map.yml when: guest_is_otherlinux From bf243d94c13d3bc5a0f6534eb871d7e17e34998d Mon Sep 17 00:00:00 2001 From: ZouYuhua Date: Tue, 14 Nov 2023 14:49:03 +0800 Subject: [PATCH 3/8] change code as codereview Signed-off-by: ZouYuhua --- .../miracle_fullname_map.yml | 24 ++++++++++++------- .../set_guestinfo_without_shortname.yml | 4 ++-- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/linux/check_os_fullname/miracle_fullname_map.yml b/linux/check_os_fullname/miracle_fullname_map.yml index 6128a109a..81edbd49d 100644 --- a/linux/check_os_fullname/miracle_fullname_map.yml +++ b/linux/check_os_fullname/miracle_fullname_map.yml @@ -1,19 +1,27 @@ # Copyright 2023 VMware, Inc. # SPDX-License-Identifier: BSD-2-Clause --- -# Guest id "asianux8_64Guest" and full name "MIRACLE LINUX 8 (64-bit)" is available on ESXi 6.7 or later -# When Miracle Linux 9.x is available, its expected guest id and guest full name is same as Miracle Linux 8.x on ESXi 8.x, -# as there is no Miracle Linux 9 (64-bit) selection in vSphere UI +# Guest id "asianux8_64Guest" and full name "MIRACLE LINUX 8 (64-bit)" is available on ESXi 6.7P06 or later - name: "Set fact of expected guest id on ESXi {{ esxi_version }}" ansible.builtin.set_fact: expected_guest_major_ver: "{{ [guest_os_ansible_distribution_major_ver | int, 8 ] | min }}" -- name: "Set expected guest id and full name for {{ vm_guest_os_distribution }}" - ansible.builtin.set_fact: - expected_guest_id: "asianux{{ expected_guest_major_ver }}{{ expected_guest_id_suffix }}" - expected_guest_fullname: "MIRACLE LINUX {{ expected_guest_major_ver }} ({{ guest_os_bit }})" - when: +- name: "Set facts when vmtools_version is larger than 12.3.5" + when: - vmtools_version is defined - vmtools_version is version('12.3.5', '>') + block: + - name: "Set fact of guest OS is not other Linux" + ansible.builtin.set_fact: + guest_is_otherlinux: false + + - name: "Set fact of expected guest id suffix" + ansible.builtin.set_fact: + expected_guest_id_suffix: "{{ expected_guest_id_suffix | replace('64', '_64') }}" + + - name: "Set expected guest id and full name for {{ vm_guest_os_distribution }}" + ansible.builtin.set_fact: + expected_guest_id: "asianux{{ expected_guest_major_ver }}{{ expected_guest_id_suffix }}" + expected_guest_fullname: "MIRACLE LINUX {{ expected_guest_major_ver }} ({{ guest_os_bit }})" diff --git a/linux/check_os_fullname/set_guestinfo_without_shortname.yml b/linux/check_os_fullname/set_guestinfo_without_shortname.yml index 7ed93bc42..09ab5f5bb 100644 --- a/linux/check_os_fullname/set_guestinfo_without_shortname.yml +++ b/linux/check_os_fullname/set_guestinfo_without_shortname.yml @@ -19,14 +19,14 @@ guest_is_otherlinux: false when: guest_os_ansible_distribution in ["RedHat", "CentOS", "OracleLinux", "AlmaLinux", "Rocky", "SLES", "SLED", "VMware Photon OS", "Amazon", "Fedora", - "Ubuntu", "Debian", "openSUSE Leap", "FreeBSD", "MIRACLE"] + "Ubuntu", "Debian", "openSUSE Leap", "FreeBSD"] - name: "Set fact of expected guest id suffix" ansible.builtin.set_fact: expected_guest_id_suffix: "{{ expected_guest_id_suffix | replace('64', '_64') }}" when: >- guest_os_ansible_distribution in ["RedHat", "SLES", "SLED", - "CentOS", "OracleLinux", "Debian", "FreeBSD", "MIRACLE"] + "CentOS", "OracleLinux", "Debian", "FreeBSD"] - name: "Set expected guest id and full name for {{ vm_guest_os_distribution }}" include_tasks: rhel_fullname_map.yml From 5ef2ff803ef1ce5cb3bc5e1588628235032f646a Mon Sep 17 00:00:00 2001 From: ZouYuhua Date: Wed, 15 Nov 2023 16:19:42 +0800 Subject: [PATCH 4/8] modify readme to declare supporting miracle linux 8.x with ansible Signed-off-by: ZouYuhua --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b4f6ddc85..579fe6ac5 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,7 @@ This project supports below scenarios for end-to-end guest operating system vali | BCLinux-for-Euler 21.10 | :heavy_check_mark: | | :heavy_check_mark: | | Red Hat Enterprise Linux CoreOS (RHCOS) 4.13 and later | | :heavy_check_mark: | :heavy_check_mark: | | FusionOS 22 and 23 | :heavy_check_mark: | | :heavy_check_mark: | +| Miracle Linux 8.x | :heavy_check_mark: | | :heavy_check_mark: | **Notes** This compatible guest operating systems list is used for this project only. For guest operating system support status on ESXi, please refer to [VMware Compatibility Guide](https://www.vmware.com/resources/compatibility/search.php?deviceCategory=software&testConfig=16). From 4d0b857b101d78a8a89373c90ac35a2da555e2a8 Mon Sep 17 00:00:00 2001 From: ZouYuhua Date: Wed, 15 Nov 2023 18:33:05 +0800 Subject: [PATCH 5/8] change code as codereview Signed-off-by: ZouYuhua --- linux/check_os_fullname/miracle_fullname_map.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/linux/check_os_fullname/miracle_fullname_map.yml b/linux/check_os_fullname/miracle_fullname_map.yml index 81edbd49d..5b7ffcf16 100644 --- a/linux/check_os_fullname/miracle_fullname_map.yml +++ b/linux/check_os_fullname/miracle_fullname_map.yml @@ -12,12 +12,9 @@ - vmtools_version is defined - vmtools_version is version('12.3.5', '>') block: - - name: "Set fact of guest OS is not other Linux" - ansible.builtin.set_fact: - guest_is_otherlinux: false - - name: "Set fact of expected guest id suffix" ansible.builtin.set_fact: + guest_is_otherlinux: false expected_guest_id_suffix: "{{ expected_guest_id_suffix | replace('64', '_64') }}" - name: "Set expected guest id and full name for {{ vm_guest_os_distribution }}" From 83d8aefedb79560bceaa734db497d3694ecf9932 Mon Sep 17 00:00:00 2001 From: ZouYuhua Date: Wed, 15 Nov 2023 18:49:01 +0800 Subject: [PATCH 6/8] change code as codereview Signed-off-by: ZouYuhua --- linux/check_os_fullname/miracle_fullname_map.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/linux/check_os_fullname/miracle_fullname_map.yml b/linux/check_os_fullname/miracle_fullname_map.yml index 5b7ffcf16..415dcbd69 100644 --- a/linux/check_os_fullname/miracle_fullname_map.yml +++ b/linux/check_os_fullname/miracle_fullname_map.yml @@ -3,15 +3,15 @@ --- # Guest id "asianux8_64Guest" and full name "MIRACLE LINUX 8 (64-bit)" is available on ESXi 6.7P06 or later -- name: "Set fact of expected guest id on ESXi {{ esxi_version }}" - ansible.builtin.set_fact: - expected_guest_major_ver: "{{ [guest_os_ansible_distribution_major_ver | int, 8 ] | min }}" - - name: "Set facts when vmtools_version is larger than 12.3.5" when: - vmtools_version is defined - vmtools_version is version('12.3.5', '>') block: + - name: "Set fact of expected guest id on ESXi {{ esxi_version }}" + ansible.builtin.set_fact: + expected_guest_major_ver: "{{ [guest_os_ansible_distribution_major_ver | int, 8 ] | min }}" + - name: "Set fact of expected guest id suffix" ansible.builtin.set_fact: guest_is_otherlinux: false From 52b20981460a2e53223b5bc2a81b298d3b92ee28 Mon Sep 17 00:00:00 2001 From: ZouYuhua Date: Wed, 15 Nov 2023 21:52:19 +0800 Subject: [PATCH 7/8] change task name Signed-off-by: ZouYuhua --- linux/check_os_fullname/miracle_fullname_map.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/check_os_fullname/miracle_fullname_map.yml b/linux/check_os_fullname/miracle_fullname_map.yml index 415dcbd69..159be9bb0 100644 --- a/linux/check_os_fullname/miracle_fullname_map.yml +++ b/linux/check_os_fullname/miracle_fullname_map.yml @@ -8,7 +8,7 @@ - vmtools_version is defined - vmtools_version is version('12.3.5', '>') block: - - name: "Set fact of expected guest id on ESXi {{ esxi_version }}" + - name: "Set fact of expected guest OS major version on ESXi {{ esxi_version }}" ansible.builtin.set_fact: expected_guest_major_ver: "{{ [guest_os_ansible_distribution_major_ver | int, 8 ] | min }}" From f32e171a51a85f9fe167a4df309baab7e047dd36 Mon Sep 17 00:00:00 2001 From: ZouYuhua Date: Thu, 16 Nov 2023 09:40:47 +0800 Subject: [PATCH 8/8] modify readme to support miracle linux 9.x Signed-off-by: ZouYuhua --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 579fe6ac5..98175bd49 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,7 @@ This project supports below scenarios for end-to-end guest operating system vali | BCLinux-for-Euler 21.10 | :heavy_check_mark: | | :heavy_check_mark: | | Red Hat Enterprise Linux CoreOS (RHCOS) 4.13 and later | | :heavy_check_mark: | :heavy_check_mark: | | FusionOS 22 and 23 | :heavy_check_mark: | | :heavy_check_mark: | -| Miracle Linux 8.x | :heavy_check_mark: | | :heavy_check_mark: | +| Miracle Linux 8.x, 9.x | :heavy_check_mark: | | :heavy_check_mark: | **Notes** This compatible guest operating systems list is used for this project only. For guest operating system support status on ESXi, please refer to [VMware Compatibility Guide](https://www.vmware.com/resources/compatibility/search.php?deviceCategory=software&testConfig=16).