I'm suspicious it would not activate correctly, as the Windows 8 key is likely in your UEFI and tied to the hardware. The virtual machine will report different hardware.
This should answer your question regarding licencing
Q. Can I install OEM software on a virtual machine (VMware)?
A. You can install OEM software in a virtual environment as long as you have
a separate license for each instance of the software. It is fine to
use the OEM version as long as it is properly licensed. To be clear, a
separate version of the software must be installed for both the
“standard” and “virtual” installations.
As your licence is now 'activated' for Windows 10, it would be against the licence.