Page 1 of 1

copyto don't work on VirtualBox 5.0

Posted: 19. May 2016, 13:50
by Xelo
Hi,

I read the user manual and try using sub-command "copyto" to copy file from host to guest. I'm using VirtualBox 5.0.2 and the host ist Linux and guest is Windows 7 SP1 64-bit.

When I using below command, the VBoxManage always claimed "No destination specified!":

Code: Select all

VBoxManage guestcontrol "8bc802ab-56af-439f-81fb-a9862cb31f66" copyto /home/alex/Daten/$dat c:\Data --username a --password a
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!

If I change the command to below, the command terminated successful but no file copied to the host folder.
VBoxManage guestcontrol "8bc802ab-56af-439f-81fb-a9862cb31f66" copyto /home/alex/Daten/$dat --target-directory c:\Data --username alex --password alexander

Dose the command is correct? if so, why the file can't copied to the guest?

I've searched on google but no related found, so I asked here. Thanks very much!

Re: copyto don't work on VirtualBox 5.0

Posted: 19. May 2016, 14:22
by socratis
If you're using 5.0.2 and not 5.0.20, you might consider upgrading, because there were fixes to the copyto command. From the release notes of version 5.0.20 (2016-04-28):
• Guest Control: various bugfixes for the copyfrom and copyto commands / API (bug #14336)
On the other hand, do you actually have a file named "dat$" or "$dat"? Not sure if it's going to create a conflict. Try changing it to "dat.txt" or something simple and see if it works.

Re: copyto don't work on VirtualBox 5.0

Posted: 23. May 2016, 07:28
by tanyiming
Hi,
I have the similar question,I'm using VirtualBox 5.0.20 and the host is Linux and guest is Windows 7 SP1 32-bit.When I using command:
VBoxManage guestcontrol "Windows" --username WENHUA --password 1 copyto /test/ip --target-directory d:\test
good news is I have not received any error messages, bad news is the file was not copied to the guest.

Can you show me a correct example? Thanks very much!

Re: copyto don't work on VirtualBox 5.0

Posted: 23. May 2016, 11:41
by socratis
I don't know if it's a bug, regression or what else, but here's a command that should work:
 VBoxManage guestcontrol "Windows" copyto 
      --verbose
      --username WENHUA
      --password 1
      /test/ip
      --target-directory d:/test/
I've marked the differences in red:
• "--verbose" enables verbose mode. Not mandatory but helpful.
• The use of "/" (slash) versus "\" (backslash) in the directory name. That's the potential bug I was talking about.

Re: copyto don't work on VirtualBox 5.0

Posted: 24. May 2016, 03:34
by tanyiming
dear socratis,
thank you very much!
best wishes to you!