Page 1 of 1

How do you share a directory from guest to host?

Posted: 21. Aug 2012, 23:45
by ben.lei
So currently I am using Windows as Host and a Linux system as Guest.

I want to share a directory from Guest onto Host. How do I do this/is this possible?

Re: How do you share a directory from guest to host?

Posted: 21. Aug 2012, 23:50
by Perryg
You would need to use samba and do a network share if you must share from guest to host.

Re: How do you share a directory from guest to host?

Posted: 22. Aug 2012, 00:28
by ben.lei
How would I create a samba network share on the Linux Guest and mount it on my Windows Host?

Re: How do you share a directory from guest to host?

Posted: 22. Aug 2012, 00:42
by Perryg

Re: How do you share a directory from guest to host?

Posted: 22. Aug 2012, 18:15
by ben.lei
I'm having trouble mounting the filesystem from host. I can, though, mount the desired directory on guest.

My Windows host can't seem to contact 10.0.2.15, and when i try localhost it doesn't work either.

In the VM, I have disabled SElinux and the firewall...
It is currently using NAT network with ports forwarded: 137->137, 138->138, 139->139

Edit: I was able to get it work by doing a bridged connection... but this is not what I want. I want to be able to access the VM share without a network connection.

Re: How do you share a directory from guest to host?

Posted: 23. Aug 2012, 10:22
by Twisted Lucidity
Yes, Bridged or Host Only is the way to go for a Samba share. The Host needs to be able to see the Guest as another networked computer.

If I was trying to do this, I would create one share from the Host to the Guest (called "Bucket" or similar).
Then the Guest (or Guests) could create a folder under there for their own use (e.g. "Bucket/Guest1" etc).

If you want no network connection at all (i.e. no virtual network adapter) then the above will still work.

One final option would be to try and mount the Guest's disc image as a Windows drive. I am not sure Windows can do that, nor am I sure what will happen with file locks etc.
My guess is that this is a very dangerous option.