Skip to content

Instantly share code, notes, and snippets.

@johnsout
Created November 24, 2019 00:10
Show Gist options
  • Save johnsout/02923b5db172fbf135911c041c24543a to your computer and use it in GitHub Desktop.
Save johnsout/02923b5db172fbf135911c041c24543a to your computer and use it in GitHub Desktop.
hyperv-vmcx output will be in this color.
==> hyperv-vmcx: Creating build directory...
==> hyperv-vmcx: Starting HTTP server on port 8160
==> hyperv-vmcx: Creating switch 'packer' if required...
==> hyperv-vmcx: switch 'packer' already exists. Will not delete on cleanup...
==> hyperv-vmcx: Cloning virtual machine...
==> hyperv-vmcx: Error cloning virtual machine: PowerShell error: Hyper-V\Compare-VM : Object reference not set to an instance of an object.
==> hyperv-vmcx: At C:\Users\aspen\AppData\Local\Temp\powershell156685907.ps1:34 char:24
==> hyperv-vmcx: + $compatibilityReport = Hyper-V\Compare-VM -Path $VirtualMachinePath -VirtualMach ...
==> hyperv-vmcx: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
==> hyperv-vmcx: + CategoryInfo : NotSpecified: (:) [Compare-VM], NullReferenceException
==> hyperv-vmcx: + FullyQualifiedErrorId : Unspecified,Microsoft.HyperV.PowerShell.Commands.CompareVMCommand
==> hyperv-vmcx:
==> hyperv-vmcx: Set-VMMemory : Cannot validate argument on parameter 'VM'. The argument is null or empty. Provide an argument that is
==> hyperv-vmcx: not null or empty, and then try the command again.
==> hyperv-vmcx: At C:\Users\aspen\AppData\Local\Temp\powershell156685907.ps1:44 char:26
==> hyperv-vmcx: + Hyper-V\Set-VMMemory -VM $compatibilityReport.VM -StartupBytes $memoryStartupByt ...
==> hyperv-vmcx: + ~~~~~~~~~~~~~~~~~~~~~~~
==> hyperv-vmcx: + CategoryInfo : InvalidData: (:) [Set-VMMemory], ParameterBindingValidationException
==> hyperv-vmcx: + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.HyperV.PowerShell.Commands.SetVMMemoryCommand
==> hyperv-vmcx:
==> hyperv-vmcx: Disconnect-VMNetworkAdapter : Cannot bind argument to parameter 'VMNetworkAdapter' because it is null.
==> hyperv-vmcx: At C:\Users\aspen\AppData\Local\Temp\powershell156685907.ps1:46 char:55
==> hyperv-vmcx: + Hyper-V\Disconnect-VMNetworkAdapter -VMNetworkAdapter $networkAdaptor
==> hyperv-vmcx: + ~~~~~~~~~~~~~~~
==> hyperv-vmcx: + CategoryInfo : InvalidData: (:) [Disconnect-VMNetworkAdapter], ParameterBindingValidationException
==> hyperv-vmcx: + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.HyperV.PowerShell.Commands.Disc
==> hyperv-vmcx: onnectVMNetworkAdapterCommand
==> hyperv-vmcx:
==> hyperv-vmcx: Connect-VMNetworkAdapter : Cannot validate argument on parameter 'VMNetworkAdapter'. The argument is null or empty.
==> hyperv-vmcx: Provide an argument that is not null or empty, and then try the command again.
==> hyperv-vmcx: At C:\Users\aspen\AppData\Local\Temp\powershell156685907.ps1:47 char:52
==> hyperv-vmcx: + Hyper-V\Connect-VMNetworkAdapter -VMNetworkAdapter $networkAdaptor -SwitchName $ ...
==> hyperv-vmcx: + ~~~~~~~~~~~~~~~
==> hyperv-vmcx: + CategoryInfo : InvalidData: (:) [Connect-VMNetworkAdapter], ParameterBindingValidationException
==> hyperv-vmcx: + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.HyperV.PowerShell.Commands.ConnectVMNetworkAd
==> hyperv-vmcx: apterCommand
==> hyperv-vmcx:
==> hyperv-vmcx: Import-VM : Cannot bind argument to parameter 'CompatibilityReport' because it is null.
==> hyperv-vmcx: At C:\Users\aspen\AppData\Local\Temp\powershell156685907.ps1:48 char:46
==> hyperv-vmcx: + $vm = Hyper-V\Import-VM -CompatibilityReport $compatibilityReport
==> hyperv-vmcx: + ~~~~~~~~~~~~~~~~~~~~
==> hyperv-vmcx: + CategoryInfo : InvalidData: (:) [Import-VM], ParameterBindingValidationException
==> hyperv-vmcx: + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.HyperV.PowerShell.Commands.Impo
==> hyperv-vmcx: rtVMCommand
==> hyperv-vmcx: Unregistering and deleting virtual machine...
==> hyperv-vmcx: Error deleting virtual machine: PowerShell error: Hyper-V\Get-VM : A parameter is invalid. Hyper-V was unable to find a virtual machine with name SQLstream-6.0.0.1.
==> hyperv-vmcx: At C:\Users\aspen\AppData\Local\Temp\powershell072206230.ps1:4 char:7
==> hyperv-vmcx: + $vm = Hyper-V\Get-VM -Name $vmName
==> hyperv-vmcx: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
==> hyperv-vmcx: + CategoryInfo : InvalidArgument: (SQLstream-6.0.0.1:String) [Get-VM], VirtualizationInvalidArgumentExcep
==> hyperv-vmcx: tion
==> hyperv-vmcx: + FullyQualifiedErrorId : InvalidParameter,Microsoft.HyperV.PowerShell.Commands.GetVMCommand
==> hyperv-vmcx:
==> hyperv-vmcx: Stop-VM : Cannot validate argument on parameter 'VM'. The argument is null or empty. Provide an argument that is not
==> hyperv-vmcx: null or empty, and then try the command again.
==> hyperv-vmcx: At C:\Users\aspen\AppData\Local\Temp\powershell072206230.ps1:6 char:25
==> hyperv-vmcx: + Hyper-V\Stop-VM -VM $vm -TurnOff -Force -Confirm:$false
==> hyperv-vmcx: + ~~~
==> hyperv-vmcx: + CategoryInfo : InvalidData: (:) [Stop-VM], ParameterBindingValidationException
==> hyperv-vmcx: + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.HyperV.PowerShell.Commands.StopVMCommand
==> hyperv-vmcx:
==> hyperv-vmcx: Hyper-V\Remove-VM : A parameter is invalid. Hyper-V was unable to find a virtual machine with name SQLstream-6.0.0.1.
==> hyperv-vmcx: At C:\Users\aspen\AppData\Local\Temp\powershell072206230.ps1:9 char:1
==> hyperv-vmcx: + Hyper-V\Remove-VM -Name $vmName -Force -Confirm:$false
==> hyperv-vmcx: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
==> hyperv-vmcx: + CategoryInfo : InvalidArgument: (SQLstream-6.0.0.1:String) [Remove-VM], VirtualizationInvalidArgumentEx
==> hyperv-vmcx: ception
==> hyperv-vmcx: + FullyQualifiedErrorId : InvalidParameter,Microsoft.HyperV.PowerShell.Commands.RemoveVMCommand
==> hyperv-vmcx: Deleting output directory...
==> hyperv-vmcx: Deleting build directory...
Build 'hyperv-vmcx' errored: Error cloning virtual machine: PowerShell error: Hyper-V\Compare-VM : Object reference not set to an instance of an object.
At C:\Users\aspen\AppData\Local\Temp\powershell156685907.ps1:34 char:24
+ $compatibilityReport = Hyper-V\Compare-VM -Path $VirtualMachinePath -VirtualMach ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Compare-VM], NullReferenceException
+ FullyQualifiedErrorId : Unspecified,Microsoft.HyperV.PowerShell.Commands.CompareVMCommand
Set-VMMemory : Cannot validate argument on parameter 'VM'. The argument is null or empty. Provide an argument that is
not null or empty, and then try the command again.
At C:\Users\aspen\AppData\Local\Temp\powershell156685907.ps1:44 char:26
+ Hyper-V\Set-VMMemory -VM $compatibilityReport.VM -StartupBytes $memoryStartupByt ...
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Set-VMMemory], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.HyperV.PowerShell.Commands.SetVMMemoryCommand
Disconnect-VMNetworkAdapter : Cannot bind argument to parameter 'VMNetworkAdapter' because it is null.
At C:\Users\aspen\AppData\Local\Temp\powershell156685907.ps1:46 char:55
+ Hyper-V\Disconnect-VMNetworkAdapter -VMNetworkAdapter $networkAdaptor
+ ~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Disconnect-VMNetworkAdapter], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.HyperV.PowerShell.Commands.Disc
onnectVMNetworkAdapterCommand
Connect-VMNetworkAdapter : Cannot validate argument on parameter 'VMNetworkAdapter'. The argument is null or empty.
Provide an argument that is not null or empty, and then try the command again.
At C:\Users\aspen\AppData\Local\Temp\powershell156685907.ps1:47 char:52
+ Hyper-V\Connect-VMNetworkAdapter -VMNetworkAdapter $networkAdaptor -SwitchName $ ...
+ ~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Connect-VMNetworkAdapter], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.HyperV.PowerShell.Commands.ConnectVMNetworkAd
apterCommand
Import-VM : Cannot bind argument to parameter 'CompatibilityReport' because it is null.
At C:\Users\aspen\AppData\Local\Temp\powershell156685907.ps1:48 char:46
+ $vm = Hyper-V\Import-VM -CompatibilityReport $compatibilityReport
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Import-VM], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.HyperV.PowerShell.Commands.Impo
rtVMCommand
==> Some builds didn't complete successfully and had errors:
--> hyperv-vmcx: Error cloning virtual machine: PowerShell error: Hyper-V\Compare-VM : Object reference not set to an instance of an object.
At C:\Users\aspen\AppData\Local\Temp\powershell156685907.ps1:34 char:24
+ $compatibilityReport = Hyper-V\Compare-VM -Path $VirtualMachinePath -VirtualMach ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Compare-VM], NullReferenceException
+ FullyQualifiedErrorId : Unspecified,Microsoft.HyperV.PowerShell.Commands.CompareVMCommand
Set-VMMemory : Cannot validate argument on parameter 'VM'. The argument is null or empty. Provide an argument that is
not null or empty, and then try the command again.
At C:\Users\aspen\AppData\Local\Temp\powershell156685907.ps1:44 char:26
+ Hyper-V\Set-VMMemory -VM $compatibilityReport.VM -StartupBytes $memoryStartupByt ...
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Set-VMMemory], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.HyperV.PowerShell.Commands.SetVMMemoryCommand
Disconnect-VMNetworkAdapter : Cannot bind argument to parameter 'VMNetworkAdapter' because it is null.
At C:\Users\aspen\AppData\Local\Temp\powershell156685907.ps1:46 char:55
+ Hyper-V\Disconnect-VMNetworkAdapter -VMNetworkAdapter $networkAdaptor
+ ~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Disconnect-VMNetworkAdapter], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.HyperV.PowerShell.Commands.Disc
onnectVMNetworkAdapterCommand
Connect-VMNetworkAdapter : Cannot validate argument on parameter 'VMNetworkAdapter'. The argument is null or empty.
Provide an argument that is not null or empty, and then try the command again.
At C:\Users\aspen\AppData\Local\Temp\powershell156685907.ps1:47 char:52
+ Hyper-V\Connect-VMNetworkAdapter -VMNetworkAdapter $networkAdaptor -SwitchName $ ...
+ ~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Connect-VMNetworkAdapter], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.HyperV.PowerShell.Commands.ConnectVMNetworkAd
apterCommand
Import-VM : Cannot bind argument to parameter 'CompatibilityReport' because it is null.
At C:\Users\aspen\AppData\Local\Temp\powershell156685907.ps1:48 char:46
+ $vm = Hyper-V\Import-VM -CompatibilityReport $compatibilityReport
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Import-VM], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.HyperV.PowerShell.Commands.Impo
rtVMCommand
==> Builds finished but no artifacts were created.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment