Can you create a shared folder to access files/programs across your virtual machines?

Questions about virtualization software
Forum rules
Before you post please read how to get help
Post Reply
mintyfreshuser
Level 2
Level 2
Posts: 84
Joined: Sat Dec 30, 2017 10:14 pm

Can you create a shared folder to access files/programs across your virtual machines?

Post by mintyfreshuser » Sun Feb 18, 2018 3:53 pm

Hi everyone.

I was wondering, is there a way to create a single shared folder to store files/programs that can be accessed across different virtual machines that one may have installed? This folder would ideally only have to be created once, be accessible across any given virtual machine, and not get deleted in the event that any one virtual machine got removed/deleted.

For instance, I have two virtual machines installed the moment: Windows 10 and Windows XP.

Instead of downloading files/programs to each of these virtual machines or creating a shared folder within each of these virtual machines (which would presumably be deleted if I ever deleted that virtual machine), could I just create a single shared folder to put files/programs in and then be able to access said programs within this shared folder from either virtual machine?

I believe I may have allocated too much space to my virtual machines. With that said, if there were one shared folder from which to access files/programs, I could just delete said virtual machines and install them again (with less space allocated to them this time) without having to reinstall/download programs within each virtual machine. The shared folder would survive even if any one virtual machine got removed/deleted.

It may be possible to reallocate the size of a given virtual machine (which was discussed in this post here: viewtopic.php?f=231&t=264085&p=1432266#p1432266), but I believe the shared folder idea talked about in this post would probably be easier, faster, and safer.

The distro of Linux Mint that I'm using is Linux 18.3 Sylvia and the desktop environment is Cinnamon 3.6.6 and I'm running VirtualBox Graphical User Interface Version 5.1.32 r120294 (Qt5.5.1) by Oracle.

Thank you.

User avatar
AndyMH
Level 5
Level 5
Posts: 865
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Can you create a shared folder to access files/programs across your virtual machines?

Post by AndyMH » Sun Feb 18, 2018 5:43 pm

In the VBox main screen goto settings > shared folders and set them up. Have XP and win7 both using the same shared folder as shown in the screenshots. Beware, you might have problems with win10 running .exe files from the share cos I did with win7, my installation notes (which I think I got from someone here):

VirtualBox – Running Programs from a Shared Folder

51. Starting point – they won’t! Note – this is specific to Windows 7, you don’t have the same problems in Windows XP.
52. Solution 1: open up Explorer and goto:

Code: Select all

\\VBoxSvr
This will show the shared folder(s), double click to open and then double click on .exe file, i.e. you are looking on the 'network' not on the drive, e.g. D: that the share has been mapped to. This works.

53. Solution 2: disable UAC (User Account Control) – not tried.

54. Solution 3:You can solve this issue by tweaking Local Group Policy, run gpedit.msc– start menu/run programs:
Then > Computer Configuration > Windows Settings > Security Settings > Local Policies > Security Options >:
(a) User Account Control: Behavior of the elevation prompt for administrators... = Elevate without prompting.
(b) User Account Control: Run all administrators in Admin Approval Mode = Disabled.
(c) User Account Control: Switch to the secure desktop when prompting for elevation = Disabled.

This works.
Attachments
Screenshot from 2018-02-18 21-29-38.png
Screenshot from 2018-02-18 21-26-08.png
Homebrew i5-8400+GTX1080 Cinnamon 19, Thinkpad T430 i7-3632 Cinnamon 19, Thinkpad T420 Cinnamon 18.3, Thinkpad T410 Cinnamon 17.3, Thinkpad T60 19.0 Mate

Cosmo.
Level 23
Level 23
Posts: 17823
Joined: Sat Dec 06, 2014 7:34 am

Re: Can you create a shared folder to access files/programs across your virtual machines?

Post by Cosmo. » Sun Feb 18, 2018 6:35 pm

If a program needs to get installed, you have to do this in every system separately. You may use the same shared folder to provide the installer files for all VMs.

User avatar
AndyMH
Level 5
Level 5
Posts: 865
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Can you create a shared folder to access files/programs across your virtual machines?

Post by AndyMH » Mon Feb 19, 2018 6:48 am

Also worth noting that if you install programs with them living in your shared folder and then wipe your VM and re-install win you will have lost them because you will have wiped the windows registry. If you want to wipe your VM and want to keep installed programs stored on your shared folders you will need to back up the windows registry. Can't remember how cos it's a long time since I played around with the internals of windows.
Homebrew i5-8400+GTX1080 Cinnamon 19, Thinkpad T430 i7-3632 Cinnamon 19, Thinkpad T420 Cinnamon 18.3, Thinkpad T410 Cinnamon 17.3, Thinkpad T60 19.0 Mate

Post Reply

Return to “Virtualization”