How to 'upgrade' to Windows 10, on Virtual Machine
Look, boot camp did allow Windows 7. It is just that it only allows 64bit. 

Here is how to upgrade from Windows 7 to Windows 10: Use Windows 10 on your Mac with Boot Camp.

Also, Virtual machine is like a computer!! Just follow the following guidelines: Upgrade to Windows 10.