VMware Cloud Community
rohitdesh
Contributor
Contributor

Programatically installing any software on vmware virtual machine

ey guys, i want to develop an application for vmware server which will allow to install any software on virtual machine. I will just need to give path of

.exe.

Any idea how to do it? I was thinking about writing a shell script and copy that file from host to guest and then execute it. Is is possible? Is there any sample code in C# availabe ?

Reply
0 Kudos
1 Reply
RvdNieuwendijk
Leadership
Leadership

You can do this with the VIX API. "The VIX API allows you to write programs and scripts that automate virtual machine operations, and run programs or manipulate files within guest operating systems. This API is high-level, easy to use, and practical for both script writers and application programmers. It runs on either Windows or Linux and supports management of VMware Workstation, VMware Server, and VMware vSphere including ESX/ESXi through vCenter Server. Bindings are provided for C, Perl, and COM (Visual Basic, VBscript, C#)."

If you have PowerShell running in the guest OS, you can use the PowerCLI Invoke-VMScript cmdlet to run a PowerShell script in the guest that starts your install .exe file.

Regards, Robert

Blog: https://rvdnieuwendijk.com/ | Twitter: @rvdnieuwendijk | Author of: https://www.packtpub.com/virtualization-and-cloud/learning-powercli-second-edition
Reply
0 Kudos