Author Topic: Shared Folders in Virtual Box - Can't make it work right  (Read 4268 times)

Offline Agent Smith

  • PCLinuxOS Tester
  • Sr. Member
  • *******
  • Posts: 317
    • Brazilian PCLinuxOS Community
Shared Folders in Virtual Box - Can't make it work right
« on: March 14, 2012, 06:56:35 AM »
Gentlemen,
I setup a guest PCLOS system on my host PCLOS system.
Yes, it may look weird, but the VM is where I make experiments, while leaving my main system intact.
I am using Oracle's Virtual Box, installed via the Get Virtual Box script.
I installed my guest PCLOS system.
And, when I tried to share folders between host and guest, no success.
Let me explain my actions:
1-In the guest PCLOS system, I searched in the repos and installed the Vbox guest additions.
2-But, the package in the repos is for the Vbox OSE edition.
3-So, I went to Oracle's site and searched for the  Vbox guest additions from Oracle.
4-Ok, I got an ISO file, with Oracle's guest additions.
5-I ran the ISO in the guest machine and Installed the guest additions.
6-Ok, I was able to mount the host shared folder on the guest machine.
7-I can see the files of that folder, in the guest machine.
8-But when I try to copy them, to the guest machine, or exchange files from the guest machine to the host machine, I got an error of protocol, and it doesn't finish the operations.

When I tried to uninstall Oracle's VBox Guest Additions, it crippled my virtual machine system, to the point of not being able to log into X.
Well, I had to rebuild it.
But the problem remains: I can't exchange files between guest and host machines. I'm using an USB pen drive, but it's far from perfect.
Would you have any idea or hint to help me out of this problem ?

Thanks in advance



Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: Shared Folders in Virtual Box - Can't make it work right
« Reply #1 on: March 14, 2012, 07:04:38 AM »
Gentlemen,
I setup a guest PCLOS system on my host PCLOS system.
Yes, it may look weird, but the VM is where I make experiments, while leaving my main system intact.
I am using Oracle's Virtual Box, installed via the Get Virtual Box script.
I installed my guest PCLOS system.
And, when I tried to share folders between host and guest, no success.
Let me explain my actions:
1-In the guest PCLOS system, I searched in the repos and installed the Vbox guest additions.
2-But, the package in the repos is for the Vbox OSE edition.
3-So, I went to Oracle's site and searched for the  Vbox guest additions from Oracle.
4-Ok, I got an ISO file, with Oracle's guest additions.
5-I ran the ISO in the guest machine and Installed the guest additions.
6-Ok, I was able to mount the host shared folder on the guest machine.
7-I can see the files of that folder, in the guest machine.
8-But when I try to copy them, to the guest machine, or exchange files from the guest machine to the host machine, I got an error of protocol, and it doesn't finish the operations.

When I tried to uninstall Oracle's VBox Guest Additions, it crippled my virtual machine system, to the point of not being able to log into X.
Well, I had to rebuild it.
But the problem remains: I can't exchange files between guest and host machines. I'm using an USB pen drive, but it's far from perfect.
Would you have any idea or hint to help me out of this problem ?

Thanks in advance




Hi Agent Smith,

beside that the issue should be investigated a little, you can exchange files in several ways:

a) setting up a SAMBA server on host
b) setting up a NFS share
c) using ssh (sftp) which I find very useful for occasional transfer, because you don't need anything other than a running ssh server

will report back later about my results with shared folders ...  ;)

AS

Offline pags

  • Hero Member
  • *****
  • Posts: 2519
  • Keep it clean.
Re: Shared Folders in Virtual Box - Can't make it work right
« Reply #2 on: March 14, 2012, 08:02:48 AM »
...
c) using ssh (sftp) which I find very useful for occasional transfer, because you don't need anything other than a running ssh server
...

...and with sshfs, it can used for more than just "occasional", and be application agnostic.

