I’m testing the “Hyper-V Quick Create” version of Ubuntu 18.04 under Windows 10 Pro joined to a Windows domain. Had some difficulty at first connecting to a share on a Windows 2016 server. A few notes:
On Windows 10, the Hyper-V Default Virtual Switch is set up as an Internal Network, meaning it will have a different IP range than your host network. However, it also automatically sets up NAT rules to all allow connection to the host network.
DNS of the Ubuntu guest machine will point to the virtual switch, not to your domain controller.
There is no suffix automatically appended to DNS queries. If you
dig MyWinServer, the query fails. However dig
In spite of that, if you try to mount a share using the MyWinServer.mydomain.local name, it will fail with the message “Unable to access location: Failed to mount Windows share: Invalid argument.”
I wound up using the IP address of the Windows server, in the format smb://192.168.120.2/ShareName:
You’ll know it’s working when you get this prompt:
I found that the I could specify the Domain without the “.local” suffix.
Choosing Remember forever here adds the password to your default keyring (which will prompt for a new password if it’s the first time you’ve added a key). To edit or delete the password, open the Applications list, search for Passwords and Keys, then edit the Default keyring:
To see the current NAT sessions, use PowerShell
Get-NetNatSession on the Hyper-V host. Here we see a connection on port 80 to a Google Cloud server (although no browser is open in the guest) as well as the SMB connection on port 445 to my Windows server: