In your Windows 7/8 VM, go to Control Panel > System > Advanced system settings > Computer Name and click Change.  Name this whatever you like, e.g. windows.  Restart your VM.
Open CMD or Powershell as administrator.  Add a URL ACL entry for your new name on the port of your choice, e.g.
netsh http add urlacl url=http://windows:8080/ user=everyone