Skip to content
This repository has been archived by the owner on Mar 11, 2020. It is now read-only.

Script fails with cannot find path error #52

Open
stationcasinosgithub opened this issue May 3, 2017 · 8 comments
Open

Script fails with cannot find path error #52

stationcasinosgithub opened this issue May 3, 2017 · 8 comments

Comments

@stationcasinosgithub
Copy link

Running this command in an administrator PS shell:
ConvertTo-Dockerfile -ImagePath D:\temp\Share\COVQAWEBSVC03\COVQAWEBSVC03-disk1.vhdx -Ar
tifact IIS -OutputPath d:\temp\share\docker

Fails with a bunch of the below errors. Does something have to already exist on my machine for this to work? Thanks for any help!

Copy-Item : Cannot find path 'C:\Users\RAY~1.DEV\AppData\Local\Temp\6c849d2b-3068-455f-a42d-2b2b1b362d20-mount\WebSites
\websvc\AccountManagement\MessagingServices' because it does not exist.
At C:\Program Files\WindowsPowerShell\Modules\Image2Docker\1.8.1\Functions\Private\Artifacts\IIS\Generate_IIS.ps1:64
char:5

  • Copy-Item $fullSourcePath $ManifestPath -Recurse -Force
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (C:\Users\RAY~1....ssagingServices:String) [Copy-Item], ItemNotFoundExce
      ption
    • FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.CopyItemCommand

Copy-Item : Cannot find path
'C:\Users\RAY~1.DEV\AppData\Local\Temp\6c849d2b-3068-455f-a42d-2b2b1b362d20-mount\WebSites\websvc\Enterprise' because
it does not exist.
At C:\Program Files\WindowsPowerShell\Modules\Image2Docker\1.8.1\Functions\Private\Artifacts\IIS\Generate_IIS.ps1:64
char:5

  • Copy-Item $fullSourcePath $ManifestPath -Recurse -Force
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (C:\Users\RAY~1....bsvc\Enterprise:String) [Copy-Item], ItemNotFoundExce
      ption
    • FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.CopyItemCommand
@sixeyed
Copy link
Contributor

sixeyed commented May 3, 2017

No, you don't need any extra software - only PowerShell 5.0 and Image2Docker.

It could be the long path name for the default mount path is causing a problem - can you try specifying a mount path, adding this to the end of your ConvertTo-Dockerfile command:

... -MountPath c:\i2d-temp

@stationcasinosgithub
Copy link
Author

So I added that to the command and then received the below errors. The folder was actually created by this process but was empty. I did notice that a bunch of folders was created in the d:\temp\share\docker folder, so I am now running the command with -MountPath d:\temp\share\docker.

Copy-Item : Cannot find path 'D:\i2d-temp\WebSites\websvc\AccountManagement\MessagingServices' because it does not
exist.
At C:\Program Files\WindowsPowerShell\Modules\Image2Docker\1.8.1\Functions\Private\Artifacts\IIS\Generate_IIS.ps1:64
char:5

  • Copy-Item $fullSourcePath $ManifestPath -Recurse -Force
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (D:\i2d-temp\Web...ssagingServices:String) [Copy-Item], ItemNotFoundExce
      ption
    • FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.CopyItemCommand

Copy-Item : Cannot find path 'D:\i2d-temp\WebSites\websvc\Enterprise' because it does not exist.
At C:\Program Files\WindowsPowerShell\Modules\Image2Docker\1.8.1\Functions\Private\Artifacts\IIS\Generate_IIS.ps1:64
char:5

  • Copy-Item $fullSourcePath $ManifestPath -Recurse -Force
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (D:\i2d-temp\WebSites\websvc\Enterprise:String) [Copy-Item], ItemNotFoun
      dException
    • FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.CopyItemCommand

@stationcasinosgithub
Copy link
Author

So that didn't work either - results below:

PS D:\temp\Share\COVQAWEBSVC03> ConvertTo-Dockerfile -ImagePath D:\temp\Share\COVQAWEBSVC03\COVQAWEBSVC03-disk1.vhdx -Ar
tifact IIS -OutputPath d:\temp\share\docker -MountPath d:\temp\share\docker
Copy-Item : Cannot find path 'D:\temp\share\docker\WebSites\websvc\AccountManagement\MessagingServices' because it
does not exist.
At C:\Program Files\WindowsPowerShell\Modules\Image2Docker\1.8.1\Functions\Private\Artifacts\IIS\Generate_IIS.ps1:64
char:5

  • Copy-Item $fullSourcePath $ManifestPath -Recurse -Force
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (D:\temp\share\d...ssagingServices:String) [Copy-Item], ItemNotFoundExce
      ption
    • FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.CopyItemCommand

Copy-Item : Cannot find path 'D:\temp\share\docker\WebSites\websvc\Enterprise' because it does not exist.
At C:\Program Files\WindowsPowerShell\Modules\Image2Docker\1.8.1\Functions\Private\Artifacts\IIS\Generate_IIS.ps1:64
char:5

  • Copy-Item $fullSourcePath $ManifestPath -Recurse -Force
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (D:\temp\share\d...bsvc\Enterprise:String) [Copy-Item], ItemNotFoundExce
      ption
    • FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.CopyItemCommand

@sixeyed
Copy link
Contributor

sixeyed commented May 4, 2017

Does your VM use multiple VHDs? E.g. one for the OS and another for the IIS content?

@stationcasinosgithub
Copy link
Author

I'm being told and fairly confident that there is only the c drive. This started as a VMWare ESX hard drive, I converted it to Hyper-v using a MS tool and then ran the PS command on it. Interesting though is that when I run the command without the MountPath command, the d:\temp\share\docker folder contains what appears to be enough to build the Docker container. Trying that now.

@pdevine
Copy link

pdevine commented Jul 22, 2017

@stationcasinosgithub did things work for you, or is this still an issue?

@lukaszherman
Copy link

lukaszherman commented Aug 9, 2017

I have the same problem:

ConvertTo-Dockerfile -ImagePath D:\Trace\DS_APP.vhdx -Artifact IIS -ArtifactParam AppName -MountPath D:\DockerMount\

Copy-Item : Cannot find path D:\DockerMount\Vulcan\App\AppName\Site because it does not exist.
At C:\Program Files\WindowsPowerShell\Modules\Image2Docker\1.8.3\Functions\Private\Artifacts\IIS\Generate_IIS.ps1:71 char:5
+     Copy-Item $fullSourcePath $ManifestPath -Recurse -Force
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (D:\DockerMount\Vulcan\App\AppName\Site:String) [Copy-Item], ItemNotFoundE   xception
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.CopyItemCommand

There is only one VHDX file but all app files are on drive D: (two partitions in one file).

@chrisgelhaus
Copy link

I have the same problem. IIS Config file is on C: drive, but IIS site folders are on the D: drive. Any easy way to fix this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants