13.2 Virtualbox guest and shared folders in /media

Hi all,

I set up 2 instances of OpenSUSE 13.2 as a guest: one on a Windows 8.1 (from a KDE live CD) and one from a full DVD under Ubuntu 14.04 (but with VB updated from the repositories of Oracle, the last version). In both cases I can do something like:
mount -t vboxsf sharename /home/myuser/myfolder
and that works like a charm.
I read a recent discussion under:
https://forums.opensuse.org/showthread.php/500881-Media-folder-access-denied-in-Virtualbox-4-3-16
My version is 4.3.18 now.

The question is: where is that shared folder in 13.2? Or how do I adapt fstab In order to get another way to automatically get to the data (mount), because surely enough, /media seems to be missing.

I have 13.2 in a vm too and it still has the /media directory. The only problem is it is not possible to be used by a normal user without changing the permission.

chmod o+rw /media

Should suffice. That was included on the link you gave :slight_smile:

Yes, but:

chmod: cannot access '/media': No such file or directory

Is rather discouraging.

Well, my 13.2 DVD install still has the /media directory. what is the output of the command

lsb-release -rsicd

Any way, if /media is missing you can try to create it as root.

mkdir /media

Change the permission

chmod o+rx /media

To answer the first question:

 
jdc@linux-0qpb:~> lsb-release -rsicd
openSUSE project "openSUSE 13.2 (Harlequin) (x86_64)" 13.2 Harlequin 

But no /media. I installed completely standard and that involves the btrfs for /
And the second, yes, I did that but after a reboot is is empty.

Did you add the user to the vboxsf group? and make the share Automount?

Ok, i have just installed a 13.2 vm with btrfs and it seems /media does not exist by default in 13.2 but the vbox guest addition probably created the /media directory. since shared folders can only work with guest additions installed. The only catch is changing the permission of the /media directory, also adding the user to the vboxsf group is a must! :wink:

On 11/08/2014 08:26 PM, jetchisel wrote:
>
> jdeca57;2674174 Wrote:
>> Hi all,
>>
>>
>> I set up 2 instances of OpenSUSE 13.2 as a guest: one on a Windows 8.1
>> (from a KDE live CD) and one from a full DVD under Ubuntu 14.04 (but
>> with VB updated from the repositories of Oracle, the last version). In
>> both cases I can do something like:
>> mount -t vboxsf sharename /home/myuser/myfolder
>> and that works like a charm.
>> I read a recent discussion under:
>> http://tinyurl.com/q72gam7
>> My version is 4.3.18 now.
>>
>> The question is: where is that shared folder in 13.2? Or how do I adapt
>> fstab In order to get another way to automatically get to the data
>> (mount), because surely enough, /media seems to be missing.
>
> I have 13.2 in a vm too and it still has the /media directory. The only
> problem is it is not possible to be used by a normal user without
> changing the permission.
>
>
> Code:
> --------------------
> chmod o+rw /media
> --------------------
>
>
> Should suffice. That was included on the link you gave :slight_smile:
>
>

In the guest session add yourself to the vboxfs group. You will then be
able to write to the folders.

Ken

Now I’m really confused because I thought the guest additions for VB are already incorporated in the kernel and the manual mount of a vboxsf share works after the first install as do the mouse integration and screen sizing.

Did you recompile the additions against the dire warning not to do so? Because that is something I didn’t do.

