VMware Communities
bsenftner
Contributor
Contributor

Second: issue using vmrun

Host: MacBookPro, OS X 10.4.11

Guest: WinXP with service pack 3 installed

Having issues getting vmrun's copyFileFromHostToGuest to work.

I am trying to use copyFileFromHostToGuest because I can't get a 3rd party dll running on the guest to recognize a shared directory that I mapped to a WinXP drive letter.

I am able to run executables on the guest, but since I can't get inside that 3rd party dll to debug why it is not finding the input files, I am trying to copy the input files to the guest's C drive. But that seems to be having issues as well...

I believe there needs to be some documentation added to the vix162_vmrun_command.pdf documentation for vmrun explaining the file path mumbo-jumbo on WinXP. I'm trying every variation of slashes I can think of without success.

Also, the error message when it fails is somewhat ambigious. It says "Error: The file name is not valid", however there are two files specified... which one has the problem?! I'm pretty sure that my path to the VM is fine, since I use that same path then I run the executable inside the guest. Also, I'm pretty sure the path to the copy-source is correct, since I can "ls" that path and I get my file. That only leaves the copy-destination as suspect...

I've tried the following variations of copy-destination, with error messages shown:

vmrun -T fusion -gu Administrator -gp pass copyFileFromHostToGuest /Users/me/Documents/Virtual\ Machines.localized/Windows\ XP\ Professional.vmwarevm/Windows\ XP\ Professional.vmx /Users/me/fromVMWareWin32/im.jpg c://CyberFlixor//Flixor//src//im.jpg

Error: The file name is not valid

vmrun -T fusion -gu Administrator -gp pass copyFileFromHostToGuest /Users/me/Documents/Virtual\ Machines.localized/Windows\ XP\ Professional.vmwarevm/Windows\ XP\ Professional.vmx /Users/me/fromVMWareWin32/im.jpg c:
CyberFlixor
Flixor
src
im.jpg

Error: A file was not found

vmrun -T fusion -gu Administrator -gp pass copyFileFromHostToGuest /Users/me/Documents/Virtual\ Machines.localized/Windows\ XP\ Professional.vmwarevm/Windows\ XP\ Professional.vmx /Users/me/fromVMWareWin32/im.jpg c:\CyberFlixor\Flixor\src\im.jpg

Error: The file name is not valid

vmrun -T fusion -gu Administrator -gp pass copyFileFromHostToGuest /Users/me/Documents/Virtual\ Machines.localized/Windows\ XP\ Professional.vmwarevm/Windows\ XP\ Professional.vmx /Users/me/fromVMWareWin32/im.jpg c:/CyberFlixor/Flixor/src/im.jpg

Error: The file name is not valid

vmrun -T fusion -gu Administrator -gp pass copyFileFromHostToGuest /Users/me/Documents/Virtual\ Machines.localized/Windows\ XP\ Professional.vmwarevm/Windows\ XP\ Professional.vmx /Users/me/fromVMWareWin32/im.jpg c:\/CyberFlixor\/Flixor\/src\/im.jpg

Error: The file name is not valid

vmrun -T fusion -gu Administrator -gp pass copyFileFromHostToGuest /Users/me/Documents/Virtual\ Machines.localized/Windows\ XP\ Professional.vmwarevm/Windows\ XP\ Professional.vmx /Users/me/fromVMWareWin32/im.jpg c:/\CyberFlixor/\Flixor/\src/\im.jpg

Error: The file name is not valid

I think that is pretty much every variation... any hints as to the correct method of specifying the file path to the copy-destination?

0 Kudos
3 Replies
bsenftner
Contributor
Contributor

hmmm... that second example got mangled.

Let's see if this works, this is the last parameter in the second example:

c:\\CyberFlixor\\Flixor\\src\\im.jpg

0 Kudos
bsenftner
Contributor
Contributor

Okay, apparently the secret is to use a normal WinXP file path the same as you would type in a WinXP command line, but surround it with double quotes.

This is the final, working syntax:

vmrun -T fusion -gu Administrator -gp pass copyFileFromHostToGuest /Users/me/Documents/Virtual\ Machines.localized/Windows\ XP\ Professional.vmwarevm/Windows\ XP\ Professional.vmx /Users/me/fromVMWareWin32/im.jpg "c:/CyberFlixor/Flixor/src/im.jpg"

0 Kudos
lamw
Community Manager
Community Manager

Yea, you should definitely quote anything that may have spaces. The paths are the actual paths on the system you're trying to access whether that be Windows/Linux.

=========================================================================

--William

VMware ESX/ESXi scripts and resources at:

0 Kudos