VMware Cloud Community
patwpage
Contributor
Contributor
Jump to solution

Cannot mount a windows share on the ESX host

When I type this command with the appropriate values, I get a connection refused error. I can't mount the windows shared folder containing the restored files of the vm I want to restore via VCB.

I'm missing something right?

mount -t smb -o username= //winshare-server/sharename /mount/point

Error connecting to 172.18.10.229 (Connection refused)

15288: Connection to mediasvr failed

SMB connection failed

I can ping the windows host sharing the directory from the ESX host by ip address and by FQDN and short name. Connectivity is there. The account I am using to connect to it is a domain admin accout on a Windows 2003 AD domain. I am going across a wan link though.

Any help much appreciated!

0 Kudos
1 Solution

Accepted Solutions
esiebert7625
Immortal
Immortal
Jump to solution

Here's the steps I have documented including the firewall step...

How do I create a ISO mount point that points to a Windows Server for storing ISO files for my VM’s? – You can create a mount point inside /vmimages so your VM’s can access ISO files when needed. You could just create a directory on your VMFS volume and copy them there but this takes valuable disk space away from the ESX server. You can also use this technique to create other mount points on the ESX server if you need to copy files from a Windows server to or from it for patches and other things.

• First you will have to open the firewall port in ESX by typing in the service console “esxcfg-firewall -e smbClient”. This opens outbound TCP ports 137 – 139 and 445.

• Next make sure the Local Security Policy on the Windows Server you are going to map to has the following settings under Security options. If you do not do this you may get a “Stale NFS Handle” or “Permission denied” error when trying to mount.

o Microsoft network client - digitally sign communications (always) – DISABLED

o Microsoft network client - digitally sign communications (if server agrees) – DISABLED

o Microsoft network server - digitally sign communications (always) – DISABLED

o Microsoft network server - digitally sign communications (if server agrees) – DISABLED

• Next type “cd /vmimages” and then “mkdir ISO”

• Next type “mount -t smbfs -o username= 0 0”

o Edit /etc/rc.local using Nano or Vi

o Add the following line to the bottom of the file “mount –a”

Fyi…if you find this post helpful, please award points using the Helpful/Correct buttons.

-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-

Thanks, Eric

Visit my website: http://vmware-land.com

-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-

View solution in original post

0 Kudos
22 Replies
MR-T
Immortal
Immortal
Jump to solution

Check your firewall settings, by default I think this is blocked.

0 Kudos
patwpage
Contributor
Contributor
Jump to solution

I agree, a firewall, could be involved. There is no firewall on the Server. That is all disabled. We do have firewalls but I can connect to this share from other computers on that lan.

I decided to test it by attempting a mount on an ESX host on the same lan as the windows server is on and got this error:

9103: session setup failed: ERRDOS - ERRnoaccess (Access denied.)

SMB connection failed

\[root@vmblade14 root]#

0 Kudos
jayolsen
Expert
Expert
Jump to solution

I think Mr-T meant the firewall on your ESX server. SMB client is blocked by default. In VC go to host->configuration tab and select security profile. You should see it there and be able to select it.

esiebert7625
Immortal
Immortal
Jump to solution

Here's the steps I have documented including the firewall step...

How do I create a ISO mount point that points to a Windows Server for storing ISO files for my VM’s? – You can create a mount point inside /vmimages so your VM’s can access ISO files when needed. You could just create a directory on your VMFS volume and copy them there but this takes valuable disk space away from the ESX server. You can also use this technique to create other mount points on the ESX server if you need to copy files from a Windows server to or from it for patches and other things.

• First you will have to open the firewall port in ESX by typing in the service console “esxcfg-firewall -e smbClient”. This opens outbound TCP ports 137 – 139 and 445.

• Next make sure the Local Security Policy on the Windows Server you are going to map to has the following settings under Security options. If you do not do this you may get a “Stale NFS Handle” or “Permission denied” error when trying to mount.

o Microsoft network client - digitally sign communications (always) – DISABLED

o Microsoft network client - digitally sign communications (if server agrees) – DISABLED

o Microsoft network server - digitally sign communications (always) – DISABLED

o Microsoft network server - digitally sign communications (if server agrees) – DISABLED

• Next type “cd /vmimages” and then “mkdir ISO”

• Next type “mount -t smbfs -o username= 0 0”

o Edit /etc/rc.local using Nano or Vi

o Add the following line to the bottom of the file “mount –a”

Fyi…if you find this post helpful, please award points using the Helpful/Correct buttons.

-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-

Thanks, Eric

Visit my website: http://vmware-land.com

-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-

0 Kudos
patwpage
Contributor
Contributor
Jump to solution

I performed those steps and found that setting. I repeated the command and got a different error the next time around:

30129: session setup failed: ERRDOS - ERRnoaccess (Access denied.)

SMB connection failed

\[root@vmblade1dr root]#

0 Kudos
esiebert7625
Immortal
Immortal
Jump to solution

Check the access on your Windows share is your domain account listed in the share permissions? Also check your local security policy per my above post. Are you using the workgroup= option in your mount command?

0 Kudos
patwpage
Contributor
Contributor
Jump to solution

