I am running host Windows 10, with VMWare Workstation.
After the host is booted, I would like to have a guest OS started.
Is this possible to do? If so, how?
I don't have a dedicated server for Shared VM's. I run VM's on local machines.
Isn't there a way to start VM's by a command line? If so, create a .BAT file and auto start it with Windows?
The "Shared VM' feature is a bit of a misnomer. I'd say that most people who use that feature run the VMs locally.
It should have been named "service VMs" or something more apt.
With a "Shared VM" you can start your VM when your host starts, even if you're not yet logged in.
If you're looking for a scriptable solution then check out:
vmrun start "/path/to/the/VM/Vmxfile.vmx"
Check out Vmrun - VI-Toolkit or type "vmrun" without the quotes and parameters to get a short help.
Alternatively you can also use the vmware command, but that involves the user interface and means you have to login first.
thanks for your reaction, it was usefull but I am still struggling with something else.
Now, I have created a bat file which runs the vmrun.exe command with the vmx file as parameter (as you suggested) - and that works.
However, I would like to have this window (this VM) minimized in the hosts taskbar.
Already tried changing the props of vmworkstation (start minimized), but that does not have effect on vmrun.
You can try to run with the "nogui" option.
That means it isn't even in the taskbar. But you should still be able to go to the VM by opening VMware Workstation.
I already tried using nogui but everything I have tried gives me errors "incorrect parameter".
could you help me with the exact correct syntaxis?
what I have now (and it works), is:
vmrun start D:\VIRTUAL_MACHINES\vpn\2.vmx
this is in a .bat file which I run at startup.
cannot get any nogui option on this line working.
I am using Workstation on WIndows10
I don't use it myself and currently don't have access to VMware Workstation running on Windows..
Maybe this helps:
well this is odd..
adding nogui to the of the line does not result in an error,
but actually I do not see any VM running. I mean with that no instance of Workstation running an VM in the Windows taskbar is visible.
this indeed looks like a nongui kind of thing but there totally no gui (maybe thats the option meant to be),
what I need is a minimized instance of the VM (running 2.vmx file in a minimized mode).
Seems like thats something different than the nogui option
Yes it is something different.
Running as minimized is a bit of an issue as there's no option available for it.
What you can probably do is to work around that with a tool like autoit and automate the keypresses needed to minimize the VM after it has started via vmrun.
Unfortunately I have no experience with autoit, just know that it is used for this type of thing.
eg. something like this:
and the doc is here:
thanks for the tip!
I created a simple script with Autohotkey (similar tool as autoit), placed the script in Windows startup folder, and the result is exactly what I needed.
When my hosts boots, a new VM is started in minimized window.
If desired I can send the autohotkey script that I created.
edit: added AHK script