Virtual Box 上 MacOSX 和 Windows 之间的共享文件夹
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/27355688/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Shared folder between MacOSX and Windows on Virtual Box
提问by ServerSideCat
I need to set up shared folder.
我需要设置共享文件夹。
I've got Mac OSX Yosemite host and clean Win7 x64 on the VirtualBox.
我在 VirtualBox 上安装了 Mac OSX Yosemite 主机和干净的 Win7 x64。
In MacOSX, i go to the VirtualBox -> win7 settings -> "Shared Folders" -> Add shared folder -> creating folder /Users/my_name/Documents/win7 -> Make it permanent -> Click ok.
在 MacOSX 中,我转到 VirtualBox -> win7 设置 -> “共享文件夹” -> 添加共享文件夹 -> 创建文件夹 /Users/my_name/Documents/win7 -> 使其永久 -> 单击确定。
What i should do in Windows then?
那么我应该在 Windows 中做什么?
Thank you.
谢谢你。
回答by xinampc
Edit
编辑
4+ years later after the original reply in 2015, virtualbox.org now offers an official user manual in both htmland pdfformats, which effectively deprecates the previous version of this answer:
在 2015 年的原始回复之后 4 年多之后,virtualbox.org 现在提供html和pdf格式的官方用户手册,这有效地弃用了此答案的先前版本:
- Step 3 (Guest Additions) mentioned in this response as well as several others, is discussed in great detail in manual sections 4.1and 4.2
- Step 1 (Shared Folders Setting in VirtualBox Manager) is discussed in section 4.3
Original Answer
原答案
Because there isn't an official answer yet and I literally just did this for my OS X/WinXP install, here's what I did:
因为还没有正式的答案,而且我实际上只是为我的 OS X/WinXP 安装做了这个,所以我做了以下事情:
- VirtualBox Manager: Open the Shared Folders setting and click the '+' icon to add a new folder. Then, populate the Folder Path (or use the drop-down to navigate) with the folder you want shared and make sure "Auto-Mount" and "Make Permanent" are checked.
- Boot Windows
- Once Windows is running, goto the Devices menu (at the top of the VirtualBox Manager window) and select "Insert Guest Additions CD Image...". Cycle through the prompts and once you finish installing, let it reboot.
- After Windows reboots, your new drive should show up as a Network Drive in Windows Explorer.
- VirtualBox Manager:打开共享文件夹设置并单击“+”图标以添加新文件夹。然后,使用您要共享的文件夹填充文件夹路径(或使用下拉菜单进行导航),并确保选中“自动挂载”和“永久设置”。
- 启动 Windows
- Windows 运行后,转到“设备”菜单(位于 VirtualBox 管理器窗口的顶部)并选择“插入 Guest Additions CD 映像...”。循环显示提示,完成安装后,让它重新启动。
- Windows 重新启动后,您的新驱动器应在 Windows 资源管理器中显示为网络驱动器。
Hope that helps.
希望有帮助。
回答by lu_ko
You should map your virtual network drive in Windows.
您应该在 Windows 中映射您的虚拟网络驱动器。
- Open command prompt in Windows (VirtualBox)
- Execute:
net use x: \\vboxsvr\<your_shared_folder_name>
- You should see new drive
X:
inMy Computer
- 在 Windows (VirtualBox) 中打开命令提示符
- 执行:
net use x: \\vboxsvr\<your_shared_folder_name>
- 您应该看到新的驱动器
X:
中My Computer
In your case execute net use x: \\vboxsvr\win7
在你的情况下执行 net use x: \\vboxsvr\win7
回答by Alexander Turinske
Using a Windows 10 guest, after I performed steps 1 through 3 from @xinampc's answer, I had to open a new File Explorer and navigated to This PC > CD Drive (D:) VirtualBox Guest Additions to run VBoxWindowsAdditions. After I ran that and went through the command prompts, Windows rebooted and I was able to see VBOXSVR under Network.
使用 Windows 10 来宾,在我执行@xinampc 回答中的步骤 1 到 3 后,我必须打开一个新的文件资源管理器并导航到此 PC > CD 驱动器 (D:) VirtualBox Guest Additions 以运行 VBoxWindowsAdditions。在我运行它并通过命令提示符后,Windows 重新启动,我能够在网络下看到 VBOXSVR。
回答by KPandian
I had the exact same issue, after rightly have configured in Mac OSX host a SharedFolder with Auto-Mount enabled. On the Guest OS, it is also required to install VirtualBox Guest Additions. For the case of Windows, it is:
我遇到了完全相同的问题,在 Mac OSX 主机中正确配置了启用自动挂载的 SharedFolder 之后。在 Guest OS 上,还需要安装 VirtualBox Guest Additions。对于 Windows,它是:
VBoxWindowsAdditions.exe
VBoxWindowsAdditions.exe
Right after this installation, i could perfectly view the shared folder content under This PCand Network("\VBOXSVR\Installers").
安装完成后,我可以完美地查看此PC和网络(“\VBOXSVR\Installers”)下的共享文件夹内容。
回答by August Mohr
At first I was stuck trying to figure out out to "insert" the Guest Additions CD image in Windows because I presumed it was a separate download that I would have to mount or somehow attach to the virtual CD drive. But just going through the Mac VirtualBox Devices menu and picking "Insert Guest Additions CD Image..." seemed to do the trick. Nothing to mount, nothing to "insert".
起初,我一直在想办法在 Windows 中“插入”Guest Additions CD 映像,因为我认为这是一个单独的下载,我必须安装或以某种方式附加到虚拟 CD 驱动器。但是只需通过 Mac VirtualBox 设备菜单并选择“插入访客添加 CD 映像...”似乎就可以解决问题。无需安装,无需“插入”。
Elsewhere I found that the Guest Additions update was part of the update package, so I guess the new VB found the new GA CD automatically when Windows went looking. I wish I had known that to start.
在其他地方,我发现 Guest Additions 更新是更新包的一部分,所以我猜新 VB 会在 Windows 查找时自动找到新的 GA CD。我希望我早知道这样开始。
Also, it appears that when I installed the Guest Additions on my Linked Base machine, it propagated to the other machines that were based on it. Sweet. Only one installation for multiple "machines".
此外,当我在我的 Linked Base 机器上安装 Guest Additions 时,它似乎会传播到基于它的其他机器。甜的。多台“机器”只需一个安装。
I still haven't found that documented, but it appears to be the case (probably I'm not looking for the right explanation terms because I don't already know the explanation). How that works should probably be a different thread.
我仍然没有找到记录,但似乎是这样(可能我没有在寻找正确的解释术语,因为我还不知道解释)。它的工作原理可能应该是一个不同的线程。
回答by peterDriscoll
Yesterday, I am able to share the folders from my host OS Macbook (high Sierra) to Guest OS Windows 10
昨天,我能够将我的主机操作系统 Macbook(high Sierra)中的文件夹共享到来宾操作系统 Windows 10
Original Answer
原答案
Because there isn't an official answer yet and I literally just did this for my OS X/WinXP install, here's what I did:
因为还没有正式的答案,而且我实际上只是为我的 OS X/WinXP 安装做了这个,所以我做了以下事情:
- VirtualBox Manager: Open the Shared Folders setting and click the '+' icon to add a new folder. Then, populate the Folder Path (or use the drop-down to navigate) with the folder you want shared and make sure "Auto-Mount" and "Make Permanent" are checked.
- Boot Windows
- Download the VBoxGuestAdditions_4.0.12.iso from http://download.virtualbox.org/virtualbox/4.0.12/
- Go to Devices > Optical drives > choose disk image.. choose the one downloaded in step 3
- Inside host guest OS (Windows 10, in my case) I could see: This PC > CD Drive (D:) Virtual Guest Additions
- VirtualBox Manager:打开共享文件夹设置并单击“+”图标以添加新文件夹。然后,使用您要共享的文件夹填充文件夹路径(或使用下拉菜单进行导航),并确保选中“自动挂载”和“永久设置”。
- 启动 Windows
- 从http://download.virtualbox.org/virtualbox/4.0.12/下载 VBoxGuestAdditions_4.0.12.iso
- 转到设备 > 光驱 > 选择磁盘映像.. 选择在步骤 3 中下载的那个
- 在主机来宾操作系统(在我的情况下为 Windows 10)中,我可以看到:此 PC > CD 驱动器 (D:) Virtual Guest Additions
For now, right click on it, select Properties, the Compatibility tab, and select Windows 8 compatibility there. Much easier than using the compatibility troubleshooting I did initially.
现在,右键单击它,选择属性,兼容性选项卡,然后在那里选择 Windows 8 兼容性。比使用我最初做的兼容性故障排除要容易得多。
- reboot the guest OS (Windows 10)
- Inside host guest OS, you could see the shared folder This PC> shared folder
- 重新启动来宾操作系统(Windows 10)
- 在主机来宾操作系统中,您可以看到共享文件夹 This PC> shared folder
It worked for me so I thought of sharing with everyone too.
它对我有用,所以我也想与大家分享。