You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When temp directory path elements are too long, the Get-Nsmm function within New-ContainerHost.ps1 obtains a path using one or more short names which causes the Remove-Item command to fail.
We was able to workaround this issue by making the adjustment on line 1080 as mentioned in the accepted ServerFault answer: - $nssmZip = "$($env:temp)\$(Split-Path $nssmUri -Leaf)" + $nssmZip = [System.IO.Path]::GetFullPath("$($env:temp)\$(Split-Path $nssmUri -Leaf)")
This is the error encountered when paths were long enough for short names to be used:
C:\New-ContainerHost.ps1 : An object at the specified path C:\Users\FILE~1.NAM does not exist.
At line:1 char:1+C:\New-ContainerHost.ps1-VMName docker-hyperv -WindowsImage ServerD ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-ContainerHost.ps1
The text was updated successfully, but these errors were encountered:
When temp directory path elements are too long, the
Get-Nsmm
function withinNew-ContainerHost.ps1
obtains a path using one or more short names which causes theRemove-Item
command to fail.Related issue on ServerFault
We was able to workaround this issue by making the adjustment on line 1080 as mentioned in the accepted ServerFault answer:
- $nssmZip = "$($env:temp)\$(Split-Path $nssmUri -Leaf)"
+ $nssmZip = [System.IO.Path]::GetFullPath("$($env:temp)\$(Split-Path $nssmUri -Leaf)")
This is the error encountered when paths were long enough for short names to be used:
The text was updated successfully, but these errors were encountered: