VirtualBox

Opened 9 years ago

Last modified 6 years ago

#14336 reopened defect

Error with copyfrom

Reported by: littlebuck144 Owned by: pentagonik
Component: other Version: VirtualBox 5.0.0
Keywords: Cc:
Guest type: other Host type: other

Description (last modified by Frank Mehnert)

I just recently, upgraded to the latest version of virtual box version 5.0.0 r101573 and I cannot get the copyfrom command to work.

Here is the command I'm trying to run and the resultant error I get:

C:\Program Files\Oracle\VirtualBox>VBoxManage.exe guestcontrol
    "Windows Server 2008 x64" copyfrom
    --target-directory "C:\BuildLogs\Install Log - Win 7.txt"
    "C:\ProgramData\MyApp\Installer.txt"
    --username "TestUser" --password "111111" --recursive --verbose

VBoxManage.exe: error: File copy failed
VBoxManage.exe: error: Unable to write "C:\ProgramData\MyApp\Installer.txt" to "C:\BuildLogs/Install Log - Win 7.txt
": Access denied
VBoxManage.exe: error: Details: code VBOX_E_IPRT_ERROR (0x80bb0005), component G
uestSessionWrap, interface IGuestSession
VBoxManage.exe: error: Context: "int __cdecl gctlCopyFileToDest(struct COPYCONTE
XT *,const char *,const char *,enum gctlCopyFlags)" at line 2162 of file VBoxMan
ageGuestCtrl.cpp
VBoxManage.exe: error: Unable to write "C:\ProgramData\MyApp\Installer.txt" to "C:\BuildLogs/Install Log - Win 7.txt
": Access denied.
VBoxManage.exe: error: Error processing "C:\ProgramData\MyApp\Installer.txt", rc=VERR_GENERAL_FAILURE

Attachments (4)

vbox.log (43.0 KB ) - added by Magnus Madsen 8 years ago.
Log file from running VboxService verbosely when trying to copy a file to the guest
vbox-1-admin.log (11.4 KB ) - added by Magnus Madsen 8 years ago.
Process log file from running VboxService verbosely when trying to copy a file to the guest
VBox.log (102.6 KB ) - added by Kamil Jońca 8 years ago.
VBox.2.log (70.6 KB ) - added by xpavlice 8 years ago.
Guest_W7x64-host_Ubuntu14

Download all attachments as: .zip

Change History (37)

comment:1 by Frank Mehnert, 9 years ago

Description: modified (diff)
Summary: Error with the virtual box 4.0 copyfrom commandError with copyfrom

comment:2 by Magnus Madsen, 9 years ago

I can confirm this error occurs, it does not seem to be affected by the version of the Guest Additions. I tested with both 4.27, 5.0.2 and 5.0.3.102322 without success.

This error occurs in both 5.0.0, 5.0.2 and 5.0.3.102322 and also affects copying files to the VM.

comment:3 by Magnus Madsen, 8 years ago

The problem is still present in 5.0.6.

comment:4 by Magnus Madsen, 8 years ago

The problem affects both copyto and copyfrom, but does not seem to affect any other guestcontrol actions that I tried.

Host: Windows 7 x64
Guest: Windows 7 x64, Windows 7 x86, Windows XP x86.
Guest additions: 4.27, 5.0.2, 5.0.6

Running the following command:

C:\Program Files\Oracle\VirtualBox>vboxmanage guestcontrol "Win7 SP1 x64" copyto "C:\host_path_to_file.test" --use
rname {USERNAME} --password {PASSWORD} --target-directory C:\ --verbose

Returns no output at all - no error message appears. Interestingly, changing the guest target directory to a non-existing path gives no error message either.

comment:5 by Magnus Madsen, 8 years ago

The problem also occurs when using the COM interface to attempt to copy a file to a VM. No error is thrown, but the operation does not complete.

comment:6 by Magnus Madsen, 8 years ago

The problem is still present in 5.0.8. I have attached some verbose log files from VboxService in the guest when running additions 5.0.8. The command I attempted to run against the VM while the logging was going on was:

vboxmanage guestcontrol "Win7 SP1 x64" 
    copyto C:\path_to_file.test --target-directory C:\ 
    --username admin --password {password}

The attached files are vbox.log and vbox-1-admin.log.

by Magnus Madsen, 8 years ago

Attachment: vbox.log added

Log file from running VboxService verbosely when trying to copy a file to the guest

by Magnus Madsen, 8 years ago

Attachment: vbox-1-admin.log added

Process log file from running VboxService verbosely when trying to copy a file to the guest

comment:7 by Magnus Madsen, 8 years ago

