We had a virtual machine lose it’s volume activation and attempts to reactivate using the slmgr command failed with error code 0xC004E015.
The resolution to this issue was to rebuild the Tokens.dat file.
First, stop the Software Protection service and verify stopped status using the PowerShell commands below.
stop-service sppsvc get-service sppsvc
Now we need to rename the old tokens.dat file so that it will be rebuilt when the service restarts. Using the below PowerShell commands, change directories and rename the file. Then restart the SPP service.
cd %windir%\system32\spp\store\2.0 ren tokens.dat tokens.bar start-service sppsvc
Now we’ll attempt to reactivate the operating system using the slmgr tool in PowerShell.
A success message should be displayed and the operating system should now be reactivated.
For more information check out the Microsoft post here:
Rebuild the Tokens.dat file – Windows Server | Microsoft Docs