How to collect information from Windows Guests to troubleshoot issues?
Environment
- Red Hat Enterprise Linux 9, 10
- Red Hat OpenShift Container Platform 4.x
- OpenShift Virtualization 4.x
- Microsoft Windows
Issue
- How to collect details from Windows Guests to troubleshoot Virtualization related issues?
- How to provide Red Hat information about Windows Guests?
Resolution
Note: the recommendations regarding obtaining support for Windows Guests and some known issues affecting Windows are described in Recommendations and known issues when investigating Windows BSOD issues.
1. Insert the latest virtio-win CD-ROM image into the Guest
OpenShift Virtualization
See the steps in Documentation - 10.2.2.2. Attaching VirtIO container disk to an existing Windows VM or use the YAML below:
apiVersion: kubevirt.io/v1
kind: VirtualMachine
spec:
template:
spec:
domain:
devices:
disks:
- cdrom:
bus: sata
name: windows-drivers-disk
volumes:
- containerDisk:
image: 'registry.redhat.io/container-native-virtualization/virtio-win-rhel9:latest'
name: windows-drivers-disk
Red Hat Enterprise Linux (KVM)
Refer to Documentation - 4.1.2. Preparing virtio driver installation media on a host machine
2. Boot the Guest and Login
3. Open PowerShell as an Administrator
4. Ensure the script runs with an unrestricted execution policy (for Windows 10+ and Windows Server 2016+):
PS C:\WINDOWS\system32> Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope Process -Force
5. Find the virtio-win disk drive letter (FriendlyName is virtio-win-
PS C:\WINDOWS\system32> Get-Volume | Select-Object DriveLetter, FriendlyName
6. Enter the directory where the information is to be stored (i.e. C:\DebugInfo)
PS C:\WINDOWS\system32> mkdir C:\DebugInfo
PS C:\WINDOWS\system32> cd C:\DebugInfo
PS C:\DebugInfo>
7. Call the data collection script using the drive letter from step 5, for example using D: drive letter
PS C:\DebugInfo> D:\tools\debug\CollectSystemInfo.ps1 -IncludeSensitiveData
NOTE: -IncludeSensitiveData: Optional switch to include memory dumps in the collection (use with caution).
8. A folder named SystemInfo_<DATE>_<TIME> is created, compress, collect it and upload to Red Hat for analysis.
Root Cause
-
Uploading detailed Windows data to Red Hat can assist in diagnosing and resolving issues. The following data is collected:
- msinfo32.txt: Detailed hardware and software configuration report.
- system.evtx, security.evtx, application.evtx: System, Security, and Application event logs.
- drv_list.csv: List of all installed drivers.
- virtio_disk.txt: Specific configuration details for Virtio-Win storage drivers.
- WindowsUpdate.log: Detailed logs of Windows Update activity.
- Services.csv: List of services and their status.
- WindowsUptime.txt: Duration since the last system boot.
- RunningProcesses.csv: Snapshot of active processes.
- InstalledApplications.csv: List of installed applications.
- InstalledKBs.csv: List of installed Windows updates.
- NetworkInterfaces.txt and IPConfiguration.txt: Network configuration details.
- setupapi*.log: Logs related to device and driver installations.
- MEMORY.DMP and Minidump folder: Full or mini memory dumps (if -IncludeSensitiveData is used).
- Collecting_Status.txt: Generated during data collection and deleted after completion. If the script is interrupted, this file indicates incomplete data collection.
- IO Limits (since RHEL 10.1, This content is not included.RHEL-50142)
-
For up to date or extra information, please refer to the README.md file in the CD-ROM image, or to latest Content from github.com is not included.upstream virtio-win README.md.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.