Shared folder between hypervisor host, and ubuntu guest

I have a windows 2012 server that is running HyperVisor.  I have a number of VM's on the host.  I am trying to get an Ubuntu 12.04-64bit server install to be able to share a folder with either a network drive, as I have seen done here, and there, or the Host machine itself.  In a perfect world there is an easy way to get a file/folder/partition to be shared to the hosted ubuntu server, that can then be mounted, and accessible to the ubuntu server.  

Going through a network drive is an acceptable answer, but not entirely sure how to get it to mount on bootup of the ubuntu device, and if they can even talk to each other, or if other packages need to be installed.
IllyankeshAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Andrew Hancock (VMware vExpert / EE MVE^2)Connect With a Mentor VMware and Virtualization ConsultantCommented:
You can use an IP Address for testing, if your Ubuntu Server is not setup for DNS or WINs, and cannot resolve Windows Machine Names.

UNC is usually

\\<servername>\<folder share>

or

\\<ip address>\<folder share>
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Shared Folders is a feature of VMware Workstation, VMware Player and Oracle Virtualbox.

Shared Folders is not a feature of Corporate Hypervisors, such as VMware vSphere of Microsoft Hyper-V.

You would have to use normal networking shares and features, e.g. SMB/SAMBA shares.
0
 
IllyankeshAuthor Commented:
Figured as much.

So moving forward I install samba onto the linux server

sudo apt-get install smbclient smbfs

That completed successfully, but now I cannot grep for samba, smbd, and cannot start the service, or restart it.  I have rebooted the machine, and tried

sudo service smbd start, stop, restart... and I get unrecognized service.

also, /etc/init.d/samba start, stop, restart also fails...
0
Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

 
IllyankeshAuthor Commented:
Not sure about the above problem...

But moved forward trying to mount the shared folder.   I created the shared folder on the windows server, and opened up the samba ports in the windows firewall 445, 139 both directions.

sudo mkdir /media/example

Now I run

sudo mount -t cifs -o username=dood,password=test123 //servername/folder /media/example
could not resolve address fo server unknown error

Its a windows folder so I changed the hash

sudo mount -t cifs -o username=dood,password=test123 \\servername\folder /media/example
 and now I get
and I get bad UNC (\servername\folder)

Silly question.
Should the user I am attempting to connect as also have an account on the windows machine that is then allowed to share/access that shared folder/file?
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Yes! The user must have share and security permissions.
0
 
IllyankeshAuthor Commented:
Alright created user on windows with password, and gave that user Read/Write permissions to the desired shared folder.  I made the username password change to reflect the user I had added, and ran the command again.

I am still getting the bad UNC (\SERVERnamesharedfolder)  does there need to be an ip address in there?

I am trying to mount the shared windows folder onto the ubuntu server

I do not have active directory setup as that will cause all kinds of havoc, I do have a workgroup setup though...
0
 
IllyankeshAuthor Commented:
If I attempt manual connection/listing I get...

smbclient -L workgroup -U user

Connection to workgroup failed (error_status_bad_network_name)

if I run

sudo smbclient -L workgroup -U user....     I get....

Unable to create directory /var/run/samba for file gencache.tdb.   Error wa no such file or directory  Connection to workgroup failed (Error NT_status_bad_network_name)
0
 
IllyankeshAuthor Commented:
smbclient \\10.1.10.29\folder user%password     gave me
session setup failed: NT_STATUS_LOGON_FAILURE

smbclient //10.1.10.29/folder user%password   gave me  Not enough \ characters in service


sudo mount -t cifs -o username=guy,password=thing \\10.1.10.29\folder /media/folder
gave me bad UNC (\10.1.10.29folder)

However...

sudo mount -t cifs -o username=guy,password=thing //10.1.10.29/folder /media/folder
returned with
[ 4331.893170 ] CIFS VFS: default security mechanism requested.  The default security mechanism will be upgraded from ntlm to ntlmv2 in kernel release 3.3

...Progress?
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
yes, definately progress, username or password incorrect in first instance. (but you are getting a challenge response).

second error, is your client does not support ntlm2
0
 
IllyankeshAuthor Commented:
aha, ok so the username password is that of the username of the ubuntu user, or the windows user that has access to the shared folder?   I tried the username that has access to the shared folder... I will try again incase of typos.


ntlm2 ?  I will look that up.   Some sort of apt-get-able package?
0
 
IllyankeshAuthor Commented:
Do I also need to have Winbindd running?
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Windows user.

NTLM is the NT Lan Manager Authentication Protocol that Windows speaks, but Linux does not!

NTLMv2 is v2 of NT Lan Manager Authentication Protocol
0
 
IllyankeshAuthor Commented:
Looks like username/password was incorrect.

I changed password and I got a could not connect resource busy.

But I was able to nano a file called test, write, and save test (using sudo) and see it in the windows shared folder

So I still need to upgrade to NTLMv2, for compatibility issues in the future correct?
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
It's best to use the same NTLM as the Server, in this case Windows that's file serving.
0
 
IllyankeshAuthor Commented:
silly question number 852-b, where would I check that on the windows server?
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
I do not understand?

is that the name of your server?
0
 
IllyankeshAuthor Commented:
no, no no, that was me be snarky at myself for asking questions
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
No Problems, Asking questions on EE, that's what it's for.

Without asking questions nobody learns, a long time ago, I had to ask many questions!!!

and somedays, still need to ask questions! always learning!
0
 
IllyankeshAuthor Commented:
Ok,
So first half ;) success... awesome...  
May have to open another question.
0
 
IllyankeshAuthor Commented:
Thank you for helping me, and not just sending me a link, and telling me to figure it out on my own.  I really appreciate it.  I learn best that way.  

So in this case the main question has been answered.  I will open another question that involves the same topic, but with a few necessary specifics.

aka mounting samba share on boot, and the creating of a linux user that has read & write permissions to that folder
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
No problems, Glad to assist.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.