Error: "Failed to power on virtual machine. An encryption key is required"
search cancel

Error: "Failed to power on virtual machine. An encryption key is required"

book

Article ID: 395883

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

  • Virtual machines (VMs) may display as Invalid or Inaccessible in the vCenter Server inventory. Attempts to power on the VM fail with the error: A key with identifier 'Private Encryption Key' is required to unlock this virtual machine. 
  • This issue typically occurs after host re-installation, vCenter migration, or IP configuration changes that impact Key Management Server (KMS) or Native Key Provider (NKP) connectivity.

Environment

  • vCenter Server 7.x, 8.x, 9.x

Cause

  • The VM configuration metadata is either corrupted, locked, or failing to communicate with the Key Provider that holds the Key Encryption Key (KEK). During migrations or IP changes, the host or vCenter may lose the cryptographic context required to decrypt the VM's configuration file (.vmx).

Resolution

Prerequisites Before proceeding, perform the following diagnostic steps:

  1. Verify the connectivity status of the configured Key Provider (NKP/KMS) in the vSphere Client (Configure > Security > Key Providers).
  2. If the provider is showing as "Disconnected" or "Missing," resolve the network/certificate issue first. Rebuilding the VM configuration shell (below) will not resolve an encryption key synchronization issue.
  3. Ensure the VM is not currently locked by a host-level task.

Rebuild the virtual machine configuration shell to refresh the metadata and re-establish access to the virtual disks.

  1. Identify the datastore path for the affected virtual machine's virtual disks (.vmdk).
  2. Right-click the Invalid VM in the inventory and select Remove from Inventory.
  3. Navigate to the host or cluster, right-click, and select New Virtual Machine.
  4. Select Create a new virtual machine and follow the wizard to match the original CPU, Memory, and Network settings.
  5. In the Customize Hardware section, remove the default new hard disk.
  6. Select Add New Device > Existing Hard Disk.
  7. Navigate to the original datastore folder and select the existing .vmdk files.
  8. Complete the wizard and power on the VM.

Note: This procedure assumes the VM disk is not permanently locked by a missing key. If the VM remains locked, verify the Key Provider backup (.p12) is valid.

Best Practices for Renaming To ensure underlying datastore files (.vmx, .vmdk) match the new VM name for long-term manageability:

  1. Storage vMotion: If the vCenter license supports Storage vMotion and at least two datastores are available, vSphere can perform the renaming automatically.
  2. Clone the VM: If Storage vMotion is unavailable, clone the VM to create a new VM object with consistent naming.

Note: Recreating the VMX and attaching the disks will only work if the vmdk is not encrypted.