Sharing files between Windows host and Linux guest

This is for discussing general topics about how to use VirtualBox.
Post Reply
abcuser
Volunteer
Posts: 590
Joined: 10. May 2007, 20:03
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu, Windows XP

Sharing files between Windows host and Linux guest

Post by abcuser »

Hi,
according to VirtualBox 1.3.8 UserManual documentation I have set shared folder but I am having code page problems.

On Windows XP SP2 host:
I created shared folder:

Code: Select all

vboxmanage sharedfolder add "Ubuntu" -name "aaa" -hostpath "c:\aaa"
Note:
Ubuntu is my vm name
"aaa" is sharename
"c:\aaa" is host path name

Command completed successfully.

On Ubuntu 7.04 guest:
I created folder /mnt/aaa:

Code: Select all

sudo mkdir /mnt/aaa
I mounted shared dir:

Code: Select all

sudo mount -t vboxsf aaa /mnt/aaa
Command completed successfully, but there is code page problem. Using a "cat filename" command.

According to documentation "-o" option should be used something like:

Code: Select all

sudo mount -t vboxsf -o iocharset iso-8859-2 aaa /mnt/aaa
The above command doesn't execute correctly. What is correct CHARSET code? Is there any list of all CHARSET available?

Regards,
Abcuser
redflow
Posts: 6
Joined: 18. May 2007, 15:17

Post by redflow »

I want to know too :shock:
redflow
Posts: 6
Joined: 18. May 2007, 15:17

Post by redflow »

nobody knows?
LaughingBoy
Posts: 44
Joined: 16. May 2007, 02:16
Location: Adelaide, SA, Australia
Contact:

Samba shared folders instead?

Post by LaughingBoy »

Have you tried setting up Samba shares on the local host, and connecting using XP's mapped drives feature :?:

ie: in an Explorer Window, type in the address bar: \\10.0.2.2\ and see what comes up.

Right click on any share, and select "Map Network drive..." select a drive letter, and tick the "Reconnect at logon" box.
PeterB
Posts: 1
Joined: 31. May 2007, 22:38

Re: Samba shared folders instead?

Post by PeterB »

LaughingBoy wrote:Have you tried setting up Samba shares on the local host, and connecting using XP's mapped drives feature :?:
Wouldn't this do the opposite of what was needed? In my case I do all my coding on the windows host and then test the web sites on the linux virtual machine, so it makes sense to store the code on Windows, rather than in the VM and share it via SAMBA.

I'm sure there is a better way to do this, but I've not found it yet (and working totally on Linux isn't feasible ;))
LaughingBoy
Posts: 44
Joined: 16. May 2007, 02:16
Location: Adelaide, SA, Australia
Contact:

Backwards

Post by LaughingBoy »

Ooops. I mis-placed the host and guest, and applied my solution from a Linux host and XP guest that worked well.

A similar principle could be applied if you want the data stored on the host. Share the directory you want the data in, and mount it from within the VM. Something like:

Code: Select all

mount -t smbfs \\\\host\\share /mnt/point
It's been a while since I've modified the /etc/fstab to include Samba mounts. It's all doable.
Post Reply