Just installed Hyper-V on Windows 8 and Guest OS Ubuntu 12.04.

Coming from VirtualBox, I am looking for best method for sharing a Directory on Host/Windows with Guest Ubuntu.

I read this: https://stackoverflow.com/a/1386764/913295 and I am familiar with Samba. Since that question does not relate to Hyper-V I am raising this related question here.

  • Ubuntu 14.04 on Windows 8.1 operating system allows to browse folder. Oct 19 '15 at 16:57

Good question.

The bad news is that, unlike VirtualBox or VMWare that allows you to define "Shared Folders" which are directories on your host that are exposed to the guest, Windows 8 Hyper-V does not provide such feature at all.

The good news is that, since there is not such feature provided out of box from Hyper-V at all, there won't be necessary special purposed tools for it, e.g., for mounting vboxsf file systems. You just going through the official/standard way, accessing your host share folders as network shared folders.

The smbclient, the command-line SMB/CIFS clients for Unix, is the command-line tool to access to your Windows host share folders. Below are two examples that I found. Again, nothing special, access it the same way as you access any other Windows network shared folders.

How can I connect from Ubuntu 12.10 to file shares on a Windows 8 system

Perfect Ubuntu setup on Hyper-V in Windows 8

I'll repost the "Configure a shared folder" section from the second link:

We need to share out a folder in the host to the guest. Guest can mount this on boot. For this tutorial, I’ll assume we are sharing it from a this location %USERPROFILE%\workspace

In the VM, edit the /etc/fstab:

//WinHost/users/username/workspace /home/username/workspace  cifs    defaults,soft,uid=username,gid=users,file_mode=0777,dir_mode=0777,credentials=/home/username/.cifs-credentials,soft

Also, add a credentials file for the mount to work. Put the following content in there:


That should be it.

More references for GUI based mounting:


If it doesn't work for you at first, try with a Windows based client first to access the host share folders. Again, nothing special, access it the same way as you access any other Windows network shared folders. I.e., some how-tos says that you "must have Created Internal Virtual Switch Via Virtual Switch Manager" to use the host share, that is purely not necessary and it gives you no benefits/advantages at all, since we are just accessing it as a normal Windows network shared folder. To recap, here are the steps:

  1. On your Hyper-V host, create a shared folder and assign Change permission to Everyone.

  2. On the virtual machine running on the host, open the Network and Sharing Center and enable File and Printer Sharing.

  3. On the virtual machine, click Start and type \\host_name\share_name where host_name is the name of your Hyper-V host and share_name is the name of the share you created.

  4. Press ENTER and an Explorer window will open in the VM showing the contents of the shared folder on the host.

  5. You can now copy files from the VM to the host and vice versa as needed.



How to share files between a Hyper-V host and its virtual machines

  • There are lots of things smbclient or smbtree can go wrong, and there are lots of articles troubleshooting them as well. This is not a Hyper-V question thus not the proper place to ask. Open a new question, and be sure to mention you are using a client within Hyper-V. Otherwise, people will be misleaded too.
    – xpt
    May 26 '15 at 17:55
  • Any idea why on Debian inside Hyper-V smbtree fails to show the host system's shares. Doing smbclient --list=<COMPUTER_NAME> --workgroupd=WORKGROUP --user=<username> works but also throws Error NT_STATUS_IO_TIMEOUT and NetBIOS over TCP disabled -- no workgroup available?. Note the host's shares are accessible from another windows machine. May 29 '15 at 3:16
  • The big advantage of vboxsf is that you could re-use same drive, no need to copy things around. I share my home folder and since my build directory is there I can use to build tools inside the VM. VirtualBox however is broken in Windows10 and HyperV seems like a good software also for this use case.
    – dashesy
    Dec 30 '16 at 22:39

The answer for Windows 8 and Ubuntu 14.04 or 14.10 seems to be a bit different.

When I click on the Files icon in the taskbar, it allows one to browse the network; the host machine is listed as a machine on the network. Clicking on the host machine opens up a dialog box where it demands a password. It took me a while to find the right combination of entries in the dialog which work.

The dialog shows values for User and Password. The User value is prefilled with the account name you created on Ubuntu. This is probably NOT what you want. Take a look at the C:\Users folder on your Windows system. Whatever name has been used for that folder which contains your personal Windows files (and a lot more) is the name you want to plug into the Ubuntu dialog box. Then enter your Windows sign-in password into the password field.

After your password has been accepted, you will be able to navigate to your files in the C:\Users folder and have full access to them. Access to other files and folders depends on the Windows permissions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.