Restore hyper-v snapshot before run tests

hello people, I was wondering if there is any way to make my server gitlab run a command before running my tests. For example:

The runners are hosted on virtual machines Hyper-V and I would return the snapshots before running the code in the runner.

In fact, I wonder if the gitlab-ci can execute any command before sending the code for the runner to return to snapshot or could wheels different stages in different runners, for example. So it would be possible to return the snapshot at an earlier stage of the test.

sorry for my english