If these are OEM (Brand name computers), then you will need to manually install Windows 7 on the Vista Machine. The computer should be old enough so that Windows 7 contains all the drivers. However, as an anti-piracy measure you cannot simply move a hard drive from one computer into a different computer.
If you have a Windows 7 ISO on a USB or DVD, you can manually install it on the Vista machine using the Product Key sticker found on the bottom of the machine that no longer works.