The House bill would create a statewide legal framework for Airbnb rental operators that would supersede local attempts to ban or regulate Airbnb, while allowing localities to pass limited ordinances to prevent Airbnb rentals from becoming nuisances to surrounding neighborhoods.

Space could only be rented out on Airbnb by the “primary resident” of a property, which would prevent entrepreneurs from amassing a portfolio of Airbnb rentals as a large-scale enterprise.

A cap would be imposed on the number of adults allowed in an Airbnb unit. A formula would limit the number of adults to “twice the number of sleeping rooms plus four.” For a two-bedroom unit, eight adults would be allowed.

The legislation would allow Airbnb to collect and pay taxes on behalf of property owners who offer rentals through the service. Operators who rent out their space less than 45 days per year would not be required to get a business license and would not be subject to local licensing fees or licensing taxes.

“Airbnb is working with governments across the country and around the world to collect and remit hotel taxes on behalf of our community, and we look forward to adding Virginia to this growing list and sending millions of dollars in new revenue to the state each year,” said Airbnb spokesman Christopher Nulty.