Is it good to keep a new bike at rest for more than 2months?

I'm going to buy a honda cbf stunner 125cc bike tomorrow. Well, I'm just 17years. I would be turning 18 only by this August. Is it okay to ride the new bike locally until I gain license?

No its not good to keep the bike at rest
the battery will become discharged and damaged
better to run the engine idle for 10 minutes everyday

It wouldn't hurt a bike to be stored for 2 months, but you want to keep the battery charged.

As for riding at 17, I think it would depend on where you live. Some places traffic laws are enforced more aggressively than other places.

Have you considereD the option
of buying after getting D/L?
who is paying for the bike?

No problem, just ride around small streets, avoid city and traffic signals. Get a learners license

I have ridden loud MX bikes on public roads before and never been pulled over for it. I seriously have had cops wave at me and smile before. But, I live in Idaho, where cops won't do anything to you as long as you are white or mormon, or both if you're really lucky. And everyone rides dirt bikes around here. And as for storing the bike, it is fine as long as you hook it up to a battery tender, and either put fuel-saver in the tank or drain the gas out.

Is it ok to drive a car without a license?

Driving a motorcycle without a license is illegal and subject to the full pentalties of the law.

However, the moral aspect of it now comes into play. If you drive in control, and give the police no reason to pull you over, how do they know you don't have a license? Again, this is a moral issue. Knowingly breaking the law because you believe you can get away with it.

In my personal opinion? It isn't worth risking it because if you do get caught, it will be bad. You are better off waiting 2 months and riding legally, than to risk it and potentially lose your license for months, even years, and get docked fines.

Risk vs reward my friend. It isn't worth it.