VMware Communities
obones
Contributor
Contributor

Script startup and windows update of VM

Hello,

I currently have a bunch of computers that have various systems (Windows only, but different versions) installed to mimic what our clients are using so that we can test our softwares when the issue is specific to a particular configuration.

This works fine, but it's not really desirable to have so many computers when only one or two at a time are running. So I thought about using virtual machines in VMWare WorkStation for that purpose and while initial tests show that it works fine, I would like to get a bit further with this. What I would like to be able to do is the following:

  1. Start the Virtual Machine

  2. Wait for the guest OS to be started

  3. Apply all available updates from Windows update

  4. Reboot the VM

  5. Stop the VM.

Right now, with the physical computers, I'm doing all this manually which is time consuming. I could continue to do it manually with VMs, but it would be so much nicer to have this run at night and get the VMs updated while I'm not at work.

Has anyone done anything like this before? I looked around and was able to find scripts that would do point 2 and 3, but nothing for the rest of the procedure. Apparently, there is a vmware-cmd tool in VmWare server, but it does not seem to be available in WorkStation. And because all my VMs are workstations and won't be servers, I'd rather stay with the WorkStation part, whose interface is much easier to use than the server part.

Thanks in advance for your help.

Cheers

Olivier

Tags (2)
0 Kudos
1 Reply
RDPetruska
Leadership
Leadership

Look into using the vmrun command instead (which also exists on VMware Server... the vmware-cmd is older and being deprecated), or use the VIX API directly (which vmrun is built on).

0 Kudos