Tony Cavalero, who starred in the TV series “School of Rock,” has signed to play rocker Ozzy Osbourne in Netflix’s Mötley Crüe biopic, “The Dirt. “

Jeff Tremaine is directing the project based on the 2001 autobiography “The Dirt: Confessions of the World’s Most Notorious Rock Band” by band members Tommy Lee, Vince Neil, Mick Mars, and Nikki Sixx, along with author Neil Strauss. Rich Wilkes, Tom Kapinos, and Amanda Adelson adapted the script.

Osbourne broke out in the 1970s as the lead vocalist of the heavy metal band Black Sabbath, which fired him in 1979. He then became an even bigger star in the 1980s when Motley Crue emerged.

The band was formed in L.A. and released its first album, “Too Fast for Love,” in 1981. Motley Crue combined hard rock, heavy metal, and glam rock, going on to sell more than 100 million albums worldwide.

“The Dirt” will star Douglas Booth as Nikki Sixx, Iwan Rheon as Mick Mars, Daniel Webber as Vince Neil and rapper Machine Gun Kelly as Tommy Lee. Julie Yorn, Erik Olsen, and Allen Kovac are producing.

Motley Crue played its final concert on New Year’s Eve 2015 at Los Angeles’ Staples Center. The project had been in development at Paramount more than a decade ago with Larry Charles attached to direct. Netflix bought the rights to the project last year.

Cavalero played Dewey Finn on Nickelodeon’s “School of Rock” in the role originated by Jack Black in the 2003 movie.

He is repped by Gersh and Truhett/Garcia Management.