Create text file with a list of virtual machines

This is a 3-step method to create a text file with a list of virtual machines.