How To Share Folders Between Virtualbox Host And Guest Virtual Machine

This article will tell you how to share folders between VirtualBox Host and Guest virtual machines to copy files between the 2 machine OS. The host OS is Windows10, and the guest OS can be Windows10 & macOS.

1. Prerequisites For Share Folders Between Host & Guest Virtual Machine.

1.1 Make Host & Guest OS Use Bridged Adapter.

  1. Before you can share folders between host & guest virtual machine, you should first make sure your virtual machine network adapter is bridged adapter, this can make the host & guest virtual machine’s IP exist in the same subnetwork.
  2. Shut down the VirtualBox virtual machine.
  3. Select the virtual machine in the Oracle VM VirtualBox Manager window left panel.
  4. Right-click the virtual machine, click the Settings menu item in the popup menu list to open the virtual machine’s Settings window.
  5. Click the Network item on the Settings window left panel.
  6. Click the Adapter 1 tab on the right side Network panel.
  7. Make sure to check the Enable Network Adapter checkbox.
  8. Select the Bridged Adapter item from the Attached to drop-down list.
  9. Click the OK button to save the changes.
  10. Start the virtual machine.
  11. Open a terminal window and run the command ipconfig (Windows) or ifconfig (macOS or Linux ) in both the Host & Guest virtual machine, you will find the 2 virtual machine’s IPs are in the same subnetwork.
    C:\Users\zhaosong>ipconfig
    
    Windows IP Configuration
    
    Ethernet adapter VirtualBox Host-Only Network:
    
       Connection-specific DNS Suffix  . :
       Link-local IPv6 Address . . . . . : fe80::5dcc:84ca:af3d:7e36%17
       IPv4 Address. . . . . . . . . . . : 192.168.56.1
       Subnet Mask . . . . . . . . . . . : 255.255.255.0
       Default Gateway . . . . . . . . . :

1.2 Make Sure The Host & Guest OS Can Ping Each Other.

  1. But when you ping one virtual machine’s IP from another virtual machine, you may find that the 2 virtual machines can not ping each other.
  2. This is because the virtual machine’s Firewall is enabled, so you should turn off the virtual machine’s Firewall.
  3. For Windows, you can click the Windows Start icon —> Settings menu at the Windows screen bottom left corner.
  4. Input the keyword firewall in the Find a setting input text box.
  5. Click the Windows Defender Firewall in the popup item list, it will popup the Windows Defender Firewall dialog window.
  6. Click the Turn Windows Defender Firewall on or off link on the left side.
  7. Click the Turn off Windows Defender Firewall radio button in the Private network settings area.
  8. Now you can ping the virtual machine from another virtual machine.

2. Share Folders Between Host ( Windows10) & Guest (Windows 10).

2.1 Share Guest Windows Folder.

  1. Open a Windows Explorer in the Host virtual machine.
  2. Right-click the Network item on the Windows Explorer window left side.
  3. Click the Properties item in the popup menu list, it will open the Network and Sharing Centre window.
  4. Click the Change advanced sharing settings link in the popup window left side.
  5. Click the radio button Turn on network discovery and Turn on file and printer sharing to select them.
  6. Now go to the guest virtual machine and right-click the folder that you want to share.
  7. Click the Properties menu item in the popup menu list to open the folder’s Properties window.
  8. Click the Sharing tab on the Properties window.
  9. Then click the Share… button to open the Network access window.
  10. Click the drop-down list to select an existing user or create a new user.
  11. Then click the Add button to add the user to the list, and click the Done button in the next windows dialog.
  12. Now when you click the Network item in the Host machine’s Windows Explorer, you can find the Guest virtual machine on the right side.
  13. When you click the Guest virtual machine for the first time, you need to provide the username and password to log in to it.
  14. After you successfully log in to the guest virtual machine, you can find the guest VM shared folders and copy the files between the Host and the Guest virtual machine.
  15. You can also open a windows file explorer on the host machine and input the guest virtual machine’s IP address in starts with \\ ( for example \\192.168.31.172 ) in the file explorer address input box, then press the enter key.

2.2 Share Host Windows Folder Use The Virtual Machine’s Shared Folders Feature.

  1. You can also use the method in section 2.1 to share the host machine’s folder with the guest virtual machine.
  2. You can also use the virtual machine’s Shared Folders feature to share the host folder with the guest folder.
  3. Shut down the guest virtual machine.
  4. Right-click the virtual machine on VirtualBox Manager’s left side.
  5. Click the Settings… menu item on the popup menu list to open the virtual machine’s Settings dialog window.
  6. Click the Shared Folders item on the Settings window left side.
  7. Click the Machine Folders item on the right side.
  8. Then click the Add button to open the Add Share dialog.
  9. Select the shared folder from the Folder Path drop-down list.
  10. You can set the shared folder permission as read-only by checking the Read-only checkbox.
  11. Click the OK button to save the changes.
  12. Now in the guest windows virtual machine, open a file explorer, click the Network icon on the left side, click the host machine, and then you can see the shared folder you just configured.

3. Share Folders Between Host ( Windows10) & Guest ( macOS ).

3.1 Share The Guest ( macOS ) Folder.

  1. On the guest macOS virtual machine, click the Apple logo —> System Preferences… menu item on the screen top left corner.
  2. Then click the Sharing icon in the popup System Preferences window.
  3. Check the File Sharing checkbox in the left Service list.
  4. Click the + icon on the right side Shared Folders list to select the folder that you want to share.
  5. Then you can assign the user permission to this folder on the Users list besides the Shared Folders list.
  6. Click the Options… button, then you can choose whether share this folder through SMB or AFP protocol.
  7. After your configuration, you can go back to your host machine and open a file explorer window, input the macOS IP starts with \\ ( for example: \\192.168.31.191), press the enter key.
  8. Now it will popup a dialog to let you input the username and password to login.
  9. After you successfully login, you can see the shared folder in it.
  10. Now you can transfer files between the Windows10 (host) & macOS ( guest ).

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Clicky