VMware Cloud Community
jxg107
Contributor
Contributor

Copy a file on multiple ESX host

Hi guys,

I need you help!

I have to copy a file from an ESX host on 150 ESX hosts and I would like to find a way to automate this process.

Do you have any suggestion?

Thanks a lot

J-F

0 Kudos
4 Replies
lamw
Community Manager
Community Manager

You can use vCLI's vifs to copy a file to a host, but it's limited to where you can copy it to. In general, the vCLI is for remote management and configuration, it's not meant to be used to cop files to a host.

What exactly are you trying to accomplish, perhaps there is another method

=========================================================================

William Lam

VMware vExpert 2009,2010

VMware scripts and resources at:

Twitter: @lamw

Getting Started with the vMA (tips/tricks)

Getting Started with the vSphere SDK for Perl

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos
jxg107
Contributor
Contributor

Here's my problem.

I have to replace this file /etc/vmware/init/init.d/45.restore-networking on 150 ESX hosts. I know that it's possible to do it with FastSCP but I would take me a while to do it manually

Thanks,

0 Kudos
lamw
Community Manager
Community Manager

Not possible using the vCLI.

You'll either setup paired SSH keys on your hosts which may or may not be allowed in your organizations to basically scp the init script to all your hosts OR you manually do that using winSCP or fastSCP via a GUI.

As mentioned, the use case for vCLI is not to upload files to the host to make configuration changes, especially those that effect the default init scripts.

=========================================================================

William Lam

VMware vExpert 2009,2010

VMware scripts and resources at:

Twitter: @lamw

Getting Started with the vMA (tips/tricks)

Getting Started with the vSphere SDK for Perl

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

jxg107
Contributor
Contributor

Could it be possible with VMA?

0 Kudos