VMware Cloud Community
joseph_tang
Contributor
Contributor

How to make Copy-VMGuestFile faster?

I use Copy-VMGuestFile quite often to copy files from my VMs to my management workstation. However the speed is very slow at about 8Kbps per file.

Is there a setting somewhere where I can tune it up?

Reply
0 Kudos
3 Replies
LucD
Leadership
Leadership

That cmdlet uses the GuestFileManager to transfer files to/from the guest OS.

It requires the VMware Tools to be installed, and the tools should not be an outdated version.

Can you check that last condition?

You can also use the API methods directly, the InitiateFileTransferFromGuest and InitiateFileTransferToGuest methods.

You'll probably get some improvement, but otherwise there are no real settings to influence the transfer speed.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
joseph_tang
Contributor
Contributor

Thanks LucD for your advice.

Yep, the VMware Tools are already of the latest version.

I tried using the API methods directly as suggested, but there was no noticeable improvement.

I did notice, that if there are more than 1 file to be copied out from the VM, and I create a Powershell Job for each file and do the copying in parallel, the total speed increases linearly (e.g. 1 file transfers at about 8Kbps, 2 files at 16Kbps, 3 files at 24 Kbps etc). This is useful when there are multiple files to be transferred, but I still think it would be better if the speed can be tuned for a single file (maybe by increasing memory reserved for the esxi kernel or something?).

Reply
0 Kudos
joseph_tang
Contributor
Contributor

Bumping this thread in case anyone has a way to make Copy-VMGuestFile run faster....

Reply
0 Kudos