Offline menotu

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 15321
  • ┌∩┐(◕_◕)┌∩┐
Re: Shared Folders in Virtual Box - Can't make it work right
« Reply #3 on: March 14, 2012, 08:34:42 AM »
My normal method for installing Guest Additions (in KDE)

Install and then reboot the PCLinuxOS Guest VM and use either Hostl+D or use the main VM Menu Devices > Install  Guest Additions

The GA iso loads in Dolphin - and I use F4 to split the Dolphin window to show the terminal.

su to root  and run:

sh V*run

Note you may need to press F4 twice to make sure  the GA iso is still the "active path" in Dolphin/Terminal

And reboot
PCLinuxOS 32bit KDE 4.10.1; kernel-3.4.11-pclos1.bfs & 64bit 3.2.18bfs; NVidia GeForce 8400GS 1GB 310.19 driver

Sony Vaio SVE1513A4ESI Laptop, Intel Core i5, 2.6GHz, 6GB RAM, 750GB, 15.6" Intel HD Graphics 4000

Offline rich2005

  • Sr. Member
  • ****
  • Posts: 257
Re: Shared Folders in Virtual Box - Can't make it work right
« Reply #4 on: March 14, 2012, 12:51:21 PM »
It is not difficult to add a shared folder.

Guest Additions which you need to install from *inside* the guest OS as above posts or I tend to mount the ISO manually and rummage around.



Screenshot from my VB settings, top is the extensions (for USB2 support etc) which is global and lower down are the Guest OS (LM11) settings. Do consult the manual, although at times it reads like sanskrit



Then inside the Guest OS, still have the GuestAdditions.iso mounted as the DVD drive and having installed the guest additions from there, I can mount the shared folder with the command shown. As you can see I have a lousy memory and keep the command handy in a text file. "DRIVE_Z" is a little 3 GB FAT 32 partition I keep for sharing between Host & VM and other uses



hope this helps.
« Last Edit: March 14, 2012, 12:57:18 PM by rich2005 »

Offline Agent Smith

  • PCLinuxOS Tester
  • Sr. Member
  • *******
  • Posts: 317
    • Brazilian PCLinuxOS Community
Re: Shared Folders in Virtual Box - Can't make it work right
« Reply #5 on: March 14, 2012, 01:38:34 PM »
It is not difficult to add a shared folder.

Guest Additions which you need to install from *inside* the guest OS as above posts or I tend to mount the ISO manually and rummage around.



Screenshot from my VB settings, top is the extensions (for USB2 support etc) which is global and lower down are the Guest OS (LM11) settings. Do consult the manual, although at times it reads like sanskrit



Then inside the Guest OS, still have the GuestAdditions.iso mounted as the DVD drive and having installed the guest additions from there, I can mount the shared folder with the command shown. As you can see I have a lousy memory and keep the command handy in a text file. "DRIVE_Z" is a little 3 GB FAT 32 partition I keep for sharing between Host & VM and other uses



hope this helps.


Dear Mr. Rich 2005,

I did everything like you wrote, to the letter. But even so, I still got problems exchanging files between host and guest machines. I have a windoze VM and it exchanges ok with the host, but then it uses a samba like file system to exchange the files between guest/host.
Still no success.

Best regards!

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: Shared Folders in Virtual Box - Can't make it work right
« Reply #6 on: March 14, 2012, 01:45:26 PM »
Agent Smith,

getvirtualbox has been updated few hours ago, within few time should reach your mirror, try to update to 4.1.10 as the ChangeLog
report several fixes about GuestAdditions and shared folders.  ;)

