Skip to content

Commit db7823e

Browse files
committed
Update virtual-shielded-host-guardian-service.md
1 parent ddf350a commit db7823e

1 file changed

Lines changed: 95 additions & 75 deletions

File tree

support/windows-server/virtualization/virtual-shielded-host-guardian-service.md

Lines changed: 95 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Troubleshoot VTPM, Shielded VM, and Host Guardian Service Issues
3-
description: Helps troubleshoot Virtual TPM (vTPM), shielded VM, and Host Guardian Service (HGS) issues in Hyper-V clusters.
2+
title: Troubleshoot Virtual TPM, Shielded VM, and Host Guardian Service Issues
3+
description: Helps troubleshoot Virtual TPM (vTPM), shielded virtual machine (VM), and Host Guardian Service (HGS) issues in Hyper-V clusters.
44
ms.date: 08/06/2025
55
manager: dcscontentpm
66
audience: itpro
@@ -11,127 +11,146 @@ ms.custom:
1111
- pcy:WinComm Storage High Avail
1212
ai-usage: ai-assisted
1313
---
14-
# Troubleshooting Virtual TPM (vTPM), Shielded VM, and Host Guardian Service (HGS) Issues in Hyper-V Clusters
14+
# Troubleshoot vTPM, shielded VM, and HGS issues in Hyper-V clusters
1515

16-
Virtual TPM (vTPM), Shielded VM, and Host Guardian Service (HGS) are vital features in Hyper-V clusters, especially for ensuring secure virtual environments and compliance with modern operating system requirements, such as Windows 11. However, issues with these features can arise due to misconfigurations, hardware or firmware incompatibilities, or software errors. These problems may impact VM startup, migration, or security configuration, causing significant disruptions. This guide consolidates common scenarios, their causes, and resolutions to help restore secure VM operations efficiently.
16+
This guide provides a structured approach to resolving issues with Virtual TPM (vTPM), shielded virtual machine (VM), and Host Guardian Service (HGS) in Hyper-V clusters. Always test changes in a nonproduction environment and maintain backups before implementing solutions. For unresolved issues, consult your hardware vendor or Microsoft support.
1717

18-
## Symptoms
18+
VTPM, shielded VM, and HGS are vital features in Hyper-V clusters, especially for ensuring secure virtual environments and compliance with modern operating system requirements, such as Windows 11. However, issues with these features can arise due to misconfigurations, hardware or firmware incompatibilities, or software errors. These problems might impact VM startup, migration, or security configuration, causing significant disruptions. This guide consolidates common scenarios, their causes, and resolutions to help restore secure VM operations efficiently.
1919

20-
### End-user and technical symptoms
20+
## End-user and technical symptoms
2121

22-
- Virtual machines (VMs) with vTPM enabled fail to start or migrate between cluster nodes.
23-
- VMs remain operational only on their original host and cannot fail over.
24-
- Shielded VMs cannot start, migrate, or fail over.
22+
- VMs with vTPM enabled fail to start or migrate between cluster nodes.
23+
- VMs remain operational only on their original host and can't fail over.
24+
- Shielded VMs can't start, migrate, or fail over.
2525
- Shield icons persist in management tools even after disabling shielding.
26-
- Attestation or key unwrap operations fail when using HGS with HTTPS.
26+
- Attestation or key unwrap operations fail when using HGS over HTTPS.
2727
- VMs disappear from the cluster or management tools after cluster-aware updating or patching.
2828
- BitLocker enablement fails, or device encryption reports as unsupported.
2929
- HGS attestation fails on all or some guarded hosts.
3030
- VMs fail to start after enabling TPM or upgrading the operating system.
3131
- Expanding the HGS cluster with nodes of differing hardware models fails.
3232
- Device encryption support reports errors such as "Feature is not available," "winre is not configured," or "hardware security test interface failed."
3333

34-
### Specific error messages and event IDs
34+
## Specific error messages and event IDs
3535