I think this line in the log could be telling - it looks like the filename argument does not make it to the guest.

Contrast the line from a working copy in 4.3.32:

00:00:00.031250 main     Request to start process szCmd=vbox_cat, uFlags=0x4, 
                         szArgs=--output=C:/temp.txt, szEnv=<None>, uTimeout=30000

with that from 5.0.8:

00:00:00.000000 main     Request to start process szCmd=vbox_cat, uFlags=0x4, 
                         szArgs=, szEnv=<None>, uTimeout=30000

comment:8 by rogierschouten, 8 years ago

Have the same problem in v5.0.8 r103449 copying from Host Windows 7 to Guest Windows Server 2012R2

Also the documentation for copyfrom is not correct and does not match the command-line help.

I'm really stuck now because in v4 the run command doesn't work and now in v5 the copyfrom command doesn't work. I need to do both. If you need help reproducing just ask and I'll try to help.

comment:9 by Magnus Madsen, 8 years ago

Problem is still present in v5.0.10.

comment:10 by Magnus Madsen, 8 years ago

Problem does not look to be fixed in v5.0.12- r104815 either.

comment:11 by cmaier, 8 years ago

Is anyone from Oracle interested in fixing this issue? Really strange that there is not a single reaction from them.

comment:12 by Frank Mehnert, 8 years ago

Regarding expectations and possible ETAs for a fix: Please read the 2nd paragraph from here. We are aware of several problems which still exist in the guest control code.

comment:13 by jpsider, 8 years ago

Are there other tickets we can follow? I am specifically interested in problems with "copyto". I am not able to complete the copy and I am not getting any feedback from the cmdline. Not sure if this is the same bug, related bug, or completely different bug. thanks!

FYI - running the latest build I could find Version 5.0.14 r105127 (updated guest additions as well).

Last edited 8 years ago by jpsider (previous) (diff)

comment:14 by PayloadSecurity, 8 years ago

We can confirm copyto/copyfrom issues as well.

comment:15 by danielgindi, 8 years ago

Yes, this is a real PITA.

comment:16 by LionFat, 8 years ago

5.0.14 r105127 -- copyto does not work

this command do nothing:

VBoxManage guestcontrol "IE11 - Win10" copyto C:\Users\user\gc.txt --target-directory C:\Users\IEUser\Downloads --username IEUser --password Passw0rd!

C:\Users\user\gc.txt - just a small txt file on the host OS C:\Users\IEUser\Downloads - destination on the guest OS

OVA setup guest OS image was taken from modern.ie

comment:17 by samuel3, 8 years ago

5.0.16 doesn't work)))) Are you guys going to do anything with that?..

comment:18 by pentagonik, 8 years ago

Thanks for noticing (again). We'll have a look at this shortly.

comment:19 by pentagonik, 8 years ago

Owner: set to pentagonik
Status: newassigned

comment:20 by pentagonik, 8 years ago

Found and fixed the issue. The bugfix will be available in the next upcoming maintenance version.

comment:21 by pentagonik, 8 years ago

Resolution: fixed
Status: assignedclosed

comment:22 by xpavlice, 8 years ago

Resolution: fixed
Status: closedreopened

This bug is still not fixed. I upgrade to 5.0.18r106667

host: Ubuntu 14.04.1 (4.2.0-27-generic)

guest: windows7x64

command: vboxmanage guestcontrol "clone2" --username Administrator --password PassW0rd copyto /home/xpavlice/WinShare/ISO/ubuntu-15.10-desktop-amd64.iso --target-directory "C:/temp"

response: VBoxManage: error: File copy failed

VBoxManage: error: Copying file "/home/xpavlice/WinShare/ISO/ubuntu-15.10-desktop-amd64.iso" failed (131072/1178386432 bytes transfered)

VBoxManage: error: Details: code VBOX_E_IPRT_ERROR (0x80bb0005), component GuestSessionWrap, interface IGuestSession

VBoxManage: error: Context: "int gctlCopyFileToDest(PCOPYCONTEXT, const char*, const char*, gctlCopyFlags)" at line 2164 of file VBoxManageGuestCtrl.cpp

VBoxManage: error: Copying file "/home/xpavlice/WinShare/ISO/ubuntu-15.10-desktop-amd64.iso" failed (131072/1178386432 bytes transfered).

VBoxManage: error: Error processing "/home/xpavlice/WinShare/ISO/ubuntu-15.10-desktop-amd64.iso", rc=VERR_GENERAL_FAILURE SO/ubuntu-15.10-desktop-amd64.iso --target-directory "C:/temp"

comment:23 by pentagonik, 8 years ago

