About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.
An encrypted VM shows as invalid in vCenter. A "Virtual Machine Locked" alarm sits on its Summary tab, and power-on fails. This usually follows a key server outage, a host rebuild, a vCenter restore or a move to another vCenter. The VM's data is still on the datastore. What is missing is the key that opens it. The order matters: make the key available first, then unlock. Unlocking before the key is back does nothing useful.
What the error means
The alarm text, from KB 443999:
Virtual machine <Virtual_Machine_Name> is locked. Before unlocking the virtual machine, manually recover the missing key(s) /<KEY_PROVIDER_NAME> to the key provider(s) <KEY_PROVIDER_NAME>.
From the ESXi Host Client, KB 412679 shows: "To unlock this virtual machine, you need the key with ID". KB 395883 shows: "A key with identifier 'Private Encryption Key' is required to unlock this virtual machine."
The vSphere 8.0 page "Resolve Missing Encryption Key Issues" explains the mechanism. The ESXi host needs the key encryption key (KEK) from vCenter Server. When it cannot get it, "you can still unregister or reload the virtual machine. However, you cannot perform other virtual machine operations such as powering on the virtual machine."
Two cases look different:
- "If the virtual machine key is not available, a vCenter Server alarm notifies you and the state of the virtual machine displays as invalid."
- "If the virtual machine key is available, but a key for an encrypted disk is not available, the virtual machine state does not display as invalid." Power-on then fails with
The disk [/path/to/the/disk.vmdk] is encrypted and a required key was not found.
A lost connection on its own does not lock a running VM. The same page: "Losing the connection to the key server does not automatically lock the virtual machine." Locking needs both of these: "The key is not available on the ESXi host" and "vCenter Server cannot retrieve keys from the key server."
Likely causes
| Cause | Sign | Source |
|---|---|---|
| vCenter lost its connection to the key server | Key provider not "Normal"; alarm and event log entry | TechDocs missing-key page; KB 395883 |
| Key no longer active on the key server | Event log error; key ID known but server will not supply it | TechDocs missing-key page |
| Native Key Provider missing after a vCenter restore | Host Client error names "Native Key Provider" | KB 412679 |
| VM moved to a vCenter with a different key provider | Invalid after re-registration in the new vCenter | KB 445599 |
| Old key provider decommissioned, VMs not re-keyed | Alarm names the provider whose key is missing | KB 443999 |
| Keys missing on one host only | Event: "Virtual machine is locked because keys are missing on host." | TechDocs missing-key page |
| HyTrust KMS with an HSM: the host reaches the KMS but cannot pull the keys (encrypted vSAN) | Hosts cannot enter Crypto Safe Mode; error "Manually recover the missing key to the key provider." | KB 435158 |
Prove the cause before changing anything
1. Read the VM's events. The vSphere 8.0 page "Unlock Locked Virtual Machines": "Navigate to the Monitor tab of the virtual machine and click Events. The Events pane displays information about why the virtual machine is locked." Note the provider name and any key ID shown.
2. Check the key provider status. KB 395883: "Verify the connectivity status of the configured Key Provider (NKP/KMS) in the vSphere Client (Configure > Security > Key Providers)." KB 435158 gives the good state: the connection status between vCenter or the hosts and the key provider should be "Normal". Bad, per KB 395883: "Disconnected" or "Missing". KB 395883 is direct about the order: "If the provider is showing as "Disconnected" or "Missing," resolve the network/certificate issue first."
3. Match each VM to its key provider. KB 443999 gives a read-only PowerCLI script, vm-to-kms-association.ps1. It lists "all registered KMS key providers for the connected vCenter Server and then list all applicable VMs and their associated KMS key provider as well as KeyID". The TechDocs page gives the same field in the API: "Retrieve the keyId from VirtualMachine.config.keyId.keyId." If the VM's provider ID is not among the registered providers, you are in the KB 445599 or KB 443999 case.
4. Test the network path to an external key server. KB 453198 (written for encrypted vSAN, vSAN 8.x/9.x) tests from an ESXi host with vmkping <KMS_IP_1> and nc -zv <KMS_IP_1> 5696. Port 5696 is the KMIP port named there. This test proves only the host-to-key-server path. For VM encryption through vCenter, the connection that matters is vCenter to the key server, so a pass from a host does not prove it. The vCenter-side check is the key provider status in step 2.
5. vTPM VMs. If unlock fails with "Unable to decrypt the ciphertext", see KB 391570. Its cause is that the .vmx "is encrypted with a key from a provider that is no longer registered with the vCenter Server". Its fix edits the .vmx by hand. Treat that as a support-led procedure.
Example (illustrative): a vCenter is restored from a file-based backup after a failed upgrade. The Native Key Provider was added after that backup was taken. The next morning a host is patched and rebooted, and three encrypted VMs on it will not power on. The Host Client error names the "Native Key Provider". Configure > Security > Key Providers shows no such provider. That matches KB 412679, so the fix is to restore the provider from its backup file, not to touch the VMs.
Fix
Make the key available first. Unlock second.
Connection to the key server lost. The TechDocs page: "Restore the connection to the key server. When the key server and keys become available, unlock the locked virtual machines." Fix the network or certificate trust that step 2 showed.
Key inactive or removed on the key server. "Ask the key server administrator to restore the key." Give them the key ID from step 3 and ask them "to reactivate the key that is associated with that key ID."
Native Key Provider missing. KB 412679: "Restore Native Key Provider via vSphere Client." KB 445599 uses Configure > Security > Key Provider and "[Restore] using the exported file". Risk: you need the provider's exported backup file. Without it, this route is closed. Protect the exported file: it is what recovers the keys.
KB 412679 adds: "You also need to check if ESXi host encryption mode is enabled." To check and enable it, the vSphere 8.0 page "Activate Host Encryption Mode Explicitly" gives these steps: in the vSphere Client, browse to the ESXi host, click Configure, under System click Security Profile, click Edit in the Host Encryption Mode panel, select Enabled and click OK. The privilege required is "Cryptographic operations.Register host". KB 425583: "Activating host encryption mode takes effect immediately. It is not necessary to power off virtual machines or reboot the ESXi host." If the mode was deactivated because keys or the provider were missing, the page "Resolve ESXi Host Encryption Mode Issues" says to restore the provider connection or keys first, then re-activate the mode.
Old key provider decommissioned (KB 443999). KB 443999 gives the alarm and the cause, "Not all Virtual Machines are re-keyed with the correct Key Provider", but no fix of its own. Make the old provider or its keys available first, as in "Key inactive or removed" above, and unlock the VM. Then re-key it to the provider you intend to keep, using the re-encrypt step in the vCenter-move fix below (KB 445599, "[VM Policies] -> [Re-encrypt]"). Risk: a re-encrypt changes the VM's keys. Do not decommission the old provider until every VM shows the new one in the PowerCLI association list.
VM moved between vCenter servers. KB 445599: "vCenter Server need to have the same Key Provider that originally used to encrypt the VM." For an external provider, "register the same Key Provider to vCenter Server B". For a Native Key Provider, back it up on the old vCenter and restore the exported file on the new one, both under Configure > Security > Key Provider. KB 445599 then sets the key provider for the cluster or sets it default. Risk: that changes which provider new encryption tasks use. Check the current default first so you can set it back.
vCenter itself was lost or rebuilt. The TechDocs page: "Restore the vCenter Server system, or set up a different vCenter Server system, then establish trust with the key server. You must use the same key provider name, but the key server IP address can be different. Reregister all virtual machines that are locked." Risk: re-registering removes each VM from the inventory and adds it back. The page does not say which inventory settings are kept, so note each VM's folder, resource pool and permissions before you start.
HyTrust KMS with an HSM (KB 435158, encrypted vSAN). KB 435158 covers hosts that cannot enter Crypto Safe Mode with the error "Manually recover the missing key to the key provider.", where the host reaches the KMS but the HSM behind the HyTrust KMS blocks the key. It applies to HyTrust with HSM integration only. Its fix: verify the key provider status is "Normal"; ask the HyTrust or security administration team to verify the health of the HSM; ensure the ESXi hosts are authorised in HyTrust to request the keys for the cluster; retry, and the hosts "will enter Crypto Safe Mode and any vSAN Disk-groups should mount". Then confirm that disk groups can be created and the locked disks are accessible. For any other key server, use the causes above.
Keys missing on one host only. "The vCenter Server system can retrieve the missing keys from the key provider. No manual recovery of keys is required."
Then unlock. "Unlock Locked Virtual Machines" needs the privilege "Cryptographic operations.RegisterVM". It warns: "Before unlocking a locked virtual machine, troubleshoot the cause of the lock and attempt to fix the problem manually." Then: "Select Unlock VM from the Actions drop-down menu on the right side." KB 445599 uses the API instead. Find the VM's moid in the vSphere Client URL (for .../VirtualMachine:vm-25:.../summary the moid is vm-25), open https://<ip_or_fqdn_of_vc>/mob/?moid=vm-<vmid> and sign in with an SSO administrator credential. Then "[CryptoUnlock_Task] -> [Invoke Method]". The KB then re-keys the VM: "[VM Policies] -> [Re-encrypt]". Disruptive step: a re-encrypt changes the VM's keys. Take it only after the VM opens and you have chosen the provider it should stay on.
Clearing the alarm is not a fix. "When you click either Acknowledge or Reset to green, the alarm goes away, but the virtual machine remains locked until you unlock it."
Do not rebuild the VM shell for an encrypted disk. KB 395883 describes removing the VM from inventory and attaching its disks to a new VM. Its own note: "Recreating the VMX and attaching the disks will only work if the vmdk is not encrypted." Risk: on an encrypted VM this removes the inventory object and leaves the key problem as it was.
Confirm the fix
- The key provider shows "Normal" in Configure > Security > Key Providers.
- The VM is no longer invalid, and the alarm does not return.
- The VM powers on, and each encrypted disk is readable in the guest.
- The PowerCLI association list shows every encrypted VM on a registered provider.
What to watch afterwards
- Key provider backups. A Native Key Provider is only recoverable from its exported file.
- Key persistence. The TechDocs page: "In vSphere 7.0 Update 2 and later, you can persist encryption keys across ESXi reboots."
- Boot order. "After each ESXi reboot, it is desirable, though not necessary, to have vCenter Server started first."
- Where the key server runs. KB 453198: "Never locate the KMS on the vSAN datastore it unlocks."
- Decommissioning providers. KB 443999's case followed a provider change where "Not all Virtual Machines are re-keyed with the correct Key Provider."
Read next
Related articles you may want next.
- VMwareAdding a vTPM to a VMware VM: Key Provider Requirements and What Changes AfterwardsBefore adding a vTPM to a vSphere VM: key provider, EFI, hardware version, privileges, and the effect on clones, cross-vCenter moves and restores.Read article
- VMwareESXi TPM recovery: a host backup is not the recovery keyInspect ESXi configuration encryption mode and distinguish host recovery-key custody from VM vTPM and guest recovery material before hardware maintenance.Read article
- Backup & RecoveryHow to back up and rehearse recovery of the vCenter applianceProtect vCenter configuration and prove a file-based recovery in a separate management lab.Read article
Risks and limits
- Rebooting hosts while keys are unavailable can make things worse. KB 453198, for encrypted vSAN: "Do not reboot ESXi hosts if encryption keys are unavailable. Keys can remain cached in memory after a KMS outage; rebooting destroys this cache and removes the remaining ability to access encrypted data."
- If the key cannot be recovered anywhere, the data stays locked. KB 453198: "A brand-new KMS installation containing no original keys will not decrypt existing vSAN data."
NetLeverage runs its own hosting on VMware vSphere, vCenter and ESXi. Talk to an engineer.
Sources
- Unlock Locked Virtual Machines — Broadcom TechDocs, vSphere 8.0, Last Updated October 28, 2026, accessed 17 November 2026
- Activate Host Encryption Mode Explicitly — Broadcom TechDocs, vSphere 8.0, Last Updated October 28, 2026, accessed 17 November 2026
- Resolve ESXi Host Encryption Mode Issues — Broadcom TechDocs, vSphere 8.0, Last Updated October 28, 2026, accessed 17 November 2026
- Resolve Missing Encryption Key Issues — Broadcom TechDocs, vSphere 8.0, Last Updated October 28, 2026, accessed 17 November 2026
- Virtual Machine Locked Alarm (KB 443999) — Broadcom, Updated On 06-11-2026, accessed 17 November 2026
- Power on a virtual machine from ESXi Host Client fails because an encryption key is missing (KB 412679) — Broadcom, Updated On 09-30-2026, accessed 17 November 2026
- Virtual Machine Locked Alarm after migrating encrypted VMs between vCenter Servers (KB 445599) — Broadcom, Updated On 06-28-2026, accessed 17 November 2026
- Error: "Failed to power on virtual machine. An encryption key is required" (KB 395883) — Broadcom, Updated On 08-25-2026, accessed 17 November 2026
- Virtual machine displays an "Invalid" state in vCenter Server and cannot be unlocked (KB 391570) — Broadcom, Updated On 06-11-2026, accessed 17 November 2026
- Impact of activating Host Encryption Mode (KB 425583) — Broadcom, Updated On 01-19-2026, accessed 17 November 2026
- ESXi hosts fail to enter Crypto Safe Mode due to Key Retrieval failures (KB 435158) — Broadcom, Updated On 03-31-2026, accessed 17 November 2026
- Recovering Encrypted vSAN Datastores from KMS Circular Dependencies (KB 453198) — Broadcom, Updated On 08-22-2026, accessed 17 November 2026
This article was originally published on .