Plus and minus of installing and running apps to and from a shared folder

Discussions related to using VirtualBox on Windows hosts.
Post Reply
science2002
Posts: 36
Joined: 4. Jan 2021, 01:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Win10, WinXP, Android

Plus and minus of installing and running apps to and from a shared folder

Post by science2002 »

Snapshots or not snapshots, I found to run out of space quite quickly (with all win updates for instance) in my 50Gb Vdi with Win10 64bit on both host and guest.
For that reason, I was thinking of installing some apps - and some others just running since are labelled as portable, although they write in the registry - to a shared (external) folder in the hope of not eating the vdi HDD space.

How safe and commendable is this strategy? Does someone ever tried it, or it is better not to? In other words, what are the possible drawbacks in doing it.
Thanks
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Plus and minus of installing and running apps to and from a shared folder

Post by mpack »

It is possible, but I would use a true network share for this, as Guest Additions simple Shared Folders are not designed for complex uses. Indeed at home I use a NAS for storage of bulk data that can be shared to other PCs (including VMs). The NAS also makes a convenient backup store.

Personally however I would still locate the VM on a bigger partition, buying a bigger hard drive if necessary - on the assumption that buying disk space is cheaper than paying for your time spent constantly fighting the lack of disk space! It used to be that I always had two hard drives in my PC, a small fast one for Windows and apps, and a larger slower one for bulk data including my VMs. These days I still have two drives, but both are 2TB SSDs! They had reached a price point where I felt it just wasn't worth my time to do less.
science2002
Posts: 36
Joined: 4. Jan 2021, 01:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Win10, WinXP, Android

Re: Plus and minus of installing and running apps to and from a shared folder

Post by science2002 »

Thanks @mpack to share your tips and experience.
I set too two VDI virtual machines (with WinXp and Android) to an external drive (SSD - USB 3) and they seem to work fluidly. My Win10 Guest VM is instead on the laptop's SSD. I could move the latter VM to my external WD elements USB 3 normal HDD, with 8TB. But I fear there would be some problems of speed. I notice when normally using it that there is a perceivable latency in accessing the HDD, above all when is not in constant use.

I am a bit surprised that NAS works better than a connected HDD. USB 3.x is fast, while NAS should go (at least in my case) through a router and the wi-fi, which is not usually as speedy. It should be therefore something to do with the reliability of the type of connection. In VB I deduce network connections are more reliable than "shared folders" connections: not so happy to ear that!
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Plus and minus of installing and running apps to and from a shared folder

Post by mpack »

You misunderstand. You asked about storing data in a shared folder in order to minimize the storage requirement of the VM itself: the NAS was in relation to that. I do NOT endorse running the VM from a NAS (*), or from an external USB drive for that matter.

(*) Not in this sense. Some NAS offer a VM feature, but in that the VM is running on the NAS and using local (to it) storage. It is not running on a PC and using the NAS as an external disk drive.
science2002
Posts: 36
Joined: 4. Jan 2021, 01:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Win10, WinXP, Android

Re: Plus and minus of installing and running apps to and from a shared folder

Post by science2002 »

Thanks for the clarification. I did not imply anything specifically, except the fact of using something (NAS, USB, etc) to save HDD space both in the host, or in the vdi itself.
My very limited experience up to now is the following (as already partially stated):
1) Running VB from my laptop, and having the VM saved (I mean the vdi and related files) to an external USB 3.x - SSD drive: touching wood, so far so good, including speed.
2) Running VB and VM from my laptop, and backuping up files present in the guest Win10 using shared folders to an external USB 3.x - HDD or opening/modify files (doc, xls, ect) from this external drive: touching wood, so far so good.

I was enquiring if I could use method 2) also to install apps in the Guest OS. If I understood correctly it is possible, but not ideal or advisable.
Last edited by science2002 on 3. Aug 2022, 14:46, edited 1 time in total.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Plus and minus of installing and running apps to and from a shared folder

Post by mpack »

science2002 wrote:an external USB 3.x - SSD drive: touching wood, so far so good, including speed.
USB3 will not give you the performance of a local SATA connection, but "good enough" is entirely a matter of personal taste. The real danger with removable drives is removing them while the VM is still running! That can result in severe corruption if you are unlucky (if you were doing a lot of writing that hadn't been flushed yet).
science2002 wrote:I was enquiring if I could use method 2) also to install apps in the Guest OS. If I understood correctly it is possible, but not ideal or advisable.
Yes, I would go with that, though this is not specifically a VM issue. The idea of installing applications into a shared folder sounds wrong to me, and most apps would not expect it.
Last edited by mpack on 3. Aug 2022, 16:26, edited 1 time in total.
Reason: Fix typo.
science2002
Posts: 36
Joined: 4. Jan 2021, 01:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Win10, WinXP, Android

Re: Plus and minus of installing and running apps to and from a shared folder

Post by science2002 »

If you allow me an analogy, I was thinking that using shared folders, to install apps, was like in a standard host pc to install apps into an external drive, and run them from there. What you are saying is that probably this is not a good analogy with VM and shared folders.
As far as the host pc is concerned, I did it several times with no issues. Moreover this is my standard practice when apps can be run without installation (i.e. portable versions). In the latter case in particular the convinience is more than evident when the external drive is also "portable".
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Plus and minus of installing and running apps to and from a shared folder

Post by mpack »

science2002 wrote:Moreover this is my standard practice when apps can be run without installation (i.e. portable versions).
Portable apps tend to not care what folder or drive they are launched from. But, if the app does care, because there are additional files that need to be loaded from the same folder, or because it has registered an uninstall path with Windows, then having apps on an external drive will cause problems when Windows changes the drive latter, which it does annoyingly often. This tends to be less of a problem with true shared folders since they tend to be permanently online - so are unlikely to have a drive letter change, and actually don't need a drive letter at all (you can use UNC paths, i.e. \\hostname\\path\file.
science2002
Posts: 36
Joined: 4. Jan 2021, 01:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Win10, WinXP, Android

Re: Plus and minus of installing and running apps to and from a shared folder

Post by science2002 »

mpack wrote: then having apps on an external drive will cause problems when Windows changes the drive latter, which is does annoyingly often.
I am aware of the problem, but I never had an issue with it. I do not have (obviously) an infinite number of external drives. So the first time I insert them to a pc I am used to force the change drive letter (in disk management) assigning one predetermined letter at each of them. Windows (from Xp to v.10) remembers the letter of each disk any subsequent time.
Other strategy could be to run the command

Code: Select all

subst %Letter_drive%: "%Folder_path_that_you_want_to_turn_into_a_Letter_drive%"
that turns - maps to be precise - any given (in this case external) folder to a given (in this case predetermined) drive letter.
As you said, with shared folders in VB probably this "letter" problem is even less troublesome.
Post Reply