Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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: and I am familiar with Samba. Since that question does not relate to Hyper-V I am raising this related question here.

share|improve this question

migrated from Jan 11 '13 at 14:57

This question came from our site for professional and enthusiast programmers.

2 Answers 2

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

share|improve this answer
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 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. –  Daniel Sokolowski May 29 at 3:16

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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