Skip to content

[Windows] Set nvme_vhba_device_ops_spec13 "Not Applicable" on ESXi 8.0.2 and later #705

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion windows/vhba_hot_add_remove/nvme_vhba_device_ops_spec13.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,16 @@
---
# Description:
# This test case is used for check hotadd, hot remove disk
# on a new and existing NVMe controller with NVMe Spec 1.3 enabled.
# on a new and existing NVMe controller with NVMe Spec 1.3 enabled
# manually.
# Notes:
# Please refer to the release notes of ESXi 8.0.2:
# https://techdocs.broadcom.com/us/en/vmware-cis/vsphere/vsphere/8-0/
# release-notes/esxi-update-and-patch-release-notes/vsphere-esxi-802-release-notes.html
# Default NVMe version 1.3 for Windows virtual machines:
# Starting with vSphere 8.0 Update 2, the NVMe version is set to 1.3 by default for
# Windows Server 2022 or Windows 11 and later VMs with hardware version 21 and later.
# Set this test case result to "Not Applicable" in above situation.
#
- name: nvme_vhba_device_ops_spec13
hosts: localhost
Expand Down
26 changes: 26 additions & 0 deletions windows/vhba_hot_add_remove/vhba_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,32 @@
# - lsilogic: no inbox driver in Windows guest OS now, so no testing.
# - buslogic: not supported in 64bit Windows guest OS, so no testing.
#
- name: "Set fact of whether VM NVMe version 1.3 is enabled by default"
ansible.builtin.set_fact:
vm_nvme_spec13_enabled: >-
{{
vm_hardware_version_num | int >= 21 and
((guest_os_product_type == 'server' and guest_os_build_num | int >= 20348) or
(guest_os_product_type == 'client' and guest_os_build_num | int >= 22000))
}}
when:
- test_disk_ctrl_type == 'nvme'
- vm_nvme_spec13_enabled is undefined

- name: "Skip test case"
include_tasks: ../../common/skip_test_case.yml
vars:
skip_msg: >-
Skip testing on this guest OS '{{ guest_os_ansible_distribution }}' with VM hardware version
'{{ vm_hardware_version_num }}', since NVMe version is 1.3 by default for Windows Server 2022,
Windows 11 and later VMs with hardware version 21 on ESXi 8.0.2 and later.
So skip this test case and only run test case 'nvme_vhba_device_ops' with default NVMe v1.3.
skip_reason: "Not Applicable"
when:
- test_disk_ctrl_type == 'nvme'
- test_purpose == "hot-add-spec13"
- vm_nvme_spec13_enabled

- name: "Get VM current disk controller info"
include_tasks: get_vm_disk_ctrl_info.yml

Expand Down
4 changes: 2 additions & 2 deletions windows/vhba_hot_add_remove/vhba_test_prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
disk_controller_facts_data: "{{ disk_ctrls_before_hotadd }}"
new_vhba_type: "{{ disk_controller }}"

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