[GH-ISSUE #11859] Add VM masking options to Home Assistant OS installation script #2495

Closed
opened 2026-02-26 12:52:38 +03:00 by kerem · 1 comment
Owner

Originally created by @heinrich-gif on GitHub (Feb 12, 2026).
Original GitHub issue: https://github.com/community-scripts/ProxmoxVE/issues/11859

Originally assigned to: @MickLesk on GitHub.

🌟 Briefly describe the feature

Add VM masking options to Home Assistant OS installation script

📝 Detailed description

Problem Statement
Some Home Assistant integrations detect when running inside a virtual machine and disable certain features like Grid Search optimization. The integration checks CPU flags and DMI information to identify virtualization.
Currently, the HAOS helper script (haos-vm.sh) creates a VM with default settings that are easily detectable as virtual:

Hypervisor CPU flag exposed in /proc/cpuinfo
QEMU vendor strings in DMI (/sys/class/dmi/id/sys_vendor shows "QEMU")
Default SMBIOS information reveals VM status

Proposed Solution
Add optional VM masking configuration to the Home Assistant OS installation script. This would apply proven Proxmox techniques to hide virtualization from the guest OS:

  1. CPU Masking via args:
    bashargs: -cpu host,-hypervisor,kvm=off
  2. SMBIOS Customization:
    bashsmbios1: uuid=,manufacturer=ASRock,product=Desktop,version=1
  3. Disable QEMU Guest Agent (optional):
    bashagent: 0

### **Implementation Suggestion**

Add an interactive prompt during installation:

Would you like to mask VM detection? (Recommended for integrations)
[Y/n]
If yes, apply the above configurations to /etc/pve/qemu-server/.conf.
Benefits

Enables advanced features in HA integrations that refuse to run in VMs
No performance impact (unlike kvm=off alone, the -hypervisor flag only masks detection)
Maintains compatibility - no changes for users who don't need this
Uses well-documented Proxmox techniques (see references below)

References
Multiple Proxmox Forum threads confirm this approach works:

https://forum.proxmox.com/threads/cant-hide-vm-status-in-windows-guest.96779/
https://forum.proxmox.com/threads/hide-virtualization.170034/
https://forum.proxmox.com/threads/confusing-about-kvm-off-and-cpu-hidden-1.91285/

Testing
Tested successfully on:

Proxmox VE 9.2.0
Home Assistant OS (latest)

Verification commands:
bashcat /sys/class/dmi/id/sys_vendor # Should show custom value instead of "QEMU"
cat /proc/cpuinfo | grep hypervisor # Hypervisor flag should be absent
Additional Notes

💡 Why is this useful?

This is purely cosmetic virtualization masking - no actual hardware changes. The VM remains a VM, but certain software checks are bypassed. This is commonly used for:

Anti-cheat software (gaming VMs)
NVIDIA GPU passthrough
Software with unnecessary VM restrictions

Would appreciate feedback from the maintainers on the best way to integrate this!

Originally created by @heinrich-gif on GitHub (Feb 12, 2026). Original GitHub issue: https://github.com/community-scripts/ProxmoxVE/issues/11859 Originally assigned to: @MickLesk on GitHub. ### 🌟 Briefly describe the feature Add VM masking options to Home Assistant OS installation script ### 📝 Detailed description Problem Statement Some Home Assistant integrations detect when running inside a virtual machine and disable certain features like Grid Search optimization. The integration checks CPU flags and DMI information to identify virtualization. Currently, the HAOS helper script (haos-vm.sh) creates a VM with default settings that are easily detectable as virtual: Hypervisor CPU flag exposed in /proc/cpuinfo QEMU vendor strings in DMI (/sys/class/dmi/id/sys_vendor shows "QEMU") Default SMBIOS information reveals VM status Proposed Solution Add optional VM masking configuration to the Home Assistant OS installation script. This would apply proven Proxmox techniques to hide virtualization from the guest OS: 1. CPU Masking via args: bashargs: -cpu host,-hypervisor,kvm=off 2. SMBIOS Customization: bashsmbios1: uuid=<generated-uuid>,manufacturer=ASRock,product=Desktop,version=1 3. Disable QEMU Guest Agent (optional): bashagent: 0 ``` ### **Implementation Suggestion** Add an interactive prompt during installation: ``` Would you like to mask VM detection? (Recommended for integrations) [Y/n] If yes, apply the above configurations to /etc/pve/qemu-server/<vmid>.conf. Benefits Enables advanced features in HA integrations that refuse to run in VMs No performance impact (unlike kvm=off alone, the -hypervisor flag only masks detection) Maintains compatibility - no changes for users who don't need this Uses well-documented Proxmox techniques (see references below) References Multiple Proxmox Forum threads confirm this approach works: https://forum.proxmox.com/threads/cant-hide-vm-status-in-windows-guest.96779/ https://forum.proxmox.com/threads/hide-virtualization.170034/ https://forum.proxmox.com/threads/confusing-about-kvm-off-and-cpu-hidden-1.91285/ Testing Tested successfully on: Proxmox VE 9.2.0 Home Assistant OS (latest) Verification commands: bashcat /sys/class/dmi/id/sys_vendor # Should show custom value instead of "QEMU" cat /proc/cpuinfo | grep hypervisor # Hypervisor flag should be absent Additional Notes ### 💡 Why is this useful? This is purely cosmetic virtualization masking - no actual hardware changes. The VM remains a VM, but certain software checks are bypassed. This is commonly used for: Anti-cheat software (gaming VMs) NVIDIA GPU passthrough Software with unnecessary VM restrictions Would appreciate feedback from the maintainers on the best way to integrate this!
kerem 2026-02-26 12:52:38 +03:00
Author
Owner

@MickLesk commented on GitHub (Feb 20, 2026):

Thanks for the detailed request, but I don't think this is the right approach.

Home Assistant OS officially supports running in VMs, including Proxmox. If a specific integration detects virtualization and disables features because of it, that's a bug in the integration itself - not something we should work around in our installation script.

Why I'm hesitant to add this:

  • VM masking adds complexity and maintenance burden for what seems like an edge case
  • It hides virtualization from all software running in the VM, not just the problematic integration
  • SMBIOS/CPU flag masking is typically used for anti-cheat software or GPU passthrough scenarios - not for legitimate Home Assistant integrations
  • The proper fix belongs upstream in the integration that's incorrectly restricting features

What you can do:

  1. Open an issue in the repository of the integration that's causing this problem - the maintainers should update their VM detection logic since HA officially supports virtualized environments
  2. If you need an immediate workaround, you can manually add these lines to your VM config (/etc/pve/qemu-server/<VMID>.conf):
smbios1: manufacturer=ASRock,product=Desktop,version=1.0

This way you get your workaround without us adding complexity to the script for a problem that should really be fixed at the source.

Which integration is causing this issue? Maybe we can help point you to the right place to report it.

<!-- gh-comment-id:3937361171 --> @MickLesk commented on GitHub (Feb 20, 2026): Thanks for the detailed request, but I don't think this is the right approach. Home Assistant OS officially supports running in VMs, including Proxmox. If a specific integration detects virtualization and disables features because of it, **that's a bug in the integration itself** - not something we should work around in our installation script. **Why I'm hesitant to add this:** - VM masking adds complexity and maintenance burden for what seems like an edge case - It hides virtualization from *all* software running in the VM, not just the problematic integration - SMBIOS/CPU flag masking is typically used for anti-cheat software or GPU passthrough scenarios - not for legitimate Home Assistant integrations - The proper fix belongs upstream in the integration that's incorrectly restricting features **What you can do:** 1. Open an issue in the repository of the integration that's causing this problem - the maintainers should update their VM detection logic since HA officially supports virtualized environments 2. If you need an immediate workaround, you can manually add these lines to your VM config (`/etc/pve/qemu-server/<VMID>.conf`): ```args: -cpu host,-hypervisor,kvm=off smbios1: manufacturer=ASRock,product=Desktop,version=1.0 ``` This way you get your workaround without us adding complexity to the script for a problem that should really be fixed at the source. Which integration is causing this issue? Maybe we can help point you to the right place to report it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ProxmoxVE#2495
No description provided.