Jenkins agent installation on NFS storage (Windows)

I am using Jenkins 2.440.2 and i want ro setup jenkins agent on NFS storage (Network drive) on windows machine.
Getting below error while setup jenkins agents.

06/13/24 16:22:28] [SSH] Checking java version of D:\node_jenkins_.Net/jdk/bin/java
Couldn’t figure out the Java version of D:\node_jenkins_.Net/jdk/bin/java
The system cannot find the drive specified.

[06/13/24 16:22:28] [SSH] Checking java version of java
[06/13/24 16:22:28] [SSH] java -version returned 17.0.11.
[06/13/24 16:22:28] [SSH] Starting sftp client.
[06/13/24 16:22:28] [SSH] Remote file system root D:\node_jenkins_.Net does not exist. Will try to create it… Could not copy remoting.jar into ‘D:\node_jenkins_.Net’ on agent
at hudson.plugins.sshslaves.SSHLauncher.copyAgentJar(
at hudson.plugins.sshslaves.SSHLauncher.lambda$launch$0(
at java.base/
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.base/java.util.concurrent.ThreadPoolExecutor$
at java.base/
Caused by: Failed to mkdir D:\node_jenkins_.Net
at com.trilead.ssh2.jenkins.SFTPClient.mkdirs(
at hudson.plugins.sshslaves.SSHLauncher.copyAgentJar(
… 5 more
Caused by: com.trilead.ssh2.SFTPException: No such file (SSH_FX_NO_SUCH_FILE: A reference was made to a file which does not exist.)
at com.trilead.ssh2.SFTPv3Client.expectStatusOKMessage(
at com.trilead.ssh2.SFTPv3Client.mkdir(
at com.trilead.ssh2.jenkins.SFTPClient.mkdirs(
… 6 more
[06/13/24 16:22:28] Launch failed - cleaning up connection
[06/13/24 16:22:28] [SSH] Connection closed.

The question is how do you attach the NFS ( guess this is not really NFS but a samba share or CIFS as windows doesn’t support the nfs protocol afaik) to your machine. If you do this interactively while you’re logged in I think this will affect only your session. But when your Jenkins agent is running as a service in windows or you connect via ssh you don’t have the context of that session.
The first error already indicates that the d-drive doesn’t exist.
I think you can use mklink to get a persistent link but afaik you can only link a directory and not a drive.

NFS File System Considerations

NFS file systems have different locking mechanisms compared to local file systems, which can cause issues with file operations. If /export/build is an NFS file system, try configuring the agent to place the remoting jar file on a local file system to see if the problem persists. This can help determine if the issue is related to the NFS file system. For more details, refer to the discussion on the Jenkins community forum: Could not copy remoting.jar into ‘/export/build’ on agent.