Use vtl, the supplied client-side tool for managing HSM client/server setup. The vtl command is not interactive. It is called from the command line or a shell prompt, it completes its current task, and it exits back to the shell.
Invoke the vtl addServer command so that the client can create a secure connection with the HSM (the server).
The vtl executable is located at c:\Program Files\SafeNet\LunaClient unless you have changed the default installation.
C:\Program Files\SafeNet\LunaClient > vtl addServer -n <LunaSA hostname-or-IPaddress> -c <serverCert-file>
Example
c:\Program Files\SafeNet\LunaClient\ > vtl addServer -n myLuna3 -c server.pem
You might need to surround the entire filespec (path and filename) within quotation marks if Windows stumbles at the space between Program and Files.
To adjust the permissions for the directory c:\Program Files\SafeNet\LunaClient\, right-click that directory. In the resulting context menu, select Properties, and in the ensuing dialog select the "Security" tab. Choose the appropriate user or group and adjust as needed. Then repeat the commands in the steps above, which should now work as expected.
The appearance might vary slightly for different Windows versions. If the permissions change does not propagate to subdirectories, then you might need to repeat the process for the "cert" subdirectory and for the "client" and "server" subdirectories.
If you are working without DNS, then give the server IP number, rather
than its name, as in:
c:\Program Files\SafeNet\LunaClient\ >vtl addServer -n <sa-ip-address> -c server.pem
When you have completed this step, "Create a Client Certificate (Windows)".