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

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

Merged
merged 1 commit into from
Sep 6, 2023
Merged

Conversation

MBradbury
Copy link
Contributor

@MBradbury MBradbury commented Sep 4, 2023

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (non-breaking change that does not add functionality or fix an issue)

Checklist:

  • I have read the CONTRIBUTING document.
  • I have run the pre-merge tests locally and they pass.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • All commits have been signed-off for the Developer Certificate of Origin.

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?

@MBradbury MBradbury requested review from Stromweld and a team as code owners September 4, 2023 14:46
@Stromweld
Copy link
Collaborator

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

Copy link
Collaborator

@Stromweld Stromweld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

…optimize

Signed-off-by: Matthew Bradbury <m.s.bradbury@lancaster.ac.uk>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Sep 6, 2023

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 Stromweld merged commit 4721081 into chef:main Sep 6, 2023
@Stromweld
Copy link
Collaborator

thanks for the contribution.

hunleyd added a commit to hunleyd/bento that referenced this pull request Sep 9, 2023
* 'main' of github.com:chef/bento:
  Keep linux-kernel-header package installed for Parallels builds (chef#1526)
  Update Ubuntu 22.04 `iso_url` (chef#1527)
  Do not defrag and zerofill the disk twice during Windows cleanup and optimize (chef#1525)
  Update vmware vars for el9 derivitives (chef#1519)
  Update Debian from 12.0 to 12.1 (https://www.debian.org/News/2023/20230722) (chef#1517)
  provision.ps1: fixed virtio-win-guest-tools.exe installation (chef#1516)
raykrist pushed a commit to norcams/bento that referenced this pull request Aug 19, 2024
…optimize (chef#1525)

Signed-off-by: Matthew Bradbury <m.s.bradbury@lancaster.ac.uk>
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

Successfully merging this pull request may close these issues.

2 participants