8

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"?

Mr.Sheep
  • 1,368
  • 1
  • 15
  • 32

3 Answers3

13

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.

  1. Tell VirtualBox to use a Shared Folder

    mount shared folder

  2. create directory where the data of the shared folder should be, for example: home/user/host

  3. 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

Community
  • 1
  • 1
Mr.Sheep
  • 1,368
  • 1
  • 15
  • 32
  • 2
    As a final step I had to call `sudo usermod -a -G vboxsf ` and reboot on openSUSE for proper access rights. – yau Feb 09 '17 at 12:55
2

From my experience this instruction was not complete for opensuse leap. Browse down to root.

cd .

Then browse into

cd run/media/(user)/VBox_GAs_6.0.6/

And run the executable as root.

sudo ./VBoxLinuxAdditions.run

After this I was able to run my Guest Additions not just partially but completely without any hassle. It is preferable to run all installation involving changes into root as sudo user.

rageext
  • 21
  • 3
1

thanks for the above instructions, Mr.Sheep is on the right track, but to get the automount to work on opensuse I had to add the following to /etc/init.d/boot.local (not rc.d):

#!/bin/bash mount -t vboxsf [share] /home/[user]/[folder]

And then make it executable: sudo chmod +x /etc/init.d/boot.local

aa.malta
  • 11
  • 1