copyto don't work on VirtualBox 5.0

Discussions related to using VirtualBox on Linux hosts.
Post Reply
Xelo
Posts: 2
Joined: 26. Apr 2016, 10:48

copyto don't work on VirtualBox 5.0

Post 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!
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: copyto don't work on VirtualBox 5.0

Post 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.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
tanyiming
Posts: 5
Joined: 18. Jan 2016, 10:45

Re: copyto don't work on VirtualBox 5.0

Post 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!
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: copyto don't work on VirtualBox 5.0

Post 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.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
tanyiming
Posts: 5
Joined: 18. Jan 2016, 10:45

Re: copyto don't work on VirtualBox 5.0

Post by tanyiming »

dear socratis,
thank you very much!
best wishes to you!
Post Reply