krisofe
Contributor
Contributor

how to auto start a virtual machine on Linux or Windows

When my host starts, I'd like to start a specifical vmc machine with a command such as :

in windows : start E:\machine.vmc in "tasks managers"

in a crontab for linux

12 Replies
Peter_vm
Immortal
Immortal

If you want to autostart guest with your host start, use VMware Server rather than Workstation.

0 Kudos
KYordy
Hot Shot
Hot Shot

Or use the VMplayer.exe that comes with Workstation and create a shortcut for that. You could then even drop that shortcut into your host's startup group and start the VM when the host starts.

Good Luck!

0 Kudos
krisofe
Contributor
Contributor

Sorry I think I hadn't asked well my question :

I would like automatically starting a virtual machine WITHOUT having to validate it once wmX launched.

Indeed, to boot a virtual machine, I had to do 2 steps :

First, click on the .vmc machine since Host.

Second, Validate the "Power On" of the virtual machine.

Pb is that I want the machine runs with only a command to start it like (under windows xp) :

start machine.vnc -directrun

In other words, can I start a vmplayer with parameters, (here "Power On" on

the machine I selected in Windows) ?

Thks

0 Kudos
RDPetruska
Leadership
Leadership

Use the vmrun command with Workstation.

0 Kudos
KevinG
Immortal
Immortal

On a Windows or Linux host you can use the vmware command with command line options

Examples

Windows host:

cd "\Program Files\VMware\VMware Workstation"

vmware -x "C:\My virtual machine\winxppro.vmx"

You can also create a desktop Icon (shortcut) on the Windows desktop to launch VMware Workstation and automatically start a VM

Linux Host

vmware -x /var/lib/vmware/virtual \machines/winxppro.vmx"

You can also use the vmrun command on both linux and windows

vmrun start

krisofe
Contributor
Contributor

Thks for all those infos but my pb still persists :

I tried the KevinG steps with Workstation at work and Server at home and

still got same result :

When I enter the line under on XP host to start any client (Fedora or XP for the

exemple) I get the white manager console of VMware but without the client

starts.

cd "\Program Files\VMware\VMware Workstation"

vmware -x "C:\My virtual machine\winxppro.vmx"

To enable vmware command I indeed added vmware in the PATH and I

selected the vmware client dir to start the command.

Even if I write vmware client or

vmware -x client I have the same result : my client doesn't sart automatically

0 Kudos
KevinG
Immortal
Immortal

Did you try with vmrun?

0 Kudos
krisofe
Contributor
Contributor

Ok KevinG Smiley Happy

Steps for those who had pb for Windows Host to start automatically client :

1- Add WMWare prg dir in the path (i.e Windows =

PATH=%PATH%;vmwareprgdir)

2- vmrun start theclient.mvc (or the team for Wkstation)

and ok

(vmrun only lists you commands)

Good Week & thks a lot

Message was edited by:

krisofe

0 Kudos
MisterTM
Contributor
Contributor

Hi. I figured how to autostart a vm under vmware server without anybody logging on to windows. (I am away from home and in case of a power failure the host will auto on when power returns and the vm starts as service...so no manual anything).

I have "upgraded" to VMworkstation 6 (final). How do i do the same? (i.e.: start a vm without any user havinf to sign on to windows \[as a service]).

Thanks,

Tony

0 Kudos
RDPetruska
Leadership
Leadership

You cannot -- with anything built into the product. You can use SrvAny to run Workstation "as a service" but it's basically a hack. If your primary use of virtualization is for unattended guests, then Server is probably a better product for you.

0 Kudos
1Giuseppe
Contributor
Contributor

Maybe for MisterTM would be enough to start a user with autologon an to start the virtual machine putting a batch file in the startup

0 Kudos
samansalehi
Enthusiast
Enthusiast

Dear friends, thanks.

0 Kudos