Tips, Hints, Cheats, Tools

Are you working on a host computer with a virtual environment like VMWorkstation and need to start and stop your VM machines regularly?

Here is “How To” to create a small batch file; which i use at work:
1. Open notepad (or other text editor)
2. Save file as “start.bat”.
IMPORTANT!: Then extension must read “start.BAT”, not “start.bat.TXT” as some editors do.
3. Copy following lines into file and save afterwards again.

REM Start VM machines after system reboot –> Any line with REM is a comment and not executed.

REM First to start: Database maschine –> I like to have my DB machine up first.. otherwise our program throws errors at service start.
“C:\Program Files (x86)\VMware\VMware Workstation\vmrun.exe” -T ws start “D:\VMMachines\1_RUN\QS_Pink\WinXPprof-en.vmx”

a) I put full qualified path to vmrun.exe.. if you put it into your PATH environment, you could shorten it to only use vmrun.exe.
b) -T ws –> you have to tell that you are using VM Workstation (ws)
c) start –> the actual parameter for vmrun.exe
d) Full qualified path to VMX file, which starts the VM template.

CHOICE /N /C YN /T 5 /D Y > NUL

a) You can read it up.. important is the digit 5 here.. which puts a 5 sec delay.
Why do i put that? I like to create a delay between the start commands.
Since i am not a batch programmer, that is my implementation. *shrug
You can read it up.. important is the digit 5 here.. which puts a 5 sec delay.