Disable Hyper-V automatic snapshots for virtual machines
In later versions of Win10 Hyper-V enables automatic snapshots for new virutal machines. Since these are not needed to run test kitchen they should be turned off.
This is quite easy, with the Powewrsehll command:
Set-VM -Name MyVM -AutomaticCheckpointsEnabled $false
This should be run when the virutal machine is created, and before it's startet for the first time.
This feature looks to be exclusive to the Creators Update (1709) and probably later when they get there. I can work on this later this week if you haven't got your dev environment working in the next few days.
Great!
I've not got my environment running yet, but I think code along these lines
if ((Get-Command Set-Vm).Parameters["AutomaticCheckpointsEnabled"]) { Set-Vm -Name $vm.VMName -AutomaticCheckpointsEnabled $false }
should go into support/hyperv.ps1 at line 119?
And then some proper tests of this in spec/support/hyperv.Tests.ps1 of cource:-)
Today I got my development environment running, and I have an implementation that passes my unit tests. I'll verify it with an actual test-kitchen run, and create a PR afterwards.
Looks like this solved in PR #64? Maybe this issue can be closed?