Results 1 to 6 of 6
Hi, I am fairly new to Linux. I have a Win XP host machine where I am running a Redhat virtual machine using VMplayer. I have a tool in the ...
- 04-16-2010 #1Just Joined!
- Join Date
- Apr 2010
- Posts
- 4
how to share files between host XP and RedHat VM?
Hi, I am fairly new to Linux. I have a Win XP host machine where I am running a Redhat virtual machine using VMplayer. I have a tool in the VM that I need to run using some input data located on the host machine. How can I share files between the host and the VM? I need to be able to read/write files from within the VM.
Someone mentioned "Samba" to me and it looks like it's installed on the VM, or at least I see files and folders on the VM containing "samba" in their names. So how do I use it for sharing? Are there other approaches?
Can you provide step-by-step instructions or point me to those?
Any help will be greatly appreciated!
- 04-16-2010 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
You need to share the appropriate folders on the Windows system, then you need to connect to the Windows folder from the Linux side using the CIFS file system - you may need to install the CIFS tools, but if it is a reasonably recent RedHat system, CIFS support should be in the kernel. If not, you will have to get the kernel source and recompile the kernel with CIFS support. Been there, done that...

Ok, assuming you have the CIFS stuff installed, this is how you mount the file system. First, create an empty directory as a mount point. Then do this:
where win-host is the name of the windows host (you can also use it's IP address, such as 192.168.1.101), share is the shared directory on the Windows system, and mnt-point is the Linux directory where you want to find the files.Code:mount -t cifs //win-host/share /mnt-point -o user=name,password=pswd
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 04-20-2010 #3Just Joined!
- Join Date
- Apr 2010
- Posts
- 4
Rubberman, thank you for info. When trying to do this I got the "mount: only root can do that" message, so now I am trying to find the root password for this VM.
In the meantime, I am trying to plan ahead. Eventually, I may need to run one of the tools installed on the VM on input files supplied by a large system running on the host XP machine. More precisely, this system invokes a bunch of 3rdparty utilities to process input files of various types. The VM tool is one of those utilities. The main system is supposed to feed some input.file to the utility, the utility will generate the corresponding output.file that will then be ingested back into the main system. Is there a standard approach to this type of problem in terms of how a shared folder should be set up, how the main system should be running and how the utility should be running?
Thank you!
- 04-20-2010 #4Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
On ubuntu you would sudo the mount command, by prefixing mount with sudo as in sudo mount -t cifs ...
As for your data transfer process, that will vary depending upon a lot of little details that aren't obvious here. I have a similar situation with an embedded system I am working on using a Debian Etch kernel where I have to detect when the database server has posted some new routing data to the shared folder and all the embedded systems need to download that data into their memory in order to get the new routing orders they have to act upon. I tried the inotify subsystem but it didn't seem to work over an NFS or CIFS link. As a result, I am implementing other protocols to solve this problem.Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 04-20-2010 #5Just Joined!
- Join Date
- Apr 2010
- Posts
- 4
My VM is RedHat and the host system will be either XP Pro or Windows Server 2003. I am wondering if the simplest approach for me would be to watch over a shared folder on both sides. The main system would place an input file into this folder and wait until an output file is created, at which point it would empty the shared folder. On the Linux side I would then have to run some sort of daemon process that would invoke the utility as soon as an input file appears in the shared folder. However, I've never implemented anything like that so I don't know whether this is in actuality much more complex than it sounds.
- 04-20-2010 #6Just Joined!
- Join Date
- Apr 2005
- Posts
- 20
try sshfs
Install the SSHFS client on windows Dokan Download.
I believe ssh will be running on your linux VM. If not
/etc/init.d/ssh start (or sshd start)
If firewall is active on linux, allow access to port 22.


Reply With Quote
