Sun Microsystems 3.0.0 user manual A Solaris guest, use the following command

Models: 3.0.0

1 259
Download 259 pages 49.67 Kb
Page 69
Image 69

4 Guest Additions

VBoxManage sharedfolder add "VM name"

--name "sharename" --hostpath "C:\test"

There are two types of shares:

1.VM shares which are only available to the VM for which they have been defined;

2.transient VM shares, which can be added and removed at runtime and do not persist after a VM has stopped; for these, add the --transient option to the above command line.

Shared folders have read/write access to the files at the host path by default. To restrict the guest to have read-only access, create a read-only shared folder. This can either be achieved using the GUI or by appending the parameter --readonly when creating the shared folder with VBoxManage.

Then, you can mount the shared folder from inside a VM the same way as you would mount an ordinary network share:

In a Windows guest, starting with VirtualBox 1.5.0, shared folders are browseable and are therefore visible in Windows Explorer. So, to attach the host’s shared folder to your Windows guest, open Windows Explorer and look for it under “My Networking Places” -> “Entire Network” -> “VirtualBox Shared Folders”. By right-clicking on a shared folder and selecting “Map network drive” from the menu that pops up, you can assign a drive letter to that shared folder.

Alternatively, on the Windows command line, use the following:

net use x: \\vboxsvr\sharename

While vboxsvr is a fixed name (note that vboxsrv would also work), replace “x:“ with the drive letter that you want to use for the share, and sharename with the share name specified with VBoxManage.

In a Linux guest, use the following command:

mount -t vboxsf [-o OPTIONS] sharename mountpoint

In a Solaris guest, use the following command:

mount -F vboxfs [-o OPTIONS] sharename mountpoint

Replace sharename (use lowercase) with the share name specified with VBoxManage or the GUI, and mountpoint with the path where you want the share to be mounted on the guest (e.g. /mnt/share). The usual mount rules apply, that is, create this directory first if it does not exist yet.

Here is an example of mounting the shared folder for the user “jack” on Open- Solaris:

69

Page 69
Image 69
Sun Microsystems 3.0.0 user manual A Solaris guest, use the following command