Skip to content

Improve Windows VM detection for VDI environments#164

Merged
jgowdy-godaddy merged 1 commit into
mainfrom
feat/improve-windows-vm-detection
May 22, 2026
Merged

Improve Windows VM detection for VDI environments#164
jgowdy-godaddy merged 1 commit into
mainfrom
feat/improve-windows-vm-detection

Conversation

@jgowdy-godaddy
Copy link
Copy Markdown
Contributor

Summary

  • Expand VM detection to catch Hyper-V-based VDI environments (CyberArk, Citrix) that don't report standard VM manufacturer strings in registry
  • Add Hyper-V guest integration services registry key as a detection signal (catches all Hyper-V guests including non-standard VDI)
  • Add disk device name check, expanded BIOS/baseboard registry checks, and new VM string signals (cyberark, seabios, proxmox, openstack, oracle vm)
  • Expose VmDiagnostics struct and collect_vm_diagnostics() public API for consumer-side diagnostic logging

Test plan

  • All existing tests pass (49 tests in enclaveapp-windows)
  • New tests for added string signals, RAID false-positive rejection, and diagnostics API
  • Clippy clean, fmt clean
  • Windows integration: verify on a Hyper-V VM that hyperv_guest_parameters_exist() returns true
  • Verify on a physical VBS machine that detection still returns false

Expand VM detection to catch VDI environments (CyberArk, Citrix on
Hyper-V) that don't present standard VM manufacturer strings:

- Add Hyper-V guest integration services registry key check
  (SOFTWARE\Microsoft\Virtual Machine\Guest\Parameters). Present on
  all Hyper-V guests but NOT on physical VBS hosts.
- Add disk device name check (Services\Disk\Enum\0) for VM-specific
  disk controller strings.
- Expand registry checks to include BIOSVersion, SystemVersion,
  BaseBoardManufacturer, and BaseBoardProduct.
- Add VM string signals: cyberark, seabios, proxmox, openstack,
  oracle vm.
- New detection path: Microsoft Hv CPUID + guest integration services
  = Hyper-V VDI (catches non-standard manufacturers).

Expose VmDiagnostics struct and collect_vm_diagnostics() public function
so consuming applications can log raw system signals for debugging
unrecognized VM environments.

Refactor internal detection into collect_vm_diagnostics_windows() which
collects all data and decides in one pass, eliminating the old
VmDetection/detect_vm() indirection.
@jgowdy-godaddy jgowdy-godaddy merged commit 1842663 into main May 22, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant