« Creating a Linux Virtual Machine | Main | 6 degrees of seperation? »

Administrating VMware Server's Guest OS using scripts

Sometimes you need to control the guest OS or the virtuals by script. Good example is stopping all the guests or virtuals to take a backup. For VMware server, this is controlled by using Perl script via vmware-cmd.

The pre-requisite is the installation of VMTools. Yes it will work even if vmhgfs and vmxnet are not available.

To stop a guest OS

call vmware-cmd "d:\virtual machines\red hat1\red hat1.vmx" stop
ntbackup backup "d:\virtual machiens\red hat1\" .. .. .. ..

To start a guest OS

call vmware-cmd "d:\virtual machines\red hat1\red hat1.vmx" start

Put the above into a batch file and use a scheduled task to control the timing and it is done! It is possible to take a snapshot but that can be quite slow.

On the backup server using Veritas or Arcserve, use the Pre/Post option to stop and start the guest OS. A seperate job is necessary as the backup job start time and the actual backup time may differ too much.

There is an entry on Petri, but the program to call is wrong. The correct article is here

About

This page contains a single entry from the blog posted on June 26, 2008 4:07 PM.

The previous post in this blog was Creating a Linux Virtual Machine.

The next post in this blog is 6 degrees of seperation?.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type