Accessing files on host

Discussions related to using VirtualBox on Windows hosts.
Post Reply
VBnovice
Posts: 37
Joined: 28. May 2010, 06:47
Primary OS: MS Windows 10
VBox Version: OSE Debian
Guest OSses: XP

Accessing files on host

Post by VBnovice »

Please forgive me the very basic questions. I did search on google and in this forum but am still not clear.

I setup Windows XP Pro as a virtual machine in VB. The host is Windows 10. Guest additions installed. I can now access the host's CD drive fine. But I have some problems I really need help with:

1. I cannot figure out how to access folders on the host. I "shared" a host folder in Windows 10, but I don't know how to see the shared folder or access its files from within the virtual machine. How do I make that possible?

2. Within VB, I have biderectional selected for both "shared clipboard" and "drag and drop". But neither one works. What am I doing wrong?

3. Can a shortcut be placed on the Windows 10 desktop that would open an application installed in the virtual image? I know I can create a shortcut for the virtual machine itself, but can I do the same for a program installed in the virtual machine?

4. Any way to speed up how fast VB restores the XP image?

Thank you for any advice.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Accessing files on host

Post by mpack »

First a warning: it is a good thing that accessing host folders from inside a VM is difficult. You don't want to give a VM free access to the host. You probably know this, my eyebrows just got raised by the implication of your point (1), that you wanted to access host folders, i.e. plural. It's best IMHO to share a single folder and to treat everything in that folder as suspect. So it's ok to copy stuff into that folder from the host, less ok to copy stuff out or to run executables from that folder on the host.

To clarify, you said that you shared a host folder "in Windows 10". You mean that you designated a shared folder in the VirtualBox VM settings, shared folder section right? So this was not done using a Win10 feature.

If so, let's answer your question. In the XP guest open a file explorer window (e.g. right click on start button, choose "Explore"). In the "Folders" pane navigate to "My Network Places" | "Entire Network" | "VirtualBox Shared Folders" | \\Vboxsvr | <\\VBOXSVR\<your share name>>. You can either do it this way every time, or to save time in future then after you get to the folder choose "Tools|Map network drive..." from the XP file explorer menu, and assign a pretend drive letter to this folder. From then on the contents of the folder will be viewable as a simulated drive. Note that the latter is a standard Windows feature, this is not a VirtualBox simulation.

Some things don't work very well from shared folders. They are best used to copy files into and out of a VM. If you want to run a program that processes files, or if you want to execute a program then it's better to copy <whatever> into a nonshared folder inside the VM. E.g. if it's an installer exe you downloaded from somewhere then copy the exe into the VM desktop before running it.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Accessing files on host

Post by mpack »

p.s. Shared folders is an entirely separate feature from the clipboard, and both are entirely separate from "drag and drop". One subject per topic, so I won't deal with the latter two here. Suffice to say that the clipboard can't be used to copy files, and I find that "drag and drop" breaks a lot, so I rarely bother trying it.
VBnovice
Posts: 37
Joined: 28. May 2010, 06:47
Primary OS: MS Windows 10
VBox Version: OSE Debian
Guest OSses: XP

Re: Accessing files on host

Post by VBnovice »

Thank you so much for replying.

Allow me to give you some background. This is not my PC. I am setting up a Windows 10 PC for a person with cerebral palsy who uses it for playing games. It's her main entertainement so it is all important to her. So, my need to access files from the host is only during the computer setup to copy over certain files from the (one) shared folder to a folder within the XP imaged machine and install from there. I'm just started doing this setup and am not accustomed to VB. I have not yet tried to see if the virtual machine can access files from a USB drive. Can it? That would make things even easier for me.

Now, on the Windows 10 desktop there will be desktop shortcuts for her to start games and apps that work in Windows 10. But, there are some favorite old games that I can only install in XP (they have 16 bit setup files). These are the ones I am installing in the XP image. For her to access these games I know I can put a shortcut on the Windows 10 desktop that will start up the XP image and from there she could click on the appropriate XP desktop shortcuts. But it would be nicer for her (if it is possible) for me to put "shortcuts" on her Windows 10 desktop pointing - not to the main VB image - but to each specific game installed in XP, so that clicking on that W10 shortcut will open that game in the XP VM instead of first showing the XP desktop. If that is not possible I'll just use the shortcut which opens the XP VM. The problem I see with that is that she now needs to learn how to "close" the XP VM so as to get back to the games on her W10 desktop. I hope I am somewhat clear.

