How can I build a Linux VM that I can use to test Rest API calls in a lab?
You can test basically any rest api call from postman, a free app that runs perfectly well in windows or Linux (or Mac I’m sure).  You don’t need anything special.

If you want to use Linux specific tools, you can sign up for AWS free tier and make a Linux box in minutes following any of their tutorials (it will be free for 1 year).

You can also use docker on your computer (including on windows).  Docker will be suitable for running most non GUI based or web GUI based Linux apps.  I see a locust image here for example - https://docs.locust.io/en/stable/running-locust-docker.html.