Linux Lite Forums

Software - Support => Other => Topic started by: m654321 on April 06, 2015, 02:34:53 AM

Title: [SOLVED] How do I file-share between LL guest & LL host in Oracle Virtualbox?
Post by: m654321 on April 06, 2015, 02:34:53 AM
I have no problems setting up file sharing between a windows 7 guest in a LL2.2 host, using Oracle Virtualbox, having already done this a few times on different laptops.

However, when the guest is changed to a distro e.g. ubuntu 14.04, with LL2.2 host, I have problems setting up file sharing.  The problem is something like this...

... the 'Guest Additions' appear to install correctly.  However, when I go to...
Browse Network (within the guest) → Lappy → linuxliteshare, 
a window opens up with a password request for linuxliteshare.  However when I put my Administrator password in this doesn't seem to work.

Any clarification much appreciated.
Kind regards
Mike
Title: Re: [SOLVED] How do I file-share between LL guest & LL host in Oracle Virtualbox?
Post by: Scott on April 06, 2015, 11:11:02 AM
Hi m654321,
Does the VirtualBox section in the LL Manual help?
https://www.linuxliteos.com/manual/software_tutorials.html#vbox
Title: Re: [SOLVED] How do I file-share between LL guest & LL host in Oracle Virtualbox?
Post by: Wirezfree on April 06, 2015, 01:38:34 PM
Hi,

Linux Guests/Hosts are a bit different.

> Have you installed "Guest Additions (https://www.virtualbox.org/manual/ch04.html#idp96641072)
" in the Guest?
Note the last instruction can be a sudo:
Code: [Select]
sudo sh ./VBoxLinuxAdditions.run
Have you set up "Shared Folders (https://www.virtualbox.org/manual/ch04.html#sharedfolders)" on the Host, then it can be mounted from Guest.?.?
Title: Re: [SOLVED] How do I file-share between LL guest & LL host in Oracle Virtualbox?
Post by: m654321 on April 07, 2015, 07:07:37 AM
Thanks Wirezfree, I tried sudo sh ./VBoxLinuxAdditions.run but the terminal replies with...
sh: 0:     can't open ./VBoxLinuxAdditions.run
Title: Re: [SOLVED] How do I file-share between LL guest & LL host in Oracle Virtualbox?
Post by: Wirezfree on April 07, 2015, 08:13:03 AM
Hi,


In the VM menu "Device",
It appears when you mouse over the middle of the Guest Task bar.
I'm unable to grab it in a screen shot, it's transient
Make sure to select "Insert Guest Additions CD Image"
It will mount, and appear on the desktop.

Then open it, and "right click" in it,
Then select "Open Terminal Here"
Then try command again....


(http://i.imgur.com/dOKMSFR.png)


Title: Re: [SOLVED] How do I file-share between LL guest & LL host in Oracle Virtualbox?
Post by: m654321 on August 20, 2015, 11:34:14 AM
I've returned to this issue after putting it on hold for a while, but am still unable to get Linux guest and Linux host to communicate, e.g. I would like LL v2.6 beta (guest) to access data files on LL v2.4, and also to access files on a DATA partition on a separate 2nd physical hard drive on the same laptop. 

I have seen a thing called 'linuxliteshare' in the VM but it asks for a password and my administrator password doesn't seem to work.

The guest recognises & accesses USB devices plugged into the laptop (e.g. printer external drives etc),  and the guest takes up the full screen when booted up.

Dave, I did everything you suggested above, but it doesn't seem to work for guest/host communication - I seem to be missing something...

Any further guidance on this one...?

Cheers
Mike
Title: Re: [SOLVED] How do I file-share between LL guest & LL host in Oracle Virtualbox?
Post by: torreydale on August 20, 2015, 12:06:05 PM
To m654321 ,

The following assumes you've installed Virtualbox guest additions to your VM.  Since your guest VM recognizes USB devices and since the desktop resizes, it sounds like guest additions and the Virtualbox Essentials Pack have been installed.

Now to get shared folders between the host and the guest, do the following:
1) Create a folder on your host machine that you want to share with your VM.
2) With your VM powered off, go to the VirtualBox settings of your VM.
3) Go to the Shared folders section of those settings.
3) For Machine Folders, add a shared folder pointing to the folder you created on your host machine, and set it to Auto-mount.
4) Start your VM.
5) After the reboot, within the VM, go to the User Manager (Menu->Settings->User Manager).
6) Add your user account to the vboxsf user group (ie. for your user account, put a check mark next to vboxsf).
7) Restart your VM.

The shared folder on the VM will be under the /media parent folder.  You can create a test document there and see it show under the folder you created on your host machine.

Same directions are in this video with one exception...the video producer added the user account to the vboxsf group using the terminal instead of the user manager.

  https://www.youtube.com/watch?v=TcrfrVNNGMU

Title: Re: [SOLVED] How do I file-share between LL guest & LL host in Oracle Virtualbox?
Post by: Wirezfree on August 20, 2015, 02:12:16 PM
@ torreydale,

Well remembered, I have not installed a Linux guest for a while, and not needed to run it.
I just checked my install, and it matches your comments. I forgot about ticking the vboxsf in user manger.

(http://i.imgur.com/35NLs0y.png)
Title: [SOLVED] How do I file-share between LL guest & LL host in Oracle Virtualbox?
Post by: m654321 on August 24, 2015, 02:12:34 AM
@torreydale & @wirezfreeze...

Many thanks to you both - I have now got host LL & guest LL 'talking' to each other through /media/sf_ [name of directory].

One difficulty was that Host already had its directories (Documents, Downloads, Music etc...) symlinked to a separate data partition (shared with Win8.1).
When I tried to link them all collectively with Guest under Shared Folders in the Virtual Box Manager as /home/mike, they would  appear with double crosses when I opened File System (under File Manager) on Guest. 

However I got round this problem by linking the directories individually under Shared Folders in Virtual Box Manager, i.e. as /home/mike/Documents; /home/mike/Downloads; home/mike/Music; etc...  It works just fine now so I will mark this thread as SOLVED.

However,  is there a way of making /media/sf_ [name of directory] more accessible in Guest, rather than having to go through the File Manager each time? Maybe I could mount them collectively in a folder on the Desktop - how do I do that?

Many thanks again for your help guys.

Cheers
Mike
Title: Re: [SOLVED] How do I file-share between LL guest & LL host in Oracle Virtualbox?
Post by: torreydale on August 24, 2015, 08:30:16 AM
You can create a shortcut or a link. 

Open up the file manager (Thunar).  Right click on the folder you want quick access to and select Send To.  From there, you have an option to Create a Shortcut to the side pane of the file manager (Thunar), or an option to Create a Link to the Desktop.
Title: Re: [SOLVED] How do I file-share between LL guest & LL host in Oracle Virtualbox?
Post by: m654321 on August 24, 2015, 09:04:43 AM
Quote
You can create a shortcut or a link. Open up the file manager (Thunar).  Right click on the folder you want quick access to and select Send To.  From there, you have an option to Create a Shortcut to the side pane of the file manager (Thunar), or an option to Create a Link to the Desktop.

...many thanks Torreydale.

    from Mike