Linux Lite Forums

Software - Support => Installing Linux Lite => Topic started by: sobermadman on June 07, 2018, 10:46:25 AM

Title: Virtualbox Guest Shared Folders
Post by: sobermadman on June 07, 2018, 10:46:25 AM
I'm re-posting this since initially I posted this query in the Tutorial section by accident, which was dumb because it's not where it belongs :)

This concerns Linux Lite 4 as a Guest in VirtualBox. The installation went flawlessly. Just as in Linux Lite 3.8, the guest-dkms, utils and X11 are already there, the screen resolution gives me full screen, everything, just as in 3.8, seems ready out of the box.

So in 3.8 there was no need to install the guest additions from the CD; following OS installation, the shared folders were listed in the file manager, and after adding myself to the vboxsf group and rebooting, I was able to access them

Not so in 4.0 . Everything seems to be just as it is in 3.8, so I added myself to the vboxsf group again. But my shared folders don't turn up, there's no entry in the file manager, nor in /media, and I have no idea what went wrong. I even installed the guest additions from CD which promptly messed up everything, so I reinstalled 4.0, but am facing the same shared folder problem.

I'd be grateful if someone could shed light on this and possibly indicate a solution of the problem :-)
Title: Re: Virtualbox Guest Shared Folders
Post by: Jerry on June 07, 2018, 11:21:10 PM
Sorry, but I can't reproduce this @sobermadman
Ran Install Updates on the host, rebooted.
I installed VirtualBox via Lite Software.
Then configured a test VM (Mint), enabled all cpu core, set up the shared folder by adding /home/jerry, set to auto mount. I could then copy paste file between host and guest no problem at all.
Title: Re: Virtualbox Guest Shared Folders
Post by: sobermadman on June 08, 2018, 01:41:43 AM
@Jerry - Thanks for your reply, though unfortunately it doesn't seem to solve this strange problem. I am running a number of VM machines (on top of Mint LMDE2 as host), and in all of them, including by the way a fine Linux Lite 3.8, everything re shared folders is as it should be. I don't intend to run another VM as a guest on my Linux Lite 4 Guest, if you see what I mean; it's the Linux Lite 4 Guest which plays funny with the shared folders.

I have since been able to at least mount the shared folders in my Linux Lite 4 guest, by doing a mkdir in ~/home to which the shared folder can refer, then mount the shared folder doing sudo mount -t [SharedFolder] [directory_in_~/home]. An entry in /etc/fstab can make this mount permanent. This gives ownership of the shared folder to root though, which can be overcome by doing sudo mount -t vboxsf [SharedFolder] [directory_in_~/home] -o uid=1000,gid=1000.

But this is all rather cumbersome, specially with half a dozen or more shared folders. I'm not an expert and can only assume there must be a more elegant solution, though what it might be I haven't a clue -)
Title: Re: Virtualbox Guest Shared Folders
Post by: Scott on June 09, 2018, 11:48:05 PM

@sobermadman

Hi

I was able to reproduce this problem. I may have a partial solution. If you have time would you take a look here and let me know if this works?

https://www.linuxliteos.com/forums/installing-linux-lite/virtualbox-guest-shared-folders-5548/msg41818/?topicseen#msg41818 (https://www.linuxliteos.com/forums/installing-linux-lite/virtualbox-guest-shared-folders-5548/msg41818/?topicseen#msg41818)

Thanks
Scott
Title: Re: Virtualbox Guest Shared Folders
Post by: sobermadman on June 10, 2018, 02:25:09 AM
@Scott - Hi Scott,

Thanks a lot for taking the time and trouble of looking into this. In short - your solution works, I now have all my shared folders showing in the file manager, and two lines in the terminal to get them listed on booting is no problem at all :-)

I'm really happy this has been solved because I do like using Linux Lite for a lot of my everyday computing and will now be able to move from my current 3.8 to 4. So thanks again for your help and for a very fine distro!
Title: Re: Virtualbox Guest Shared Folders
Post by: fitfirst on November 01, 2018, 05:05:55 PM
I've been running Linux lite 3.8 and it's been working great with virtualbox. I tried linux lite 4 and 4.2 and I have a problem of vboxadd-service.service not being enabled at boot up. Is there a fix for this on the next release please?

I'm using windows 8 as HostOS and Linux lite as GuestOS.

Thank you
Title: Re: Virtualbox Guest Shared Folders
Post by: eladkarako on February 12, 2019, 08:56:23 PM
In-case you're running a low-risk machine (for example a VirtualBox client),
and you want to skip entring the root-password each time (https://www.linuxliteos.com/forums/installing-linux-lite/virtualbox-guest-shared-folders-5548/msg41818/?topicseen#msg41818 (https://www.linuxliteos.com/forums/installing-linux-lite/virtualbox-guest-shared-folders-5548/msg41818/?topicseen#msg41818)) ,
after you add a user to the vboxsf group,
you can write a batch-file in your Desktop folder with this content:
Code: [Select]
#!/bin/bash
echo "MySudoPass" | sudo -S systemctl start vboxadd-service.service
echo "MySudoPass" | sudo -S systemctl enable vboxadd-service.service
so the only thing you have to do is double-click it to make the shared-folders appeared,
after each reboot.
Title: Re: Virtualbox Guest Shared Folders
Post by: bturner01 on March 12, 2019, 08:11:27 AM
Just to note that this problem is still in Lite 4.4 RC1
Title: Re: Virtualbox Guest Shared Folders
Post by: trinidad on March 12, 2019, 10:43:27 AM
I would assume that on LMDE 2 the upgrade path will fail so there is no way to install the newer stable packages in this case which in the case of LL 4.x is what you need. You are probably stuck with a workaround into the future with that particular host. All is well with Debian 9.8 so you may want to consider a new host OS.

With windows 8 you will need the newest version too. Just the nature of progress.

With Debian the cause is security updates to the Debian stable packages which require a new updated build tool for installation. There is no fix outside of the upgrade path other than complete removal and re-installation. Workaround is pretty much it.

TC

Title: Re: Virtualbox Guest Shared Folders
Post by: kenmartin on October 07, 2019, 05:54:23 PM

Problem Shared folders problem still exists in 4.6:

systemctl | grep vbox

vboxadd.service                  loaded active exited    vboxadd.service

sudo systemctl start vboxadd-service.service
sudo systemctl enable vboxadd-service.service

systemctl | grep vbox

vboxadd-service.service        loaded active running   vboxadd-service.service                                                     
vboxadd.service                   loaded active exited    vboxadd.service

doing   sudo adduser $USER vboxsf  works but still get Permission denied.

ls: cannot open directory '/linux': Permission denied

sudo sh
# ls /linux        Works

Also can't get  lpr  to work to virtual USB printer. Example   ls -al / | lpr

Nice well thought out package. I will keep experimenting.

Ken
Title: Re: Virtualbox Guest Shared Folders
Post by: DeepThought on October 08, 2019, 03:56:53 AM
Code: [Select]
sudo adduser $USER vboxsf
I'm assuming by the above command you're trying to add yourself to vboxsf group.

The command to add a user to another group is actually, "sudo usermod -a -G <group> <user>".
So in your case try:

Code: [Select]
sudo usermod -a -G vboxsf $USER
You will need to logout/reboot the guest for this to take affect.

If you type "id" into the terminal it will list all the groups you belong to, a good way to check which groups you are a member of :)

Hope this helps.