Virtual Machine (VirtualBox) -- How to access files from the hosting machine?

27

8

I have a PC with Windows 7 Ultimate (A) running on it. From within that OS I have VirtualBox running another Windows 7 instance (B).

Is there any way for the Windows 7 (B) to access files from Windows 7 (A)? Ideally I'd like to be able to access them without having to copy them into the VM instance running because I don't have a big enough hard drive to do so... The hard drive has a folder with 1.5 TB of data (on a 2 TB hard drive), so copying it to a VM instance just wouldn't work.

m-y

Posted 2012-01-24T02:01:51.947

Reputation: 1 127

Note also a troubleshooting step: make sure that the files are accessible from the host operating system with the correct access-control settings for read-write-execute. – dreftymac – 2015-11-04T11:13:42.310

Answers

29

There are several ways to accomplish this.

You can use VBox's own Shared folders feature.

For this: Go to Settings of the Virtual Machine and then select: Shared Folders.

Click on Add Shared Folder button. Specify folder path and folder name.

In Virtual Machine you go to \\vboxsrv\

you would see your folders.

You can also Create a network share and access that share from within B to A.

bakytn

Posted 2012-01-24T02:01:51.947

Reputation: 1 537

Will either of these need to do a copy of the file (even if into a temporary folder) to utilize it? I know network shares across different machines work like this... I never did a network share on the same machine.

Also, same goes for the shared folder (is that a situation where the file gets copied to be used)? – m-y – 2012-01-24T02:16:49.863

No. It will not copy your files. That's why it's called Shared Folder – bakytn – 2012-01-24T02:18:08.617

Once this works you'll get the checkmark :) – m-y – 2012-01-24T02:21:11.400

Using the second approach is more harder though. You would need to play with Networking (like change network attachment to Bridged) etc. The first and most obvious way must solve your problem perfectly. – bakytn – 2012-01-24T02:21:41.027

1

myermian, just in case it will not work. Probably you would need to install Extenstion Pack from official downloads page: https://www.virtualbox.org/wiki/Downloads download it. And then just double click on it.

– bakytn – 2012-01-24T02:23:56.000

7

I assume you have your VM up and running. Follow these steps:

  1. On the VM window, Go to Tools -> Insert Guest additions CD Image. enter image description here

  2. You'll see a new CD drive in My computer. open it and start "VBoxWindowsAdditions"enter image description here

  3. Follow setup to install guest addition on the Guest machine. Reboot the guest.
  4. Next, open VM settings:enter image description here
  5. Go to Shared Folders -> right click -> add shared folder -> add the folder you want to share: enter image description here
  6. Your shared folder will appear under My Computer in the guest machine.

You can follow similar method for other operating systems too.

kBisla

Posted 2012-01-24T02:01:51.947

Reputation: 380

this is brilliant! I hadn't realised that I needed to restart the VM which is why I was having so many problems, thanks – Philip Eagles – 2017-03-18T07:27:53.583

2

Another option is just to copy files:

Select Virtual Machine and go to Settings - General - Advanced, there you can configure Shared clipboard and Drag'n'Drop support. I selected Bidirectional option for both.

Now you can drag-drop files between Host and Guest, also you can copy text in Host machine and Paste it on Guest VM (and vice-versa)

MyTitle

Posted 2012-01-24T02:01:51.947

Reputation: 157

This technique doesn't work with really large files. But works fine for smaller ones. – burns – 2016-02-06T18:44:30.080

-1

The most simple way is to use USB Flash Memory:

1- Connect your USB Flash Memory to your computer.

2- Your flash memory should get recognized to your virtual machine in:

Setting > USB > Add new USB

3- Run your VB machine and go to removable drive as usual and explore your files.

Sushiant

Posted 2012-01-24T02:01:51.947

Reputation: 1

Again, please be aware you have posted an answer to a question that is very old and has an accepted answer. There is nothing wrong with doing this, but I hate to see you waste your time answering questions you may get not increase in reputation. You may want to focus on more recent questions. – CharlieRB – 2016-04-08T17:41:03.377