I just installed FreeBSD on a VirtualBox guest just a couple of days ago. Are there any instructions out there for getting a shared folder that is on my Windows 10 host to work? Please advise. Thanks.
I already had virtualbox-ose-additions installed, but I did not have virtualbox-ose-kmod installed. I did that and rebooted my system. I then tried mount -t vboxsf Windows_share /mnt. I get "Operation not supported by device". Please advise. Thanks.In order to mount those your OS needs to support the so called "vboxsf" filesystem, and therefor your OS needs to support Virtual Box. Look into emulators/virtualbox-ose-kmod for that. You might also want to install emulators/virtualbox-ose-additions.
After that you can simply follow the mount instructions shown within VirtualBox.
sudo mount_vboxfs -w shared_folder_name /mnt
You may have installed the package, but did you also configure its contents? Installing a kernel module doesn't imply that FreeBSD will also actually load it. Either do that manually using kldload or automatically by adding it to /boot/loader.conf.
Either way, I mixed up my ports. The important port to install here is emulators/virtualbox-ose-additions, these are the official guest additions. After that you'll also have /boot/modules/vboxvfs.ko at your disposal which should give you access to the shared folders.
Just follow the port instructions to activate the whole lot.
sshd
by adding the following to /etc/rc.confsshd_enable="YES"
pkg install
.[global]
# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
workgroup = whatyouwant
security = user
map to guest = Bad User
[NameOfSharedSMB]
path = /home/MyUser/Desktop/Shared
read only = no
public = yes
sysrc samba_server_enable=YES
service samba_server start
Here's how you can do it:
* Install VBox Guest Additions:
. boot FreeBSD guest OS and log in as root
[FONT=Courier New] cd /usr/ports/emulators/virtualbox-ose-kmod && make install clean
cd /usr/ports/emulators/virtualbox-ose-additions && make install clean[/FONT]
[FONT=Courier New] poweroff[/FONT]
* Use shared folder from host server
. VirtualBox => Settings => Shared Folders => folder-add icon
. browse to the folder (let's presume the folder being selected is called "[FONT=Courier New]Shared[/FONT]"), select it then select "Auto-mount"
. boot FreeBSD guest OS and log in as root
[FONT=Courier New] mkdir /sf_[/FONT][FONT=Book Antiqua](name)[/FONT]
[FONT=Courier New] vi /boot/loader.conf
vboxvfs_load="YES"[/FONT]
[FONT=Courier New] vi /etc/fstab
Shared /sf_[/FONT][FONT=Book Antiqua](name)[/FONT][FONT=Courier New] vboxvfs rw 0 0[/FONT]
[FONT=Courier New] reboot[/FONT]
Hello,
I have several FreeBSD guests on Windows VirtualBox.
The simplest to do to exchange files with Windows is to install samba (tested 46 and 47 versions) withpkg install
.
Then, you have to create /usr/local/etc/smb4.conf with root user. The file should contain:
Code:[global] # workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH workgroup = whatyouwant security = user map to guest = Bad User [NameOfSharedSMB] path = /home/MyUser/Desktop/Shared read only = no public = yes
You have to replace "whatyouwant" by a workgroup name of your choice. And the same for "NameOfSharedSMB". I use a folder on the desktop of "MyUser" and you have to create this folder.
After that, type, while in root user:
sysrc samba_server_enable=YES
service samba_server start
Then, anyone can read and write in this folder.
Maybe you can try to give read+write access to a specific user or group, I've used this before:Thank you for detailed description, but still, my general non-root user can not create a flie in /mnt/windowsDir , he can only read. Problem remains.
[FONT=Courier New]bye
n.[/FONT]
$ sudo mount -t vboxvfs -o rw,gid=1001,uid=1001 vmshare $HOME/windowsDir
$ id <user>
Hi,Here's how you can do it:
[f112.98] # df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/ada0s1a 31G 17G 12G 60% /
devfs 1.0K 1.0K 0B 100% /dev
tmpfs 2.7G 8.0K 2.7G 0% /tmp
tmpfs 5.0M 88K 4.9M 2% /var/log
C_DRIVE 214G 176G 38G 82% /sf_C_DRIVE
Maybe you can try to give read+write access to a specific user or group, I've used this before:
$ sudo mount -t vboxvfs -o rw,gid=1001,uid=1001 vmshare $HOME/windowsDir
You can find your user's group-id (gid) and user-id (uid) by running:
$ id <user>
Regards,