[Vboxmanage] Copyto return Error --->Qty files to copy limit reached ? ?

Discussions related to using VirtualBox on Windows hosts.

[Vboxmanage] Copyto return Error --->Qty files to copy limit reached ? ?

Postby Kaya_973 » 29. Jul 2021, 21:48

Hello all

I'm facing issue with guestcontrol request ; The context is the following :
My application creates automatically VMs based on inputs information.
Once VM created I set ; IP; Hostname; update some soft, other stuff... etc.
I need also to copy some folders and their content. We talk about 1& 10 subfolders for around 6 or 7000 thousands files (totally)

Doing it stupidly by a simple copy from the upper hierrachical folder ==> It gave me an error

So naturally I go now a bit softly by doing several command to "copyto" with the content of each subfolder.
By this approach it is better ; the total quantity of file copied is more important but still the same error message especially when I move one of the biggest folder with thousands of files insides. Here below the message .

Any idea why i'm facing such issue ? How to avoid it ? Any Workaround ? Temporary Folder approach ? Better files sgementation before copy ? Fix about this error ? Other cmd request ?

Sincerly, thanks in advance
Ben

Project information :
Virtual Box V 6.1.16r140961
Windows 10 for the VM Guest

My command to copyto (From Host To VM ) looks like this one :
VBoxManage.exe guestcontrol "VMWINDOWS" copyto -R "C:/TEMP/TEST VM/Mimics/Backup" --target-directory "C:/MCIS/Mimics/Backup" --username administrator --password a






Error

VBoxManage.exe: error: Guest file "C:\TEMP\TEST VM \Files/Images/SPS_6.6kV.png" could not be opened: VERR_GSTCTL_MAX_CID_OBJECTS_REACHED
VBoxManage.exe: error: Details: code VBOX_E_IPRT_ERROR (0x80bb0005), component GuestSessionWrap, interface IGuestSession
VBoxManage.exe: error: Context: "enum RTEXITCODE __cdecl gctlHandleCopy(struct GCTLCMDCTX *,int,char **,bool)" at line 1952 of file VBoxManageGuestCtrl.cpp
VBoxManage.exe: error: Guest file "C:\TEMP\TEST VM \Files/Images/SPS_6.6kV.png" could not be opened: VERR_GSTCTL_MAX_CID_OBJECTS_REACHED.
VBoxManage.exe: error: File copy failed
Kaya_973
 
Posts: 1
Joined: 29. Jul 2021, 21:27

Re: [Vboxmanage] Copyto return Error --->Qty files to copy limit reached ? ?

Postby scottgus1 » 30. Jul 2021, 14:16

I have not played with "guestcontrol copyto", and I don't know the source code enough at all to know if there is a hard-coded limit (strange if there would be, since the only numbers computer coders know are 0, 1, and infinity) or if the limit is somehow related to a memory buffer or other such thing (which means the limit could be variable).

You could try a post on the Bugtracker.
scottgus1
Site Moderator
 
Posts: 13053
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: [Vboxmanage] Copyto return Error --->Qty files to copy limit reached ? ?

Postby mpack » 30. Jul 2021, 15:39

There's going to be a guest-OS-dependant limit on the number of outstanding transactions, which you'll hit quickly if you keep thrashing it and don't wait for completion.

The solution seems fairly obvious ISTM: once you get the error you wait a while before trying some more.

Or: why are you issuing "several" commands at all? Why not simply issue a single wildcard command?
mpack
Site Moderator
 
Posts: 34554
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: [Vboxmanage] Copyto return Error --->Qty files to copy limit reached ? ?

Postby fth0 » 30. Jul 2021, 15:50

Kaya_973 wrote:Any idea why i'm facing such issue ?

Most OSs limit the number of files they can (or want to) handle simultaneously. For VirtualBox this limit is below 2048, and opening a folder involves opening all files within that folder.

Kaya_973 wrote:How to avoid it ?

For performance reasons alone, I'd pack, copy and unpack the files (e.g. zip).
fth0
Volunteer
 
Posts: 2396
Joined: 14. Feb 2019, 03:06
Location: Germany
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...


Return to VirtualBox on Windows Hosts

Who is online

Users browsing this forum: Google [Bot] and 52 guests