When you clone an encrypted virtual machine, the clone is encrypted with the same keys unless you change them. To change keys, you can use the vSphere Client, the PowerCLI, or the API.
If you use the PowerCLI or the API, you can clone the encrypted virtual machine and change keys in one step. For more information, see vSphere Web Services SDK Programming Guide.
You can perform the following operations during clone.
- Create an encrypted virtual machine from an unencrypted virtual machine or virtual machine template.
- Create a decrypted virtual machine from an encrypted virtual machine or virtual machine template.
- Recrypt the destination virtual machine with different keys from that of source virtual machine.
- Starting in vSphere 8.0, selecting the Replace option for a virtual machine with a vTPM device starts with a new, blank vTPM, which gets its own secrets and identity.
Note: vSphere 8.0 includes the vpxd.clone.tpmProvisionPolicy advanced setting to make the default clone behavior for vTPMs to be "replace."
You can create an instant clone virtual machine from an encrypted virtual machine with the caveat that the instant clone shares the same key with the source virtual machine. You cannot recrypt keys on either the source or the instant clone virtual machine. See
vSphere Web Services SDK Programming Guide.
Prerequisites
- A key provider must be configured and enabled.
- Create an encryption storage policy, or use the bundled sample, VM Encryption Policy.
- Required privileges:
- If the host encryption mode is not Enabled, you also must have privilege.