Skip to content

Commit 209f81a

Browse files
committed
enable NVMe spec 1.3 when it's not enabled by default
Signed-off-by: dw035535 <[email protected]>
1 parent 43be6d6 commit 209f81a

File tree

3 files changed

+29
-19
lines changed

3 files changed

+29
-19
lines changed

windows/vhba_hot_add_remove/nvme_vhba_device_ops_spec13.yml

+2-17
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@
1010
# https://techdocs.broadcom.com/us/en/vmware-cis/vsphere/vsphere/8-0/
1111
# release-notes/esxi-update-and-patch-release-notes/vsphere-esxi-802-release-notes.html
1212
# Default NVMe version 1.3 for Windows virtual machines:
13-
# Starting with vSphere 8.0 Update 2, the NVMe version of Windows Server 2022
14-
# or Windows 11 and later virtual machines with hardware version 21 and later,
15-
# and a virtual NVMe controller, is set to 1.3 by default.
13+
# Starting with vSphere 8.0 Update 2, the NVMe version is set to 1.3 by default for
14+
# Windows Server 2022 or Windows 11 and later VMs with hardware version 21 and later.
1615
# Set this test case result to "Not Applicable" in above situation.
1716
#
1817
- name: nvme_vhba_device_ops_spec13
@@ -47,20 +46,6 @@
4746
- guest_os_product_type == 'server'
4847
- guest_os_ansible_kernel is version('10.0.20348.0', '<')
4948

50-
- name: "Skip test case"
51-
include_tasks: ../../common/skip_test_case.yml
52-
vars:
53-
skip_msg: >-
54-
Skip testing on this guest OS '{{ guest_os_ansible_distribution }}' with VM hardware version
55-
'{{ vm_hardware_version_num }}', since NVMe version is 1.3 by default for Windows Server 2022,
56-
Windows 11 and later VMs with hardware version 21 on ESXi 8.0.2 and later.
57-
So skip this test case and only run test case 'nvme_vhba_device_ops' with default NVMe v1.3.
58-
skip_reason: "Not Applicable"
59-
when:
60-
- vm_hardware_version_num | int >= 21
61-
- (guest_os_product_type == 'server' and guest_os_build_num | int >= 20348) or
62-
(guest_os_product_type == 'client' and guest_os_build_num | int >= 22000)
63-
6449
- name: "Test run"
6550
include_tasks: vhba_test.yml
6651
vars:

windows/vhba_hot_add_remove/vhba_test.yml

+25
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,31 @@
66
# - lsilogic: no inbox driver in Windows guest OS now, so no testing.
77
# - buslogic: not supported in 64bit Windows guest OS, so no testing.
88
#
9+
- name: "Set fact of whether VM NVMe version 1.3 is enabled by default"
10+
ansible.builtin.set_fact:
11+
vm_nvme_spec13_enabled: >-
12+
{{
13+
vm_hardware_version_num | int >= 21 and
14+
((guest_os_product_type == 'server' and guest_os_build_num | int >= 20348) or
15+
(guest_os_product_type == 'client' and guest_os_build_num | int >= 22000))
16+
}}
17+
when:
18+
- test_disk_ctrl_type == 'nvme'
19+
- vm_nvme_spec13_enabled is undefined
20+
21+
- name: "Skip test case"
22+
include_tasks: ../../common/skip_test_case.yml
23+
vars:
24+
skip_msg: >-
25+
Skip testing on this guest OS '{{ guest_os_ansible_distribution }}' with VM hardware version
26+
'{{ vm_hardware_version_num }}', since NVMe version is 1.3 by default for Windows Server 2022,
27+
Windows 11 and later VMs with hardware version 21 on ESXi 8.0.2 and later.
28+
So skip this test case and only run test case 'nvme_vhba_device_ops' with default NVMe v1.3.
29+
skip_reason: "Not Applicable"
30+
when:
31+
- vm_nvme_spec13_enabled is defined and vm_nvme_spec13_enabled
32+
- test_purpose == "hot-add-spec13"
33+
934
- name: "Get VM current disk controller info"
1035
include_tasks: get_vm_disk_ctrl_info.yml
1136

windows/vhba_hot_add_remove/vhba_test_prepare.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
disk_controller_facts_data: "{{ disk_ctrls_before_hotadd }}"
1717
new_vhba_type: "{{ disk_controller }}"
1818

19-
- name: "Enable NVMe spec 1.3"
19+
- name: "Enable NVMe spec 1.3 for NVMe '{{ test_purpose }}' testing"
2020
include_tasks: enable_vm_nvme_spec13.yml
2121
when:
2222
- test_disk_ctrl_type == 'nvme'
23-
- test_purpose in ["hot-add-spec13", "hot-extend"]
23+
- test_purpose == "hot-add-spec13" or (test_purpose == "hot-extend" and not vm_nvme_spec13_enabled)

0 commit comments

Comments
 (0)