Skip to content
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
15 changes: 15 additions & 0 deletions windows/guest_customization/win_gosc_verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,18 @@
include_tasks: check_runonce_command.yml
- name: "Check timezone configured"
include_tasks: check_timezone.yml
- name: "Get 'explorer.exe' process status"
include_tasks: ../utils/win_get_explorer_process.yml
- name: "Check 'explorer.exe' process status"
ansible.builtin.assert:
that:
- win_explorer_running
fail_msg: >
Failed to get process 'explorer.exe' in guest OS after GOSC, black screen issue may happen,
please check the screenshot or log files in the current test case log folder.
- name: "Take a screenshot after GOSC"
include_tasks: ../../common/vm_take_screenshot.yml
vars:
vm_screenshot_local_dir: "{{ current_test_log_folder }}"
vm_screenshot_local_name: "screenshot_after_gosc.png"
26 changes: 26 additions & 0 deletions windows/utils/win_get_explorer_process.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright 2025 VMware, Inc.
# SPDX-License-Identifier: BSD-2-Clause
---
# Description:
# Get process 'explorer.exe' in Windows guest OS to check
# if there is black screen issue occurs.
# Return:
# win_explorer_running: true or false. Whether the process
# 'explorer.exe' is running in guest OS.
#
- name: "Initialize the status of process 'explorer.exe'"
ansible.builtin.set_fact:
win_explorer_running: false

- name: "Get the status of process 'explorer.exe'"
include_tasks: win_execute_cmd.yml
vars:
win_powershell_cmd: "Get-Process -Name explorer"
win_execute_cmd_ignore_error: true

- name: "Set fact of the status of process 'explorer.exe'"
ansible.builtin.set_fact:
win_explorer_running: true
when:
- win_powershell_cmd_output.rc is defined
- win_powershell_cmd_output.rc == 0