36-
- "Key protector could not be unwrapped."
37-
- "HGS cannot be an owner because it does not have private keys."
38-
- "Local security policy for virtual machine could not be generated automatically." (Error Code: 0x80131500)
39-
- "The computed authentication tag did not match the input authentication tag." (Error Code: 0xC000A002)
40-
- "The virtual machine doesn’t have a key protector, and the key protector can’t be added automatically in a guarded fabric."
41-
- "Invoke-CimMethod : [Function Name] failed using algorithm: Rsa." (HRESULT: 0x80131500)
42-
- Event ID 2014, Microsoft-Windows-HostGuardianService-Client/Admin.
43-
- Event ID 57, CertificateServicesClient-CertEnroll, and Event ID 11, Microsoft-Windows-CAPI2/Operational.
36+
- > Key protector could not be unwrapped.
37+
- > HGS cannot be an owner because it does not have private keys.
38+
- > Local security policy for virtual machine could not be generated automatically.
39+
40+
Error code: 0x80131500
41+
- > The computed authentication tag did not match the input authentication tag.
42+
43+
Error code: 0xC000A002
44+
- > The virtual machine doesn't have a key protector, and the key protector can't be added automatically in a guarded fabric.
45+
- > Invoke-CimMethod: [Function Name] failed using algorithm: Rsa.
46+
47+
HRESULT: 0x80131500
48+
- Event ID 2014, `Microsoft-Windows-HostGuardianService-Client/Admin`.
49+
- Event ID 57, `CertificateServicesClient-CertEnroll`, and Event ID 11, `Microsoft-Windows-CAPI2/Operational`.
4450
- "TransientError Host Unreachable" during HGS attestation/key unwrap.
4551
- "HasPrivateSigningKey = False" after guardian import.
4652
- Cluster logs showing "Catastrophic failure (0x8000FFFF)."
4753

48-
## Cause
54+
## Cause 1. Certificate and key protector issues
4955

50-
### 1. Certificate and key protector issues
56+
- Missing or mismatched certificates: vTPM and shielded VMs require signing and encryption certificates. Problems arise if certificates are missing or improperly restored during migration or export/import processes.
57+
- Untrusted or broken key protectors/guardians: Guardian misconfigurations or missing private keys can block VM operations.
58+
- Deleted or unrestored certificates: Shielded VM certificates that are accidentally deleted or not restored render VMs nonoperational.
59+
- Certificate Subject Alternative Name (SAN) or trust issues: HGS over HTTPS fails if certificates lack required SANs or if there are trust issues.
5160

52-
- **Missing or mismatched certificates**: vTPM and shielded VMs require signing and encryption certificates. Problems arise if certificates are missing or improperly restored during migration or export/import processes.
53-
- **Untrusted or broken key protectors/guardians**: Guardian misconfigurations or missing private keys can block VM operations.
54-
- **Deleted or unrestored certificates**: Shielded VM certificates that are accidentally deleted or not restored render VMs non-operational.
55-
- **Certificate SAN or trust issues**: HGS over HTTPS fails if certificates lack required Subject Alternative Names (SANs) or if there are trust issues.
61+
## Cause 2. TPM, hardware, driver, and firmware incompatibilities
5662

57-
### 2. TPM, hardware, driver, and firmware incompatibilities
63+
- TPM model or firmware incompatibility: Earlier TPM models, such as HPE Gen9/Gen10, might lack support for required algorithms like RSAPSS.
64+
- Outdated storage drivers/firmware: Encryption features often require updated drivers and firmware.
65+
- Central processing unit (CPU) compatibility issues: Live migration might fail if CPU compatibility isn't configured across cluster nodes.
5866

59-
- **TPM model or firmware incompatibility**: Older TPM models, such as HPE Gen9/Gen10, may lack support for required algorithms like RSAPSS.
60-
- **Outdated storage drivers/firmware**: Encryption features often require updated drivers and firmware.
61-
- **CPU compatibility issues**: Live migration may fail if CPU compatibility is not configured across cluster nodes.
67+
## Cause 3. Configuration and script errors
6268

63-
### 3. Configuration and script errors
69+
- Improper PowerShell script usage: Errors in automation scripts for enabling vTPM or shielded VM features can create issues.
70+
- Misconfiguration in HGS or cluster setup: Problems occur when required Windows features aren't enabled, or HGS registration is incorrect.
71+
- Mixing management tools: Concurrent modifications using tools like System Center Virtual Machine Manager (SCVMM), Failover Cluster Manager, and PowerShell can corrupt VM configurations.
6472

65-
- **Improper PowerShell script usage**: Errors in automation scripts for enabling vTPM or Shielded VM features can create issues.
66-
- **Misconfiguration in HGS or cluster setup**: Problems occur when required Windows features are not enabled, or HGS registration is incorrect.
67-
- **Mixing management tools**: Concurrent modifications using tools like System Center Virtual Machine Manager (SCVMM), Failover Cluster Manager, and PowerShell can corrupt VM configurations.
73+
## Cause 4. File system and cluster configuration corruption
6874

