Shared folders cannot be exported via nfs

Discussions about using Linux guests in VirtualBox.
Post Reply
salamontagne
Posts: 7
Joined: 10. Jul 2011, 08:05
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Gentoo,Freebsd,Windows

Shared folders cannot be exported via nfs

Post by salamontagne »

Ive googled, and have only found a bug, last updated in 2009 http://www.virtualbox.org/ticket/5295

I know when i first installed virtualbox, that it wasnt possible, and i was wondering if this has been fixed. I Really need to get NFS served off of this VM

Any Ideas?

Host: Windows XP
Guest: Gentoo (Current, with emerge --update --deep --newuse world) Genkernel used to build kernel
EDIT: Current (4.0.10) virtualbox
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Shared folders cannot be exported via nfs

Post by Sasquatch »

So SF doesn't work, what if you use an SMB/CIFS share as export for NFS?
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
salamontagne
Posts: 7
Joined: 10. Jul 2011, 08:05
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Gentoo,Freebsd,Windows

Re: Shared folders cannot be exported via nfs

Post by salamontagne »

useing samba works fine. However, one client (this is the reason for the VM)
needs it. I can get nfs to work normally with a export inside the vm, but exporting a shared folder dosent work
'
Please, this is a crucial server, and needs to work.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Shared folders cannot be exported via nfs

Post by Sasquatch »

If it's crucial, then don't use SF. Period. And why use a VM for it, if you're better off with a special server that can share files and folders through more than just Samba. If you have a client that requires NFS, you would have figured that out before implementing it and gone with the right sharing system, so you don't require such an elaborate work around.

Furthermore, you don't understand what I'm saying. You want to export a folder from the VM over NFS using the Shared Folder functionality. I replied to that "see what happens if you change Shared Folders to Samba/CIFS". If that works, then why go the SF way? If none works, then clearly NFS cannot share a shared folder, no matter what protocol you use.
Have you even looked at http://www.google.com/search?client=ope ... 8&oe=utf-8?
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
salamontagne
Posts: 7
Joined: 10. Jul 2011, 08:05
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Gentoo,Freebsd,Windows

Re: Shared folders cannot be exported via nfs

Post by salamontagne »

Sry, there must have been a miscommunication somewhere.

I'm trying to serve a shared folder over NFS.

Heres some more info:

Sorry. I should have posted more info. I can't mount the shares on another VM or a real machine...they dont exist

the specific error i get is:

OLDTIMES ~ # /etc/init.d/nfs reload
* Reloading /etc/exports ...
exportfs: /mnt/virtual does not support NFS export [ ok ]
OLDTIMES ~ #

/etc/exports:

#/mnt/bbs 192.168.0.15(async,rw,no_subtree_check,all_squash)
#/mnt/virtual 192.168.0.15(async,rw,no_subtree_check,all_squash,fsid=0)
/mnt/test *(rw,insecure,no_subtree_check)
/mnt/virtual *(rw,insecure,no_subtree_check)

/mnt/test works just fine


etc/fstab:

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
#/dev/BOOT /boot ext2 noauto,noatime 1 2
/dev/sda1 / ext3 noatime 0 1
/dev/sda2 none swap sw 0 0
sharebbs /mnt/bbs vboxsf auto
vshare /mnt/virtual vboxsf auto
build /mnt/vmbuild vboxsf auto

vshare and sharebbs are the names of the shared folders setup in Virtualbox.

I mean, Ive seen the same thing done on VMware, why dosent VirtualBox support serving off of nfs as well as samba? I mean, a year ago it was easier to understand. But a bug has been posted about this 2 years ago, and noone has fixed it?

Because its crucial is the very reason its not going on the virtual hard disk... makes backing up only nessicary files easier if they can be reached on the host.

And yes, I have read all that you linked to...and more.
Martin
Volunteer
Posts: 2562
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: Shared folders cannot be exported via nfs

Post by Martin »

Shared folders are implemented as some kind of network folders.
It seems that the shared folder filesystem doesn't support some features needed by NFS.
Can NFS share folders which have been mounted using samba?
salamontagne
Posts: 7
Joined: 10. Jul 2011, 08:05
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Gentoo,Freebsd,Windows

Re: Shared folders cannot be exported via nfs

Post by salamontagne »

You mean, mount a shared folder from samba somewhere and then export it?

Interesting. I'll give it a shot, thanks!
Shared folders are implemented as some kind of network folders.
It seems that the shared folder filesystem doesn't support some features needed by NFS.
Can NFS share folders which have been mounted using samba?
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Shared folders cannot be exported via nfs

Post by Sasquatch »

That's what I've been suggesting!
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
salamontagne
Posts: 7
Joined: 10. Jul 2011, 08:05
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Gentoo,Freebsd,Windows

Re: Shared folders cannot be exported via nfs

Post by salamontagne »

Sorry for the confusion..I'll try it, but i'd thought i'd found another way by soft linking a directory on the shared folder..nupe.

Its alot to go thou. Is there any chance of the bug being fixed?

I mean, other VM software lets you do it, why not virtualbox? And why has the wiki page changed, removeing
the referance that it cant be done?

I'll add it myself, if i'm allowed to.
Post Reply