That was an awesome answer that solved my immediate problem of not being able to mount a windows share to a mount point on my ESX host. That was really helpful. Thanks SO Much!

I am going to post a separate question next if you may be able to take a look at it. I am doing all this to test vm restores through vcb.

I was hoping to restore the vm to a different farm but the restore command I am using is failing and I think it's because I'm trying to restore a vm backed up from one farm and restore it to a completely different host on another farm. I am doing all that because I don't want the vm to come up and conflict with the production vm already running on the network.

0 Kudos
esiebert7625
Immortal
Immortal
Jump to solution

No problem, I'm not too experienced with VCB but I'm sure you'll get plenty of other users who are to help you.

0 Kudos
johnswb
Enthusiast
Enthusiast
Jump to solution

I've tried eveything you guys said and I still get the same error.

Here what I've typed and the results:

\[root@ESXHOST /]# esxcfg-firewall -e smbClient

bash: esxcfg-firewall: command not found

\[root@ESXHOST /]# mount -tsmbfs -ouid=5012,gid=500,username,password=windows //servename/iso /vmimages

1586: session setup failed: ERRDOS - ERRnoaccess (Access denied.)

SMB connection failed

\[root@ESXHOST /]# /usr/sbin/esxcfg-firewall --allowIncoming

bash: /usr/sbin/esxcfg-firewall: No such file or directory

What am I doing wrong?

Will Johnson VCP on VI3 / VI4 vSphere 5
0 Kudos
mstahl75
Virtuoso
Virtuoso
Jump to solution

How did you get root access? If you used su[/b] you need to be sure to include -[/b] or -l[/b] or --login[/b] so the user path is included. Your first command failed so the firewall didn't get the ports opened.

0 Kudos
johnswb
Enthusiast
Enthusiast
Jump to solution

Thanks for the reply mstahl75

I rebooted my Windows Server and was able to access the share from the host after that. Still not sure what was going on with that...

thanks

Will Johnson VCP on VI3 / VI4 vSphere 5
0 Kudos
forage
Contributor
Contributor
Jump to solution

I have a security policy that won't let my physical w2k3 box change it's digital ethernet settings.

Is there another method?

currently using putty/pscp to transfer images and then using tools to un-sparse images. Seems like too much admin expense/time versus mounting something.

I'm currently looking at process of getting past UNIX STIG V5R1 DISA Field Security Operations for w2k3 r2 share... put hopefully someone has been here, done that.. Smiley Wink

0 Kudos
esiebert7625
Immortal
Immortal
Jump to solution

Yes there is, if you have Windows 2003 R2 you can use NFS....

How do I create a NFS volume on a Windows Server to use for storing ISO files for my VM’s? – You can do this if you have Windows 2003 Server R2 which has built-in NFS Services

• On the Windows 2003 Server make sure “Microsoft Services for NFS” in installed. If not you need to add it under Add/Remove Programs, Windows Components, Other Network File and Print Services

• Next go to folder you want to share and right-click on it and select Properties

• Click on the NFS Sharing tab and select “Share this Folder”

• Enter a Share Name, check “Anonymous Access” and make sure the UID and GID are both -2

• In VirtualCenter, select your ESX server and click the “Configuration” tab and then select “Storage”

• Click on “Add Storage” and select “Network File System” as the storage type

• Enter the Windows Server name, the folder (share) name and a descriptive Datastore Name

• Once it finishes the configuration you can now map your VM’s CD-ROM devices to this new VMFS volume

0 Kudos
forage
Contributor
Contributor
Jump to solution

yes, I've done that a few times.

I guess my question was more on.... the customers security people approving the approach using UNIX STIG V5R1 DISA Field Security Operations as a guide and how one would help prove that given the w2k3 and esx 3.1 relationship.

0 Kudos
johnswb
Enthusiast
Enthusiast
Jump to solution

I'm trying to setup NFS on our server but running into a problem with the NFS server services. It will not start due to the following error. "Error 1075: The dependency service does not exist or has been marked for deletion." I just installed it. Any idea's?

Will Johnson VCP on VI3 / VI4 vSphere 5
0 Kudos
esiebert7625
Immortal
Immortal
Jump to solution

Try re-booting the server, that will usually take care of that error and refresh the services.

0 Kudos
johnswb
Enthusiast
Enthusiast
Jump to solution

I went back in to the component and added "Server for NFS Authentication" and that did the trick. The only problem I see now is when I browse to the disk from with in VC to mount an ISO I don't see anything. Maybe I misunderstood what the object was.

I have a windows drive with ISO's on it and would like to mount it with NFS in VC. Which I can do, I just don't them when trying to mount to a vm.

Message was edited by:

johnswb

Will Johnson VCP on VI3 / VI4 vSphere 5
0 Kudos
esiebert7625
Immortal
Immortal
Jump to solution

You did create a NFS share? Try entering the path to the share instead of browsing to it, ie.
server\nfs share

0 Kudos
johnswb
Enthusiast
Enthusiast
Jump to solution

Yes I did create a NFS share and I can browse to the
server\nfs share from the local machine but even then I see nothing. What gives?

Message was edited by:

johnswb

Will Johnson VCP on VI3 / VI4 vSphere 5
0 Kudos