version 2.1.5
Windows Server 2016
All guest operating machines
Any vagrant machine with hyperv provider.
Script: configure_vm.ps1
Error:
Failed to disable automatic checkpoints on VM: A parameter cannot be found that matches parameter name 'AutomaticCheckpointsEnabled'.
---- End output of vagrant up --no-provision --provider hyperv ----
Ran vagrant up --no-provision --provider hyperv returned 1] on default-windows-2016
What should have happened?
Should not throw exception
What actually happened?
Threw an exception as it is assumed that we want to set AutomaticCheckpointsEnabled parameter which only exists on Windows. https://serverfault.com/questions/866347/how-can-i-disable-use-automatic-checkpoints-for-new-hyper-v-vms-on-windows-10
none
I think the fix is:
Change:
Hyper-V\Set-VM -VM $VM -AutomaticCheckpointsEnabled $autochecks
To:
if ((Get-Command Hyper-V\Set-VM).Parameters["AutomaticCheckpointsEnabled"] -ne $null){
Hyper-V\Set-VM -VM $VM -AutomaticCheckpointsEnabled $autochecks
}
I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
I think the fix is:
Change:
To: