You can download Windows Vista and burn it to DVD and use your serial to activate it, it's not illegal as far as i know unless you use pirated serial key/ other illegal activation mechanic.
But if you want Windows 7 you need to buy it to have your own serial key.
I did this for Windows 7. The download from MSDN crashed at like 90% so I torrented an ISO then compared the SHA1 hash to the hash on Microsoft's site to verify it was the same thing I would have gotten anyway. I just typed in the key from MSDN and it was all good.