I am going to share a VMware tidbit with you, something that some of you may already know, but for those of you that don’t, it might help out a little bit. This is particularly aimed at the VMware Workstation crowd. OK, first let me setup the background here. I have a virtual machine that I use for development all the time. It’s running on my laptop, along with my dev tools. I can open VMware workstation and then select the machine I want and fire it up and then close Workstation (since it is set to keep VM’s running when Workstation closes) and all that, but this is time consuming and somewhat aggravating if I am in a hurry. The point is, I am lazy and nit picky and making all those clicks and waiting for programs to load is tedious, especially when I sometimes do it several times a day.
So, I found a nifty little command in the directory where VMware Workstation is installed called vmrun.exe. This command allows you to manipulate your VM’s on the command line. With it you can start and stop, pause, take snapshots of your VM’s, plus many, many more actions. Look at the bottom of this article for more information, I have included the output of vmrun.exe’s usage text, and there is a bunch of stuff there!
Now, back to the article here and my purpose for writing it, what I wanted was a quick and easy way to fire up or start that virtual machine so I could use it when needed, but not have to go through all of the above mentioned steps and wait times. What I came up with was a quick little batch file that when executed, uses that vmrun.exe command to start my virtual machine, easy as pie.