"shared folder" does not work
"shared folder" does not work
VirtualBox 6.1:
My host is MX-Linux 19.4. (Xfce)
My guest is also MX-Linux 19.4 (Xfce)
I had never problems to create shared folders in a windows guest, but I never bring it to work in a Linux guest.
I have already tried to create a working "shared folder" it simply does not work in my Linux guest. I can not find the shared folder. Not in "/media" and also not in "/mnt" and not in "/home/Plagroe" and also not under "devices" or "places" or "network" in thunar.
Question 1:
How should I install VBoxGuestAdditions in my Linux guest? What is right?:
A) You must install VBoxGuestAdditions in each of your guest accounts. So for example if you want to use them in "root" account, you have to install then in "root" account. If you will use them in your /home/Plagrö account, then you have to install them also in /home/Plagrö account
B) It does not matter in which account you are, when you install them. If you install them in your home/Plagrö account they will also work, if you logg you in into another account
Question 2:
What file do I have to install? What is right?:
A) VBoxLinuxAdditions.run
B) autorun.sh
Question 3:
How should I start the file from question 2 when I am logged in with the account "/home/Plagrö"? What is right?:
A) You can start the file "without sudo"
B) You should start the file with "sudo"
C) Don't start the file with "sudo" if you do that, it would make available the VBoxGuestAdditions for the user "root" instead of for the user "Plagrö"
Would appreciate some answers. Thank you.
My host is MX-Linux 19.4. (Xfce)
My guest is also MX-Linux 19.4 (Xfce)
I had never problems to create shared folders in a windows guest, but I never bring it to work in a Linux guest.
I have already tried to create a working "shared folder" it simply does not work in my Linux guest. I can not find the shared folder. Not in "/media" and also not in "/mnt" and not in "/home/Plagroe" and also not under "devices" or "places" or "network" in thunar.
Question 1:
How should I install VBoxGuestAdditions in my Linux guest? What is right?:
A) You must install VBoxGuestAdditions in each of your guest accounts. So for example if you want to use them in "root" account, you have to install then in "root" account. If you will use them in your /home/Plagrö account, then you have to install them also in /home/Plagrö account
B) It does not matter in which account you are, when you install them. If you install them in your home/Plagrö account they will also work, if you logg you in into another account
Question 2:
What file do I have to install? What is right?:
A) VBoxLinuxAdditions.run
B) autorun.sh
Question 3:
How should I start the file from question 2 when I am logged in with the account "/home/Plagrö"? What is right?:
A) You can start the file "without sudo"
B) You should start the file with "sudo"
C) Don't start the file with "sudo" if you do that, it would make available the VBoxGuestAdditions for the user "root" instead of for the user "Plagrö"
Would appreciate some answers. Thank you.
Last edited by Plagrö on 7. Jan 2024, 13:18, edited 1 time in total.
-
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Windows, Linux
Re: "shared folder" does not work
Guest Additions can be installed for all users from any user account that has sudo access.
You probably need to be in a sudo prompt to run the VBoxLinuxAdditions.run.
There are prerequisites for GAs, though, same as for Virtualbox on the Linux host. See the manual's install instructions for a Linux host for the prerequisites for the GAs. Then run the .run file under sudo on any account you want.
You probably need to be in a sudo prompt to run the VBoxLinuxAdditions.run.
There are prerequisites for GAs, though, same as for Virtualbox on the Linux host. See the manual's install instructions for a Linux host for the prerequisites for the GAs. Then run the .run file under sudo on any account you want.
Re: "shared folder" does not work
Thank you.
OK it works.
But only if you do after each start of the VM this:
When I do not make this after the start of my VM, then this happens, when I click on the SFolder:
OK it works.
But only if you do after each start of the VM this:
Code: Select all
Plagroe@mx:/media/Plagroe/VBox_GAs_6.1.30
$ sudo ./VBoxLinuxAdditions.run
[sudo] Passwort für Plagroe:
Verifying archive integrity... All good.
Uncompressing VirtualBox 6.1.30 Guest Additions for Linux........
VirtualBox Guest Additions installer
Removing installed version 6.1.30 of VirtualBox Guest Additions...
You may need to restart your guest system to finish removing guest drivers.
update-initramfs: Generating /boot/initrd.img-4.19.0-25-amd64
I: The initramfs will attempt to resume from /dev/sda2
I: (UUID=e33a7ed9-3b40-4025-9d56-b092d15887d2)
I: Set the RESUME variable to override this.
Copying additional installer modules ...
Installing additional modules ...
VirtualBox Guest Additions: Starting.
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel
modules. This may take a while.
VirtualBox Guest Additions: To build modules for other installed kernels, run
VirtualBox Guest Additions: /sbin/rcvboxadd quicksetup <version>
VirtualBox Guest Additions: or
VirtualBox Guest Additions: /sbin/rcvboxadd quicksetup all
VirtualBox Guest Additions: Building the modules for kernel 4.19.0-25-amd64.
update-initramfs: Generating /boot/initrd.img-4.19.0-25-amd64
cryptsetup: ERROR: Couldn't resolve device
/dev/disk/by-uuid/79c17d9a-6a1d-49af-9636-50003879deac
cryptsetup: WARNING: The initramfs image may not contain cryptsetup binaries
nor crypto modules. If that's on purpose, you may want to uninstall the
'cryptsetup-initramfs' package in order to disable the cryptsetup initramfs
integration and avoid this warning.
I: The initramfs will attempt to resume from /dev/sda2
I: (UUID=e33a7ed9-3b40-4025-9d56-b092d15887d2)
I: Set the RESUME variable to override this.
VirtualBox Guest Additions: Running kernel modules will not be replaced until
the system is restarted
Building the VirtualBox Guest Additions kernel modules. This may take a while.
To build modules for other installed kernels, run
/sbin/rcvboxadd quicksetup <version>
or
/sbin/rcvboxadd quicksetup all
Running kernel modules will not be replaced until the system is restarted
vboxadd-service.sh: Starting VirtualBox Guest Addition service.
Plagroe@mx:/media/Plagroe/VBox_GAs_6.1.30
$
What can I do?Error opening directory '/home/Plagroe/SFolder’: No authorisation.
-
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Windows, Linux
Re: "shared folder" does not work
Did you run the prerequisites first, especially the headers?
Re: "shared folder" does not work
Thank you.
Do you mean this?: Or this?:
Do you mean this?: Or this?:
-
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Windows, Linux
Re: "shared folder" does not work
First picture, though the picture doesn't show all the prerequisites. https://www.virtualbox.org/manual/ch02. ... nux-prereq The headers are the usual missing item.
Re: "shared folder" does not work
OK. Thank you.
Yes the headers were installed:
Kernel:
Installed is the following package:
Yes the headers were installed:
Kernel:
Code: Select all
Plagrö@mx:~
$ uname -r
4.19.0-25-amd64
Plagrö@mx:~
$
Code: Select all
linux-headers-amd64: Version: 4.19+105+deb10u20
-
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Windows, Linux
Re: "shared folder" does not work
Good. The best I can offer now is to wait for a Linux guru that can interpret this further.
-
- Volunteer
- Posts: 5678
- Joined: 14. Feb 2019, 03:06
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Linux, Windows 10, ...
- Location: Germany
Re: "shared folder" does not work
FWIW, the build scripts for the VirtualBox kernel modules (in VirtualBox on the host and in the VirtualBox Guest Additions in the guest) have been modified several times within the VirtualBox 6.1.x release updates. In consequence, I wouldn't look at any version older than 6.1.48.
Re: "shared folder" does not work
Disclaimer: I am not a Linux guru but I may be able to help...
My host system is Windows 11 and my guest VM currently is Kali Linux. What I generally have to do on all my Linux guests is that I have to add myself to the vboxsf security group in order to use the shared folder with my user account (byron, in my case) and not just root. So for example I can mount C:\ as C_DRIVE and specify /mnt/c as my desired mount location and in Linux it will show up for me similar to this:
mount | grep -i c_drive
outputs:
C_DRIVE on /mnt/c type vboxsf (rw,nodev,relatime)
Like this, e.g:
usermod -a -G vboxsf byron
Case-sensitive! Lowercase a (append), uppercase g (groups). You can check this with, e.g. "sudo groups byron" to see if group was added. Then reboot the VM. FYI: Some Linux distros allow you to do something like "adduser byron vboxsf" instead of using usermod, but I am trying to train myself to always use usermod as it has always been available on every Linux I have tried so far.
Hope this helps.
My host system is Windows 11 and my guest VM currently is Kali Linux. What I generally have to do on all my Linux guests is that I have to add myself to the vboxsf security group in order to use the shared folder with my user account (byron, in my case) and not just root. So for example I can mount C:\ as C_DRIVE and specify /mnt/c as my desired mount location and in Linux it will show up for me similar to this:
mount | grep -i c_drive
outputs:
C_DRIVE on /mnt/c type vboxsf (rw,nodev,relatime)
Like this, e.g:
usermod -a -G vboxsf byron
Case-sensitive! Lowercase a (append), uppercase g (groups). You can check this with, e.g. "sudo groups byron" to see if group was added. Then reboot the VM. FYI: Some Linux distros allow you to do something like "adduser byron vboxsf" instead of using usermod, but I am trying to train myself to always use usermod as it has always been available on every Linux I have tried so far.
Hope this helps.
Last edited by Byroniac on 11. Jan 2024, 06:45, edited 1 time in total.
Re: "shared folder" does not work
WARNING: usermod without the -a will erase all other group memberships. Probably a good idea to do, e.g. "sudo groups byron" beforehand to see what groups you have so you can add them back if need be (you can easily guess how I discovered this unfortunate scenario).
Re: "shared folder" does not work
Thank you for your comments.
I was already automatically part of the vboxsf group in my VM. It was not necessary to add me manually.
Behaviour as described above. It must be something else that is not working.
I was already automatically part of the vboxsf group in my VM. It was not necessary to add me manually.
Behaviour as described above. It must be something else that is not working.
Re: "shared folder" does not work
Perhaps you should try mounting it under /media or /mnt instead of under your home directory, or leave it blank and let it choose a location (I do not usually do it this way, though).
Re: "shared folder" does not work
Unfortunately leaving the field blank does also not help. Same issue.
Also not when I write into the field /media or /mnt
It feels like any service has not started. (?)
Or if it does not mount.
Also not when I write into the field /media or /mnt
It feels like any service has not started. (?)
Or if it does not mount.
Re: "shared folder" does not work
If your system supports systemd, have you tried "sudo systemctl enable --now virtualbox-guest-utils.service" ? You can do "systemctl status virtualbox-guest-utils.service" to get status, or "sudo systemctl restart virtualbox-guest-utils.service". You can also do "sudo systemctl --failed" to see any failed services.
By the way, I would recommend not simply saying /mnt or /media but add some directory to it, as in my example I used /mnt/c.
By the way, I would recommend not simply saying /mnt or /media but add some directory to it, as in my example I used /mnt/c.