You can only upgrade to Windows 10 on the same machine, or VM, or etc.
If you for some reason erase your VM instead of formatting the existing disc you'll forever lose that key - which is generic, by the way.
Can you elaborate on that please? I was planning on importing the 8.1 VMDK into either Parallels or Fusion, doing the upgrade, extracting the Windows 10 key, deactivating that particular Parallels/Fusion installation and then using the extracted Windows 10 key for a clean installation into a new 10 VDMK. As I use only the VDMK Windows.