How to get internet access in a Windows 7 virtual machine [closed]

After some digging around I actually found a fix.

I had to, in the VM running Windows 7, set the preferred DNS server of the network adapter to 192.168.131.254.

After doing that I can access internet in the VM. But, oh my, seriously? Is this how it is supposed to work?