Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable Hyper-V automatic snapshots for virtual machines #62

Open
ebjornset opened this issue Jan 28, 2018 · 4 comments
Open

Disable Hyper-V automatic snapshots for virtual machines #62

ebjornset opened this issue Jan 28, 2018 · 4 comments

Comments

@ebjornset
Copy link
Contributor

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.

@kdoores
Copy link
Contributor

kdoores commented Jan 28, 2018

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.

@ebjornset
Copy link
Contributor Author

ebjornset commented Jan 29, 2018

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:-)

@ebjornset ebjornset changed the title Disable Hyper-V automatic snapshots for virutal machines Disable Hyper-V automatic snapshots for virtual machines Jan 29, 2018
@ebjornset
Copy link
Contributor Author

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.

@johlju
Copy link

johlju commented May 2, 2019

Looks like this solved in PR #64? Maybe this issue can be closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants