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

Parallels: Add "CompactDisk" build step #2731

Merged
merged 4 commits into from
Sep 16, 2015

Conversation

legal90
Copy link
Contributor

@legal90 legal90 commented Sep 11, 2015

This PR adds a new build step called "CompactDisk", which make a virtual disk image compaction. It happens in the end of build process.

How it works

It executes two commands:

  1. prl_disk_tool compact --hdd <path_to_disk> - Analyzes the disk content and removes unused blocks. It could take no effect if the guest filesystem could not be analyzed by "prl_disk_tool".
  2. prl_disk_tool compact --hdd <path_to_disk> --buildmap - Doesn't do any analyze and just removes null blocks.

It allows to minimize the result image, which is important for Vagrant boxes in particular.

Configure

This feature is enabled by default. It could be switched off with skip_compaction option.

Test stend

I've verified this feature with vagrant post-processor, with "bento" templates on Parallels Desktop Pro 11.0.1 (31275).

This function determines path to the first virtual disk image of the specified virtual machine.
This function compacts the specified virtual disk image.
@legal90
Copy link
Contributor Author

legal90 commented Sep 11, 2015

cc: @rickard-von-essen

@legal90
Copy link
Contributor Author

legal90 commented Sep 11, 2015

The Travis build failure does not related to this change set, but should be fixed with #2729

@rickard-von-essen rickard-von-essen self-assigned this Sep 12, 2015
rickard-von-essen added a commit that referenced this pull request Sep 16, 2015
Parallels: Add "CompactDisk" build step
@rickard-von-essen rickard-von-essen merged commit 3f14b9d into hashicorp:master Sep 16, 2015
@legal90 legal90 deleted the prl-compact-disk branch September 16, 2015 12:19
@ghost ghost locked and limited conversation to collaborators Apr 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants