Can't access existing windows mapped drives

17 views
Skip to first unread message

Robert Moore

unread,
Apr 18, 2018, 12:44:16 AM4/18/18
to Packer
Hi, i'm using packer 1.2.2 with a hyper-v builder.
I've successfully mapped a drive at windows startup. When I interact with the vm from the console I can see this drive but I cannot get my packer scripts to see this mapped drive. 
-be it powershell: 'Copy-Item : Cannot find drive. A drive with the name 'S' does not exist.'
-or shell-local: 'Invalid drive specification'

I've verified that the packer scripts are only running after the map drive has actually happened

any ideas?
thanks 




j.r.haw...@googlemail.com

unread,
Apr 18, 2018, 3:21:04 AM4/18/18
to Packer
Without knowing specifics - I've not used the hyper-v builder, this sounds like you have hit the 'second hop' authentication issue where, by design, windows doesn't allow use of resources (like file shares, printers) when you are running from a remote machine via winrm. There are some ways round this but I don't yet know enough about packer to know if packer is able to work around them (I discovered this using ansible).

Another possiblity is that the drive isn't visible due to session isolation - similar to what is described here: https://github.com/ansible/ansible/issues/33929#issuecomment-355400903

Sorry, none of the above is really an answer but some ideas of things to investigate.

Jon
Reply all
Reply to author
Forward
0 new messages