Virtual races can certainly be done on a treadmill as long as you are able to accurately track the distance covered. Some virtual race platforms may require GPS tracking for verification purposes, so it's important to check if treadmill use is allowed before signing up for a virtual race in such cases.