Northern Virginia television viewers didn't get to see it, but elsewhere in the state, Republican gubernatorial candidate J. Marshall Coleman tonight began his biggest media effort yet aimed at linking his candidacy to Ronald Reagan.

The president endorsed Coleman in a two-minute segment that was taped Monday at the White House library and was aired in every major Virginia television market except Washington tonight as part of a half-hour political telecast.

"I am not one for telling other people how to vote," Reagan said. "But I like Marshall Coleman. I like his honesty. I like his loyalty. I like his fiscal conservativism . . . I trust him."

Reagan was clearly the star of the show that also featured prominently the likes of former governor Mills E. Godwin and outgoing Gov. John N. Dalton, all proclaiming Coleman, the state's attorney general, as the legitimate heir to Virginia's conservative tradition.

The program was another demonstration of how strongly the Coleman campaign is counting on the Reagan presidency to counter the efforts of Democratic gubernatorial candidate Charles S. Robb to portray himself as a conservative. Tonight's program, which cost the GOP campaign $12,500 to run on five channels, was meant to coincide with what a party official described as a massive direct mail effort that included a Reagan letter sent today to "hundreds of thousands" of voters and with more than 400 local parties at which GOP activists were attempting to sway undecided voters.

About 80 such gatherings in the Northern Virginia area had to be canceled, Coleman officials said, because the campaign was unable to buy time on any of Washington's four major television stations. All the stations are involved this week in a ratings survey and declined to provide time for less than $20,000, said Coleman's political director Matt Wirgau.

In his taped segment, Reagan called on Virginians to elect Coleman as a measure of support for himself. Virginia "has given me more political and moral support than any of the 50 states," he said. "I need that support now even more than ever."

Reagan, who campaigned for another GOP candidate and against Coleman in his 1977 bid for attorney general's nomination, added: "I'd be proud to work with him as your governor."

Coleman, who was filmed last week with his wife Niki in a living room set at the Washington production studio Interface, reiterated his familiar campaign themes of fiscal conservativism and mandatory criminal sentencing.

He described Robb as a man who "simply doesn't have the imagination or the creativity to explore new ideas."

Four separate television commercials developed from the same taping and discussing the same issues are being run separately on television stations from Washington to Bristol, the Coleman staff said.