But… there is no /media and there are no folders. On the same computer Manjaro and Ubuntu - as guest - work perfectly. (I often try out distributions that way, after a while I delete them. Slackware worked, Arch worked, Fedora worked, Opensuse 13.1 worked… I think I know the basics of shared folders and I was charmed to see that the screen sizing works out of the box with 13.2. But it isn’t a question of write access. After sudo mc there is simply nothing in the /media I created myself as root. And that also after a reboot. And yes, I created a shared folder on the host and I did Auto-mount.

openSUSE comes with the default vbox kernel modules either for the guest or the host. It is provided by the distro. I always remove those packages and install the guest addition from the iso which came from the package from vbox.org. The guest additions iso contains some code that cannot be distributed because of some code/license it contains so don’t be surprise if the openSUSE package does not contain the guest addition iso.

You should be able to install the iso on a running vm on the upper menu

Devices -- > Install guest addition iso 

Another option is to browse the repository from vbox.org

download.virtualbox.org/virtualbox/

You will need some packages before you can compile the guest additions from within the guest.

zypper in kernel-source kernel-syms make gcc

Now to remove the vbox kernel modules that is provided by openSUSE.

As root you can already stop the X server (if you have one installed)

rcxdm stop

Remove the kernel modules.

zypper rm virtualbox*

Mount the iso and go inside that directory.

mount /dev/sr0 /mnt && cd /mnt

Install the guest additions.

./VBoxLinuxAdditions.run

When it is done start the X server.

rcxdm start && exit

Good Luck.

Amazing. If the vbox additions they supply don’t work they shouldn’t be in the distro.
Anyhow, I removed virtualbox* and recompiled as you said and now it works. Bad points for openSUSE.
Thank you for your assistance.

The do work.
At least the X drivers, which probably is the main point for having them in the distro.

But shared folders should work as well. At least you should be able to mount shared folders via “mount” or the fstab.
You maybe have to run “VBoxService” for them getting mounted automatically though IIRC. AFAIR Oracle’s guest additions set that up to be started on boot automatically, openSUSE’s package does not.

On 11/10/2014 11:06 AM, jdeca57 wrote:
>
> kensch;2674879 Wrote:
>>
>> In the guest session add yourself to the vboxfs group. You will then be
>> able to write to the folders.
>
> But… there is no /media and there are no folders. On the same computer
> Manjaro and Ubuntu - as guest - work perfectly. (I often try out
> distributions that way, after a while I delete them. Slackware worked,
> Arch worked, Fedora worked, Opensuse 13.1 worked… I think I know the
> basics of shared folders and I was charmed to see that the screen sizing
> works out of the box with 13.2. But it isn’t a question of write access.
> After sudo mc there is simply nothing in the /media I created myself as
> root. And that also after a reboot. And yes, I created a shared folder
> on the host and I did Auto-mount.
>
>

All I can add is that I “always” use the version from Oracle’s site and
don’t have problems.

Ken

Lesson learned. :wink:

They work, notice when you install openSUSE on virtualbox after the installation mouse integration and auto-resize of the main window works-out-of-the-box.
The only catch is if you update/upgrade your vbox version then vbox will complain that you have an old version of guest-additions. I am only talking about the vbox.org package since i have not used the openSUSE package for a while.

Well, I never saw this warning with the openSUSE packages, and I did install some 11.x versions even as guest not too long ago (which of course do not have the latest guest additions… :wink: ).

So it’s probably patched out there, just like the check for available updates.

Let’s put it this way:

The “problem” is the shared folders part of the additions and there seems to be no simple answer how to make them work via /media. That part of functionality is gone, /media doesn’t exist any more and that must be the reason why they implemented the additions with reduced capacity. (a user must mount the folder manually) The solution is to compile the Oracle version.

If there were another way to achieve the automatic mount I would prefer that, but It’s unclear how to do it. (that was my question, remember?)

So yes, for me there is a problem with the additions as supplied by openSUSE.

And from experience on other guests (with the exception of Manjaro, they include working shared folders guest additions) I know that a recompile can be necessary. But that’s no big deal, once the compiler and kernel data are part of the guest OS.

That’s definitely unrelated.
/media did exist upto 13.1, and they were not automatically mounted either, or were they?

Also I don’t see a reason to patch out that functionality just because /media doesn’t exist on a fresh install.
Would be easier to just create /media on package installation, or patch it to use another directory by default.

If there were another way to achieve the automatic mount I would prefer that, but It’s unclear how to do it. (that was my question, remember?)

As I wrote already, I think you have to run “VBoxService”. But I’m not sure.
I never use shared folders.

But this seems to confirm it: VirtualBox - ArchWiki

AFAIK, Oracle’s guest additions do install a sysvinit or systemd service to start it on boot, as mentioned.

So yes, for me there is a problem with the additions as supplied by openSUSE.

Have you filed a bug report?

I have exactly the same problem. Refer: https://forums.opensuse.org/showthread.php/502552-Cannot-enable-Virtualbox-shared-folder