I am looking to create a workflow which will copy all the setup files required for the installation of that application to the guest vm
execute the setup script to install the application
and finally delete the setup folder.
To get this workflow created, I am looking for a way to copy the setup folder to the guest vm
I know we can copy individual file but is there a way to copy all files in a folder?
Hi,
If using PowerCLI to you can use the "Copy-VMGuestFIle" cmdlet to copy entire folders also; e.g.
Copy-VMGuestFile -Source c:\Temp\Folder -Destination c:\temp\FolderOnGuest -VM VM -LocalToGuest -GuestUser user -GuestPassword pass2
This cmdlet copies files and folders from and to the guest OS of the specified virtual machines using VMware Tools. If a file with the same name exists in the destination directory, it is overwritten. Use the GuestUser and GuestPassword, or GuestCredential parameters to authenticate when connecting to the VMware Tools. To authenticate with the host, use the HostUser and HostPassword, or HostCredential parameters. SSPI is not supported. For a list of supported operating systems, see the PowerCLI User's Guide.
You can then use the Invoke-VMScript cmdlet to invoke the execution of a script and return the result.
Kind regards,
Adrian
Hi,
I know neither of these is exactly what you are looking for, but, I've handled this in a pair of different ways:
1) Zip all the files you want in a zip file, put the zip file on the vRO appliance, then copy and extract the zip on your guest OS.
2) Create an ISO file from your file set and place the ISO in a vCenter datastore, mount the ISO in your guest OS, and access the files from the CD ROM drive.
Thanks Adrian and Kraems,
For Invoke-VMscript to work, I believe we should open the communication between the servers, is that rite?
All my guest servers are are different network and I might find difficult to have the communication between them.
I will give a try about zipping the file and unzip them in the guest
Hi SubuVM,
The Invoke-VMscript requires VMWare Tools is installed on the Guest - it does not require connectivity between the management plane (where you are executing) and the VM. The script is executed using by a call to the GuestOperationsManager API which will issue the command through the VMWare Tools process running on the Guest VM. The below digram shows the flow; the "VIX client host" is your server executing the cmdlet.
Hope this helps,
Adrian
I didnt know this.. It makes it more simpler.
I did a test and invoke-vmscript works fine.. Thanks a lot Adrian
Now I need to find a way to run powercli command from orchesterator.