Which Guest Additions are installed? Please attach the VBox.log file. Thanks.

by Kamil Jońca, 8 years ago

Attachment: VBox.log added

comment:24 by Kamil Jońca, 8 years ago

VBoxManage guestcontrol lit copyto --verbose --username kjonca --password Virtualbox1 --target-directory "C:/Users/kjonca/" ~/test.txt
Creating guest session as user 'kjonca'...
Waiting for guest session to start...
Successfully started guest session (ID 1)
Copying from host to guest ...
Directory "C:/Users/kjonca/" already exists
Source: /home/kjonca/test.txt
Copying "/home/kjonca/test.txt" to "C:/Users/kjonca/" ...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...
Progress state: VBOX_E_IPRT_ERROR
VBoxManage: error: Copying file "/home/kjonca/test.txt" failed with status 500, exit code 1.
VBoxManage: error: Error processing "/home/kjonca/test.txt", rc=VERR_GENERAL_FAILURE

vbox.log attached

Last edited 8 years ago by Kamil Jońca (previous) (diff)

by xpavlice, 8 years ago

Attachment: VBox.2.log added

Guest_W7x64-host_Ubuntu14

comment:25 by pentagonik, 8 years ago

Thanks for the new report. Another fix will be in the next upcoming maintenance release.

comment:26 by Frank Mehnert, 8 years ago

The latest 5.0 test builds contain the fixes which will be part of the next maintenance release. Could you re-test?

comment:27 by Frank Mehnert, 8 years ago

Resolution: fixed
Status: reopenedclosed

Fixed in 5.0.20.

comment:28 by Kamil Jońca, 8 years ago

In my case is partially fixed (copyto)

VBoxManage guestcontrol lit copyto --verbose --username kjonca --password Virtualbox1 --target-directory "C:/Users/kjonca/" ~/test.txt    
Creating guest session as user 'kjonca'...
Waiting for guest session to start...
Successfully started guest session (ID 1)
Copying from host to guest ...
Directory "C:/Users/kjonca/" already exists
Source: /home/kjonca/test.txt
Copying "/home/kjonca/test.txt" to "C:/Users/kjonca/" ...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

but

VBoxManage guestcontrol lit copyto --verbose --username kjonca --password Virtualbox1 test.txt 'c:/xxx.bat' 
Oracle VM VirtualBox Command Line Management Interface Version 5.0.20_Debian
(C) 2005-2016 Oracle Corporation
All rights reserved.

Usage:

VBoxManage guestcontrol     <uuid|vmname> [--verbose|-v] [--quiet|-q]
                              [--username <name>] [--domain <domain>]
                              [--passwordfile <file> | --password <password>]
                              copyto [common-options]
                              [--dryrun] [--follow] [-R|--recursive]
                              <host-src0> [host-src1 [...]] <guest-dst>

                              copyto [common-options]
                              [--dryrun] [--follow] [-R|--recursive]
                              [--target-directory <guest-dst>]
                              <host-src0> [host-src1 [...]]


Syntax error: No destination specified!

I tried to specify destination multiple different ways

comment:29 by klockren, 8 years ago

Resolution: fixed
Status: closedreopened

In the VirtualBox 5.1 branch, copyto does not work again.

Tested with 5.1.2 and 5.1.4 with both Ubuntu Linux and Windows Server 2008R2 as guests.

Creating guest session as user 'administrator'...
Waiting for guest session to start...
Successfully started guest session (ID 1)
Copying from host to guest ...
Directory "c:/temp" already exists
Source: /tmp/test.txt
Copying "/tmp/test.txt" to "c:/temp/test.txt" ...
0%...
Progress state: VBOX_E_IPRT_ERROR
VBoxManage: error: VERR_GENERAL_FAILURE.
VBoxManage: error: Error processing "/tmp/test.txt", rc=VERR_GENERAL_FAILURE

comment:30 by Kamil Jońca, 8 years ago

to be honest:

VBoxManage guestcontrol lit copyto --verbose --username kjonca --password yyyy test.txt --target-directory "C:/tmp/xxxx.txt"

Works as expected (but "target-directory" is misleading :) )

Last edited 8 years ago by Kamil Jońca (previous) (diff)

comment:31 by Kamil Jońca, 7 years ago

Again with 5.1.8 copyto does not work :(

Last edited 7 years ago by Kamil Jońca (previous) (diff)

comment:32 by haimn, 7 years ago

I can confirm it's not working again on 5.1.8. I reverted back to 5.0.30 and it's working fine there.

comment:33 by Kamil Jońca, 6 years ago

With 5.2.0 version stiill docopyto does not work.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use