VisualBox中linux和windows共享文件设置
===> 需要安装扩展包 Oracle VM VirtualBox Extension Pack
1.在VisualBox工程上的配置明细上选择最后一项《数据空间》然后,指定一个windows目录作为共享目录;
2.VisualBox必须安装增强功能,点击菜单栏的设备->安装增强功能,在桌面上出现VisualBox的安装目录;
拷贝其中的forlinux版本,然后在命令终端运行 sh ./xxxxx.
[img]http://dl.iteye.com/upload/attachment/0078/4078/7690a72c-9947-32dd-bbe0-4132bcdfb33f.png[/img]
3.创建目录,然后作映射
# mkdir /mnt/share
# mount -t vboxsf [b]winshare[/b] /mnt/share winshare 是windows共享目录另给的名称
如果想不用每次都手动挂载,则可以在/etc/fstab中添加一项
[b]winshare[/b] /mnt/share vboxsf rw,gid=100,uid=1000,auto 0 0
这样就可以自动挂载了。
卸载的话,sudo umount -f /mnt/share
注意:
共享文件夹的名称千万不要和挂载点的名称相同。比如,上面的挂载点是/mnt/shared,如果共享文件夹的名字也是shared的话,在挂载的时候就会出现如下的错误信息(看http://www.virtualbox.org/ticket/2265):/sbin/mount.vboxsf: mounting failed with the error: Protocol error
原因分析可以看Tips on running Sun Virtualbox的Shared Folder on a Linux Guest节。
===> 需要安装扩展包 Oracle VM VirtualBox Extension Pack
1.在VisualBox工程上的配置明细上选择最后一项《数据空间》然后,指定一个windows目录作为共享目录;
2.VisualBox必须安装增强功能,点击菜单栏的设备->安装增强功能,在桌面上出现VisualBox的安装目录;
拷贝其中的forlinux版本,然后在命令终端运行 sh ./xxxxx.
[img]http://dl.iteye.com/upload/attachment/0078/4078/7690a72c-9947-32dd-bbe0-4132bcdfb33f.png[/img]
3.创建目录,然后作映射
# mkdir /mnt/share
# mount -t vboxsf [b]winshare[/b] /mnt/share winshare 是windows共享目录另给的名称
如果想不用每次都手动挂载,则可以在/etc/fstab中添加一项
[b]winshare[/b] /mnt/share vboxsf rw,gid=100,uid=1000,auto 0 0
这样就可以自动挂载了。
卸载的话,sudo umount -f /mnt/share
注意:
共享文件夹的名称千万不要和挂载点的名称相同。比如,上面的挂载点是/mnt/shared,如果共享文件夹的名字也是shared的话,在挂载的时候就会出现如下的错误信息(看http://www.virtualbox.org/ticket/2265):/sbin/mount.vboxsf: mounting failed with the error: Protocol error
原因分析可以看Tips on running Sun Virtualbox的Shared Folder on a Linux Guest节。