VMWare - How to start a Virtual Machine automatically ?

Card Puncher Data Processing


After installing VMware Server, you can find this directory :

  • VMware_HOME\VMware VmPerl Scripting API\SampleScripts

This directory contains some sample code and this special script : startallvms.pl

This script start all VM with the parameter

autostart = "true"

in there configuration file.

To run the script, you can take example of the file vmware-cmd.bat which is located in the parent directory. For instance :

  set PATH=%PATH%;C:\Program Files\VMware\VMware VmPerl Scripting API
  "C:\Program Files\VMware\VMware VmPerl Scripting API\perl.exe" "C:\Program Files\VMware\VMware VmPerl Scripting API\SampleScripts\startallvms.pl"

Vmware Poweronvm

If you install VMWare Server in a other disk, you must change the path in the startallvms.pl script. For instance with the disk D :

   if ($^O eq "MSWin32") {
      @INC = (
         # Set the path to your VmPerl Scripting directory if different
         'D:\Program Files\VMware\VMware VmPerl Scripting API\perl5\site_perl\5.005',
         'D:\Program Files\VMware\VMware VmPerl Scripting API\perl5\site_perl\5.005\MSWin32-x86');

Recommended Pages
Card Puncher Data Processing

VMWARE is a virtualization software. VMDK is a file format that only encodes a single virtual disk from a virtual machine. A VMDK does not contain information the virtual hardware of a...

Share this page:
Follow us:
Task Runner