VirtualBox

Opened 12 years ago

Last modified 10 years ago

#11329 reopened defect

SDK - IGuestSession - (conceptual) bug with CopyTo/From()

Reported by: smihaila Owned by:
Component: other Version: VirtualBox 4.2.4
Keywords: sdk, IGuestSession Cc:
Guest type: Windows Host type: Windows

Description

There seems to be a (conceptual) bug with the IGuestSession::CopyTo() and CopyFrom(). The internal code is relying on a 30 seconds timeout for the whole copy operation to finish (because it's counting on some vbox_cat internal process spawn within the Guest). Obviously that fixed timeout is not realistic for large files such as 500MB-1GB long. Not to mention that the host file may not be really on the physical host itself, but located somewhere on the network.

I get into the same issue when I'm using the equivalent VBoxManage command.

Change History (4)

comment:1 by Frank Mehnert, 11 years ago

Resolution: fixed
Status: newclosed

Please reopen if still relevant with VBox 4.3.2.

comment:2 by NM, 11 years ago

Resolution: fixed
Status: closedreopened

I ran in to this timeout issue using VBoxManage. I need to copy some large files (~2 or 3 GB each) to my VM via command line. It is failing every time at about the 30 second mark. I am working with version 4.3.4.

11:10:04.929 PM - Executing VBoxManage Command: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe guestcontrol "Windows 7 Ultimate x86" copyto "C:\Temp\source.zip" "C:\Temp\source.zip" --username "user" --password "pass" --recursive
11:10:35.596 PM - STDERR: VBoxManage.exe: error: File copy failed
11:10:35.597 PM - STDERR: VBoxManage.exe: error: Copying file "C:\Temp\source.zip" failed (334561280/2405485177 bytes transfered)
11:10:35.597 PM - STDERR: VBoxManage.exe: error: Details: code VBOX_E_IPRT_ERROR (0x80bb0005), component GuestSession, interface IGuestSession
11:10:35.598 PM - STDERR: VBoxManage.exe: error: Context: "int __cdecl ctrlCopyFileToDest(struct COPYCONTEXT *,const char *,const char *,unsigned int)" at line 1945 of file VBoxManageGuestCtrl.cpp
11:10:35.598 PM - STDERR: VBoxManage.exe: error: Copying file "C:\Temp\source.zip" failed (334561280/2405485177 bytes transfered).
11:10:35.598 PM - STDERR: VBoxManage.exe: error: Error processing "C:\Temp\source.zip", rc=VERR_GENERAL_FAILURE

comment:3 by RuntimeError, 10 years ago

I am experiencing the same problem. This makes it impossible to use the "copyTo" or "copyFrom" command for files larger than 500 MB.

I have tracked this down in the source code. In "GuestSessionImplTasks.cpp" the copy process is started with a 30s timeout:

rc = pProcess->startProcess(30 * 1000 /* 30s timeout */, &guestRc);

I think we might need a larger value here (maybe 300 s). Also I do not think that the "--execute-image" command (used to start processes on the VM) times out after 30s.

Last edited 10 years ago by RuntimeError (previous) (diff)

comment:4 by Rnnr, 10 years ago

Much better would be to extend the API and allow to set the timeout from the caller's side -- adding new command line option for guestcontrol in this case, and maybe some other similar ones.

Note: See TracTickets for help on using tickets.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette