Yes, Virtual Offices are legal in India. One can easily rent virtual offices legally through E-StartupIndia and get their business registered.