69-
### 4. File system and cluster configuration corruption
75+
- Corrupted `.vmcx` (VM configuration) files: Cluster-aware updating (CAU) or failovers might corrupt VM configuration files.
76+
- Guarded fabric/cluster node inconsistencies: Shielded VMs must be hosted on the same guarded fabric to function correctly.
7077

71-
- **Corrupted .vmcx (VM configuration) files**: Cluster-aware updating (CAU) or failovers may corrupt VM configuration files.
72-
- **Guarded fabric/cluster node inconsistencies**: Shielded VMs must be hosted on the same guarded fabric to function correctly.
78+
## Cause 5. Networking and security protocol issues
7379

74-
### 5. Networking and security protocol issues
80+
- Networking changes/disruptions: Network reconfigurations can temporarily interrupt HGS attestation.
81+
- TLS/protocol mismatches: HGS might default to older TLS versions, and disabling TLS 1.0 without enabling TLS 1.2 can cause failures.
7582

76-
- **Networking changes/disruptions**: Network reconfigurations can temporarily interrupt HGS attestation.
77-
- **TLS/protocol mismatches**: HGS may default to older TLS versions, and disabling TLS 1.0 without enabling TLS 1.2 can cause failures.
83+
## Cause 6. Supportability and documentation gaps
7884

79-
### 6. Supportability and documentation gaps
85+
- Unsupported HGS cluster expansion: Adding nodes with differing hardware models to an HGS cluster is unsupported.
86+
- Documentation gaps: Lack of guidance for certain PowerShell or WMI methods can lead to configuration errors.
8087

81-
- **Unsupported HGS cluster expansion**: Adding nodes with differing hardware models to an HGS cluster is unsupported.
82-
- **Documentation gaps**: Lack of guidance for certain PowerShell or WMI methods can lead to configuration errors.
88+
## Resolution 1. Certificate and key protector resolution
8389

84-
## Resolution
90+
1. Export and import certificates with private keys:
8591

86-
### A. Certificate and key protector resolution
92+
- Export certificates from the source host using **certlm.msc** or PowerShell:
8793

