Automatically Start a VMware Workstation VM at boot
For those of us who prefer the additional power that VMware Workstation offers over VMware Server, it is frustrating that there is no option to automatically start the VM(s) at boot time.
This simple batch script can be created and saved to the Startup directory to accomplish the task. Please note that your PC must be setup for your ID to auto-login if you want the VM to start automatically after a power outage, for example.
This has been tested using VMware Workstation 6.5 and 7.0 on Windows Vista 32-bit and Windows 7 64-bit (as shown). In this example VMware Workstation is installed to “C:\Program Files (x86)”, the VM is located in C:\Virtual_Machines, and the vmx file is what you need to look for.
Just open up Notepad or your favorite text editor, copy and paste the text below, modify it to fit your environment, and save it. You can then either drag and drop it into your Startup folder (Start -> All Programs -> Startup) or create a shortcut and copy that over.
@echo off "C:\Program Files (x86)\VMware\VMware Workstation\vmrun.exe" -T ws start "C:\VMs\RHEL5\RHEL5.vmx"
The taskkill command can be used to automatically close the GUI window that opens. Add this line to the bottom of your batch file if you don’t want to close the GUI manually every time you reboot:
taskkill /IM vmware.exe
Update based on comments:
- The name of the batch file does not matter. You can call it anything but be sure that the extension is .bat
- Make sure that the command is on one line. (The article originally rendered the vmrun.exe command so that it appeared to be on two lines…I fixed it on 6/29/2011)
loading...
Filed under: Tech Support
Like this post? Subscribe to my RSS feed and get loads more!

I need help.
I follow exactly.
I see this at the DOS prompt : Error: no VN name provided
I see the VMare screen boot up and it just sit there. It is suppose to boot up and hit the “Power on this virtual machine” if you do it manually.
My script name is vmareboot.cmd (does this matter) and I save it to the Startup folder.
=========
My script :
@echo off
“C:\Program Files (x86)\VMware\VMware Workstation\vmrun.exe” -T ws start
“H:\VirtualFiles\W7Ultimate1\W7Ultimate1.vmx”
=========
Please help. What happen?
I am using W7 x64 and Vmware Desktop
loading...
Make sure the command is on one line but your script looks good and the name doesn’t matter.
loading...
Thanks for the hint. In the latest version of VMware workstation and Windows 7 the taskkill /IM vmware.exe is not working. Just start it without these options.
loading...
I was just about to post this very thing, beat me to it.
loading...