chef / bento

Packer templates for building minimal Vagrant baseboxes for multiple platforms
Apache License 2.0
4.24k stars 1.12k forks source link

Do not defrag and zerofill the disk twice during Windows cleanup and optimize #1525

Closed MBradbury closed 1 year ago

MBradbury commented 1 year ago

The Windows cleanup.ps1 and optimize.ps1 scripts both conclude by defragging and zerofilling the disk. This change instead performs these actions only at the end of optimize.ps1.

Description

There are two advantages:

  1. Slightly faster VM creation
  2. No need for the SDelete utility to be downloaded and run, as the zerofill is done using pure powershell

Related Issue

Types of changes

Checklist:

Will find some time over the next few days to do through the rest of the checklist. Is https://github.com/chef-cookbooks/community_cookbook_documentation/blob/main/TESTING.MD the correct guidance for pre-merge tests?

Stromweld commented 1 year ago

Please add dco signoff to commits. Otherwise looks good to me.

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Stromweld commented 1 year ago

thanks for the contribution.