1
votes

I'm having some problems accessing a shared folder between an OS X Jenkins master and a Windows VM slave.

  • The set-up is an OS X host running Jenkins and using VirtualBox to host a Windows VM slave.
  • The Jenkins slave is running as a Windows service with auto-logon as a Jenkins Slave user.
  • Via VirtualBox a shared folder has been set-up between the two mapped to drive E: on the Windows slave.

From the master I'm trying to execute a batch script in the shared folder on the slave in a groovy Workflow script.

node("Windows") {
    bat("E:\\some\\path\\thingy.bat")
}

When I try and run this I get The system cannot find the drive specified.

If I log into the slave VM as the Jenkins Slave user and try to do the same everything works.

I've confirmed that from within the workflow script I am running as the same Jenkins Slave user but for some reason the E: drive that represents the shared folder isn't visible.

Can anyone shed any light on what the problem may be?

2

2 Answers

1
votes

So the answer was to use a UNC path.

When I tried this before I was only specifying the server name not the name of the shared folder itself.

So if your shared folder is called "shared" then

\\VBOXSVR\ (Doesn't work)
\\VBOXSVR\shared (Does work)

Bit of a silly mistake but there you go.

0
votes

Did you try using a UNC path?

Did you check that \ is properly escaped in the Groovy string?

Is the slave root on E: or C:?