Virginia Gov. Bob Mc­Don­nell vetoed a bill requiring all children in public elementary and middle schools to participate in at least 150 minutes of physical activity a week, according to one of the bill’s sponsors. It is the first veto of his term.

Mc­Don­nell (R) has been heavily lobbied by school districts, which had opposed the requirement, saying it could extend the school day and lead to cuts in arts and music classes, or increase costs because additional teachers would be needed.

It is unlikely that the General Assembly has enough votes to override the veto. It passed overwhelmingly in the Senate, but only by a vote of 55 to 40 in the House. It would take two-thirds, or more than 65 delegates, to override the veto.

“I’m disappointed,’’ Sen. Ralph Northam (D-Norfolk) said. “Childhood obesity is an epidemic. But I respect the governor’s decision.”

Legislators passed the bill to help fight the growing problem of childhood obesity. In 2008, state legislators passed a bill recommending 150 minutes of activity in schools, but most did not abide by the recommendation.

The bill was not scheduled to go into effect until 2014. “Everyone agrees with the goal,’’ said Rob Jones, director of government relations for the Virginia Education Association. “If it’s done right, it’s going to be expensive.”

Del. John M. O’Bannon III (R-Henrico) said additional money was not provided because any elementary or middle school teacher can teach physical education, so schools will not have to hire new teachers. “The cost of not doing this is more,’’ O’Bannon said.