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
As with #148, I'm trying to issue commands to a remote host, and running into issues. This issue pops up, and it seems like there is a discrepancy between how the vdisk is created when running locally vs how it's created when running remotely.
# Create the new child vhd
if ($PSCmdlet.ShouldProcess($ParentVhd, "Creating clone")) {
try {
Write-PSFMessage -Message "Creating clone from $ParentVhd" -Level Verbose
$command = "create vdisk file='$($clonePath)' parent='$ParentVhd'"
# Check if computer is local
if ($computer.IsLocalhost) {
# Set the content of the diskpart script file
Set-Content -Path $diskpartScriptFile -Value $command -Force
$script = [ScriptBlock]::Create("diskpart /s $diskpartScriptFile")
$null = Invoke-PSFCommand -ScriptBlock $script
}
else {
$command = [ScriptBlock]::Create("New-VHD -ParentPath $ParentVhd -Path `"$($clonePath)`" -Differencing")
$vhd = Invoke-PSFCommand -ComputerName $computer -ScriptBlock $command -Credential $Credential
if (-not $vhd) {
return
}
}
}
You can see that, when running locally, the vdisk is created using diskpart, the settings which are given with a file with the contents create vdisk file='$($clonePath)' parent='$ParentVhd'. When this is issued remotely, it's using New-VHD instead, and this is throwing the error for me.
The text was updated successfully, but these errors were encountered:
As with #148, I'm trying to issue commands to a remote host, and running into issues. This issue pops up, and it seems like there is a discrepancy between how the vdisk is created when running locally vs how it's created when running remotely.
You can see that, when running locally, the vdisk is created using
diskpart
, the settings which are given with a file with the contentscreate vdisk file='$($clonePath)' parent='$ParentVhd'
. When this is issued remotely, it's usingNew-VHD
instead, and this is throwing the error for me.The text was updated successfully, but these errors were encountered: