The D7 Visa is an entry visa allowing you to relocate to Portugal. It is valid for a period of 4 months, within which you’ll have to apply for your D7 residence permit. The D7 visa is applied for at the Portuguese consulate or embassy in your home country, whereas the residency permit application is done once inside Portugal.