I have other options which would be to put the XP VM shortcut in the W 10 startup folder so that when the pc boots up the VM will already be open on her desktop. She has a 24 inch monitor so I would also place the VM window to one side of her W10 desktop and arrange all her W10 shortcuts in the area not covered by the VM window. Downside being the cost of memory. She has 8GB ram

If you can think of a simpler way to do things, I am all ears. :)

Thanks.
VBnovice
Posts: 37
Joined: 28. May 2010, 06:47
Primary OS: MS Windows 10
VBox Version: OSE Debian
Guest OSses: XP

Re: Accessing files on host

Post by VBnovice »

mpack wrote:p.s. Shared folders is an entirely separate feature from the clipboard, and both are entirely separate from "drag and drop". One subject per topic, so I won't deal with the latter two here. Suffice to say that the clipboard can't be used to copy files, and I find that "drag and drop" breaks a lot, so I rarely bother trying it.
Thanks. Then I do not need them either.
VBnovice
Posts: 37
Joined: 28. May 2010, 06:47
Primary OS: MS Windows 10
VBox Version: OSE Debian
Guest OSses: XP

Re: Accessing files on host

Post by VBnovice »

I tried to access the PC's usb from within the VM and could not. What do I need to do to make it available.

Essentially I just need to transfer some files into the XP VM so I can use them there.
VBnovice
Posts: 37
Joined: 28. May 2010, 06:47
Primary OS: MS Windows 10
VBox Version: OSE Debian
Guest OSses: XP

Re: Accessing files on host

Post by VBnovice »

Looks like mpack left me or is offline. Fortunately I found my answers:

1. To set up and mount a shared folder
https://www.htpcbeginner.com/setup-virt ... x-windows/

2. To access it in the Windows XP VM
http://www.giannistsakiris.com/2007/09/ ... -guest-os/
(apparently it is different in Windows XP because of a bug)

Now I can finally access and transfer files I need from the Windows 10 host to the XP VM. :D

I now have to get access to the usb inserted on the host machine.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Accessing files on host

Post by mpack »

We would prefer that you did not reference offsite blogs from here. Those are not the definitive reference, we and the user manual are.

Setting up Shared Folders is discussed in user manual, as is USB. Shared folders is trivially easy to configure, but USB can be tricky. Thats why the latter subject has a tutorial on this forum.
VBnovice
Posts: 37
Joined: 28. May 2010, 06:47
Primary OS: MS Windows 10
VBox Version: OSE Debian
Guest OSses: XP

Re: Accessing files on host

Post by VBnovice »

mpack wrote:We would prefer that you did not reference offsite blogs from here. Those are not the definitive reference, we and the user manual are.

Setting up Shared Folders is discussed in user manual, as is USB. Shared folders is trivially easy to configure, but USB can be tricky. Thats why the latter subject has a tutorial on this forum.
I was not aware of that preference. I apologize. I meant no harm. Just trying to figure things out and perhaps help someone else.

I appreciate the links you provided and will read them carefully. It's just so much to absorb and understand and I may even be asking the wrong questions. I am an elderly volunteer and not a computer techie.

What I am really trying to do is install old programs and utilities into the Windows XP Virtual image. I found that I could install programs if the files are on an install CD. But how do I install utilities and tools if their exe files are in a folder in a host file. Even though I can now access shared folders I still cannot copy actual files into a folder on the vm itself. I need to do that with some data files.

Simple things can be confusing to a newbie. Will runing an install file in a shared folder install that program in the vm or in the host system? I just don't want to mess her pc due to my misunderstanding of how a vm works.

For instance you say "Shared folders is trivially easy to configure" and they are (once I found out how). But it took me 2 days and many hours just to figure out the "how". ;)
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Accessing files on host

Post by mpack »

VBnovice wrote: Even though I can now access shared folders I still cannot copy actual files into a folder on the vm itself. I need to do that with some data files.
I think I dealt with that in my first reply (3rd para). If you have access to a host folder then on the host you copy wanted files into that folder. In the guest you navigate to the folder as seen by the guest (I gave detailed instructions above), then copy the files out and to their proper place inside the guest.
VBnovice
Posts: 37
Joined: 28. May 2010, 06:47
Primary OS: MS Windows 10
VBox Version: OSE Debian
Guest OSses: XP

Re: Accessing files on host

Post by VBnovice »

Thank you. I forgot that.
Post Reply