How to move Windows 11 VM of VMware Workstation v16 to another computer?

If you copy your VM to another computer and open it with VMware Workstation, you will see a window to input password:

To run Windows 11, VMware added a vTPM device which contains a password. And encrypted your hard disk with the password.

The password is a random 32 bytes binary and no way you can input it.

Here are the steps to move the VM to new computer:

1. Download the tool and unzip it to both old and new computer.

2. Open the .vmx file on the old computer, find encryption.encryptedKey = "AQAAANCMnd8BFdER..."

3. Run dputil with the key like below:

  > dputil -d AQAAANCMnd8BFdER...
  Decrypt succeeded.
  Returned data length: 32
  Data: aYO/0MnXkxmMyjCrxODRx3rzDejHWkQtXthwpBPV1WE=

Save the data to new computer, this is the password.

4. On the new computer, run below command to encrypt the password:

 > dputil -e aYO/0MnXkxmMyjCrxODRx3rzDejHWkQtXthwpBPV1WE= (replace it with your password)
 Encrypt succeeded.
 Returned data length: 262

The data part is the new key.

5. Open the .vmx file, replace the value of encryption.encryptedKey = "AQAAANCMnd8BFdER..." with the new key.

Now your VM should be able to run.

© 2023 - Syvik