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

Questions about virtualization software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
mintyfreshuser

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

Post by mintyfreshuser »

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.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
AndyMH
Level 21
Level 21
Posts: 13583
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 »

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.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
Cosmo.
Level 24
Level 24
Posts: 22968
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. »

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 21
Level 21
Posts: 13583
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 »

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.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
Locked

Return to “Virtual Machines”