88-
1. **Export and import certificates with private keys**: - Export certificates from the source host using certlm.msc or PowerShell:
94+
```powershell
95+
Export-PfxCertificate -Cert (Get-ChildItem -Path Cert:\LocalMachine\My<thumbprint>) -FilePath C:\path\to\export.pfx -Password (ConvertTo-SecureString -String '' -AsPlainText -Force)
96+
```
8997
90-
Export-PfxCertificate -Cert (Get-ChildItem -Path Cert:\LocalMachine\My<thumbprint>) -FilePath C:\path\to\export.pfx -Password (ConvertTo-SecureString -String '' -AsPlainText -Force)
9198
- Import certificates on the destination host:
9299
100+
```powershell
93101
Import-PfxCertificate -FilePath C:\path\to\export.pfx -CertStoreLocation Cert:\LocalMachine\My -Password (ConvertTo-SecureString -String '' -AsPlainText -Force)
94-
2. **Regenerate key protectors**:
102+
```
95103
104+
2. Regenerate key protectors:
105+
106+
```powershell
96107
$Owner = Get-HgsGuardian -Name "UntrustedGuardian"
97-
$KP = New-HgsKeyProtector -Owner $Owner -AllowUntrustedRoot
98-
Set-VMKeyProtector -VMName -KeyProtector $KP.RawData
99-
Enable-VMTPM -VMName
100-
3. **Update signing and encryption certificates**:Use Set-VMKeyProtector to assign the correct certificates.
101-
4. **Resolve missing certificates**:Create a new VM using the original VHDX file and configure vTPM and key protector.
108+
$KP = New-HgsKeyProtector -Owner $Owner -AllowUntrustedRoot
109+
Set-VMKeyProtector -VMName -KeyProtector $KP.RawData
110+
Enable-VMTPM -VMName
111+
```
112+
113+
3. Update signing and encryption certificates: Use `Set-VMKeyProtector` to assign the correct certificates.
114+
4. Resolve missing certificates: Create a new VM using the original VHDX file and configure vTPM and key protector.
102115
103-
### B. Firmware, driver, and hardware remediation
116+
## Resolution 2. Firmware, driver, and hardware remediation
104117
105-
1. **Update storage and TPM firmware**:Work with hardware vendors to apply the latest updates.
106-
2. **Check TPM support for required algorithms**:
107-
Verify RSAPSS support using:
118+
1. Update storage and TPM firmware: Work with hardware vendors to apply the latest updates.
119+
2. Check TPM support for required algorithms:
108120
121+
Verify RSAPSS support using:
122+
123+
```powershell
109124
Get-WmiObject -Namespace "Root\CIMV2\Security\MicrosoftTpm" -Class Win32_Tpm
125+
```
110126
111-
### C. Configuration, script, and management fixes
127+
## Resolution 3. Configuration, script, and management fixes
112128
113-
1. **Correct PowerShell scripts**:Ensure scripts appropriately handle vTPM enabling and verification.
114-
2. **Fix VM configuration corruption**:Recreate VM shells with existing VHDX files and reassign key protectors.
115-
3. **Enable required Windows features**:
129+
1. Correct PowerShell scripts: Ensure scripts appropriately handle vTPM enabling and verification.
130+
2. Fix VM configuration corruption: Recreate VM shells with existing VHDX files and reassign key protectors.
131+
3. Enable required Windows features:
116132
133+
```powershell
117134
Enable-WindowsOptionalFeature -Online -FeatureName IsolatedUserMode
118-
4. **Maintain guarded fabric consistency**:Import VMs onto hosts within the same guarded fabric.
135+
```
136+
137+
4. Maintain guarded fabric consistency: Import VMs onto hosts within the same guarded fabric.
119138
120-
### D. HGS attestation, protocol, and networking steps
139+
## Resolution 4. Permissions, registry, and file system checks
121140
122-
1. **Configure TLS protocols**:Update registry settings to enable TLS 1.2 and disable TLS 1.0.
123-
2. **Resolve HTTPS certificate issues**:Ensure certificates include required SANs for all nodes.
124-
3. **Troubleshoot attestation failures**:Test network connectivity using Test-NetConnection.
141+
1. Check file and folder permissions: Verify access rights for VM configurations and VHDX files.
142+
2. Validate registry settings: Confirm settings for virtualization-based security, TPM, and HGS.
125143
126-
### E. Permissions, registry, and file system checks
144+
## Resolution 5. HGS attestation, protocol, and networking steps
127145
128-
1. **Check file and folder permissions**:Verify access rights for VM configurations and VHDX files.
129-
2. **Validate registry settings**:Confirm settings for virtualization-based security, TPM, and HGS.
146+
1. Configure TLS protocols: Update registry settings to enable TLS 1.2 and disable TLS 1.0.
147+
2. Resolve HTTPS certificate issues: Ensure certificates include required SANs for all nodes.
148+
3. Troubleshoot attestation failures: Test network connectivity using `Test-NetConnection`.
130149
131-
### F. Best practices and documentation
150+
## Resolution 6. Best practices and documentation
132151
133-
1. **HGS cluster expansion**:Add only identical hardware nodes to HGS clusters.
134-
2. **Shielding existing VMs**:Use WMI’s PrepareSpecializedMachine method to shield VMs.
152+
1. HGS cluster expansion: Add only identical hardware nodes to HGS clusters.
153+
2. Shielding existing VMs: Use WMI's `PrepareSpecializedMachine` method to shield VMs.
135154
136155
## Data collection
137156
@@ -140,12 +159,13 @@ To gather data for troubleshooting:
140159
- Collect logs via Event Viewer (Application, System, CAPI2, HostGuardianService-Client).
141160
- Generate cluster logs:
142161
162+
```powershell
143163
Get-ClusterLog -Destination
144-
- Use network diagnostic tools like Test-NetConnection and Wireshark.
164+
```
165+
166+
- Use network diagnostic tools like `Test-NetConnection` and Wireshark.
145167
146168
## References
147169
148-
- [PrepareSpecializedMachine Method](https://learn.microsoft.com/en-us/previous-versions/windows/desktop/mspsserviceprov/msps-provisioningservice-preparespecializedmachine)
170+
- [PrepareSpecializedMachine Method](/previous-versions/windows/desktop/mspsserviceprov/msps-provisioningservice-preparespecializedmachine)
149171
- Hyper-V and HGS official documentation on configuration and troubleshooting.
150-
151-
This guide provides a structured approach to resolving issues with vTPM, Shielded VM, and HGS in Hyper-V clusters. Always test changes in a non-production environment and maintain backups before implementing solutions. For unresolved issues, consult your hardware vendor or Microsoft support.

0 commit comments

Comments
 (0)