I would like to use OpenSuse as a virtual machine running on windows using VirtualBox. Furtherway I would like to use the "Shared Folder" between the two machines to share data easily. Although I have already found the option "Shared Folder" inside VirtualBox, I haven't figures out where this folder should appear? Or is there something else to do, to enable the "Shared Folder"?
Since I haven't found, after long searching, information regarding "How to set up a Shared Folder using OpenSuse in VirtualBox", I decided to summarize the process in here - hopefully it helps some others.
General information:
How to use the downloaded opensuse.vdi file with VirtualBox is described here: Importing a VDI in VirtualBox
OpenSuse should not be running inside virtualBox.
Afterwards, System preparations and the Linux Guest Additions for the VirtualBox have to be installed in opensuse. Therefore install kernel-source and kernel-syms regarding this link using zypper: Install Linux Guest Additions
sudo zypper install kernel-source
sudo zypper install kernel-syms
Mount the Guest Additions like here
and open an console/terminal in the mounted folder and install the additions:
./VBoxLinuxAdditions.run
See also Install Linux Guest Additions for a more detailed explanation.
Afterwards the actual shared folder can be mounted.
Tell VirtualBox to use a Shared Folder
create directory where the data of the shared folder should be, for example: home/user/host
mount shared folder:
sudo mount -t vboxsf wd ~/host
Correct notation of the foldernames is important
Since the mounting of the shared folder has to be done everytime the system is restarted, you can do this automatically after the boot process.
In OpenSuse add following line to "/etc/rc.d/boot.local".
mount -t vboxsf wd /home/<user>/host
Since this requires root privileges I would recommend adding the line to the file, and saving the file afterwards somewhere else (for example /home/user/), where no root proviliges are required. Afterwards move the file with
sudo mv /home/<user>/boot.local /etc/rc.d/boot.local -f
to the correct location and overwrite the old file. (-f forces to overwrite the other file). Adapt the command for your folders.
More Informations therefore can be found here: HOWTO: Use Shared Folders
Hope this summary is helpful and saves time for searching of informations.
best regards, Christoph