https://www.virtualbox.org/wiki/Changelog
Quote
Linux Additions: fixed missing implementation when copying shared folder data through kernel high memory (bug #9878)
Linux Additions: make sure all data is written when closing a memory mapped file on a shared folder
...
Windows Additions: several fixes for shared folders (bug #9753)

AS

Offline menotu

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 15321
  • ┌∩┐(◕_◕)┌∩┐
Re: Shared Folders in Virtual Box - Can't make it work right
« Reply #7 on: March 14, 2012, 02:22:10 PM »
getvirtualbox has been updated few hours ago, within few time should reach your mirror, try to update to 4.1.10

+1

Version 4.1.10 is working fine on my system.
PCLinuxOS 32bit KDE 4.10.1; kernel-3.4.11-pclos1.bfs & 64bit 3.2.18bfs; NVidia GeForce 8400GS 1GB 310.19 driver

Sony Vaio SVE1513A4ESI Laptop, Intel Core i5, 2.6GHz, 6GB RAM, 750GB, 15.6" Intel HD Graphics 4000

Offline and then..

  • Sr. Member
  • ****
  • Posts: 456
  • Just Another Linux User
Re: Shared Folders in Virtual Box - Can't make it work right
« Reply #8 on: March 14, 2012, 10:25:49 PM »
Change network from NAT to bridge mode in VBox?
(you may have a subnet clash)
Cages

Offline rich2005

  • Sr. Member
  • ****
  • Posts: 257
Re: Shared Folders in Virtual Box - Can't make it work right
« Reply #9 on: March 15, 2012, 03:49:00 AM »
@ Agent Smith

Quote
I still got problems exchanging files between host and guest machines

Sorry to hear that, From your reply you can at least mount the shared folder but then you can only read the files, nothing else.

FWIW,
Check that the shared folder is set to full read-write access in the settings dialog.
Can you access the shared folder as root, indicating a permissions issue?
What filesystem is the shared folder?

Shared folder, got to be easier than setting up samba.

-----------
New day, VB update, extensions ok, updated the guest additions in the LM11 VM ok. That LM11 not the speediest VM in the world, maybe a tad slower, but then again, that might be subjective until the morning caffeine shot kicks in.


Offline Agent Smith

  • PCLinuxOS Tester
  • Sr. Member
  • *******
  • Posts: 317
    • Brazilian PCLinuxOS Community
Re: Shared Folders in Virtual Box - Can't make it work right
« Reply #10 on: March 15, 2012, 05:45:42 AM »
@ Agent Smith

Quote
I still got problems exchanging files between host and guest machines

Sorry to hear that, From your reply you can at least mount the shared folder but then you can only read the files, nothing else.

FWIW,
Check that the shared folder is set to full read-write access in the settings dialog.
Can you access the shared folder as root, indicating a permissions issue?
What filesystem is the shared folder?

Shared folder, got to be easier than setting up samba.

-----------
New day, VB update, extensions ok, updated the guest additions in the LM11 VM ok. That LM11 not the speediest VM in the world, maybe a tad slower, but then again, that might be subjective until the morning caffeine shot kicks in.



Yes, exactly: On the guest machine, in VB, I am able to browse the shared folder, images I can see in Viewnor, in the guest machine, but I am unable to exchange files between them. It always gives me "Protocol Error" - And doesn't finish the operation.
I will try to change the options in networking, to see if something changes.
Thanks for your time and patience.

Best regards

Offline 7272andy

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1628
  • UK MLU
Re: Shared Folders in Virtual Box - Can't make it work right
« Reply #11 on: March 15, 2012, 06:19:20 AM »
On my system I have

Set the Network to Bridged Adapter
Shared folders set to Automount with Full Access
Installed Guest Additions
Ensured the user is a member of the vboxsf group
Dragged the shared folders from /Media to the places panel in Dolphin for easy access

(as an aside, in my virtual machine the permissions for the shared files and folders are 770 root vboxsf)

Regards
Andy


Bare Metal 1         Bare Metal 2
Intel Celeron 420M   Intel i5 540M
2GB Ram              4GB Ram
Intel 943GM          Radeon HD 5650 PCI Express
RT2573               RT2790
32bit KDE            32&64bit KDE