Virtual Machine with mapped drives

I would like to set up a second instance of the DVR server, so I created a Hyper-V machine, installed the DVR as a service, and mapped a share to the host machine. When I try to enable the DVR, it does not see the mapped drive. It also will not allow a manually-added path. The error is: Error: unable to create dvr directory: mkdir z:: The system cannot find the path specified.

I see that there are a number of topics already open on this problem, but none of them mention virtual machines.

You could try setting the registry value from Can’t See Mapped Network Drive

Thanks, but I already saw that one and tried it...

The VM is logged in with a local account that has the same credentials as the host computer. I can access the mapped drive from explorer, and I can create/delete files, so it shouldn't be a permissions issue.

Is the DVR installed into system tray or service? I think services can't access mapped drives?

Bingo! Uninstalled and reinstalled to the system tray. Now it sees the Z drive.

I'm not 100% sure that a service can't use a mapped drive... There might be a sneaky way to do it. This is ringing a bell from a much earlier version of Windows Server. If I find it, I'll post it here. Otherwise, running it as a user process works.

1 Like

OK, got it. I knew there was a way, but the first solution I tried didn't work, which was to change the service logon account to the one I'm using for the DVR, but no joy. It's possible that fooling around with permissions may work, but I found another method, and it worked. Full description here: https://stackoverflow.com/questions/182750/map-a-network-drive-to-be-used-by-a-service

Use the task scheduler solution. Essentially, you create a task that runs as System at startup and maps the drive. Be sure to use the following command, which you should try in a command prompt first to make sure it works:

use z: /user:server\user /persistent:yes \server\share "password"

That syntax is correct for a local user on the host computer. The quotes around the user's password may not be necessary, depending on which special characters are in your password.

3 Likes