VirtualBox shared folder setup

来源:互联网 发布:尔雅挂科软件 编辑:程序博客网 时间:2024/05/19 00:15

As I always forgot how to do it, now let me write it down.

==

Host machine is Windows. Guest machine is Ubuntu (very old version).


1, On host machine, choose a folder to share with guest machine.

This is done through Oracle VM VirtualBox Manager -- Settings -- Shared Folders. Then set Folder Path and Folder Name in local disk.

Assume I select some local directory and set is Folder Name as "my_vbox".


2, On guest machine, create a folder to be used as shared folder (or just use an existing one, but make sure that it is a folder own by current login user. Normally you should not worry about this, as it does not make much sense for you to use other user's folder to share with your host machine.)

Assume I create one folder "myshared"  in my home directory whose path can be represented as "~/myshared".


3, On guest machine, mount the host machine's folder on the guest machine's folder, the folder just created.

sudo mount -t vbox my_vbox ~/myshared/


That is it. Once you log in your guest machine, you should be able see the files you put in folder "my_vbox" of host machine, through opening the folder "~/myshared" of guest machine.

Note that, on the guest machine, the owner of the shared folder is important. E.g., if you use a folder own by other user or group (which is not current log in user), you will get access issue with opening this shared folder (possible error message: You do not have the permissions necessary to view the contents of ...). So in my example, I created the shared folder "~/myshared" with current login user, so I have not issue of using this folder with my login user.


0 0
原创粉丝点击