8000 make sure we continue to default to Megabytes for qemu disk size to p… by SwampDragons · Pull Request #8438 · hashicorp/packer · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

make sure we continue to default to Megabytes for qemu disk size to p… #8438

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

Merged
merged 2 commits into from
Dec 3, 2019

Conversation

SwampDragons
Copy link
Contributor
@SwampDragons SwampDragons commented Dec 2, 2019

In v1.4.5 we defaulted to megabytes for the size of a qemu disk. Keep this default, if the value being read does not have units.

Addresses concerns raised in #5969 (comment)

@SwampDragons SwampDragons requested a review from a team as a code owner December 2, 2019 23:15
Copy link
Contributor
@sylviamoss sylviamoss left a comment

Choose a reason for hiding this comment

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

looks nice! 🎉

@SwampDragons SwampDragons merged commit 9fc37f9 into master Dec 3, 2019
@SwampDragons SwampDragons deleted the fix_qemu_sizes branch December 3, 2019 17:58
Comment on lines +152 to 157
< 8000 /td> // The size in bytes of the hard disk of the VM. Suffix with the first
// letter of common byte types. Use "k" or "K" for kilobytes, "M" for
// megabytes, G for gigabytes, and T for terabytes. If no value is provided
// for disk_size, Packer uses a default of `40960M` (40 GB). If a disk_size
// number is provided with no units, Packer will default to Megabytes.
DiskSize string `mapstructure:"disk_size" required:"false"`
Copy link
Contributor

Choose a reason for hiding this comment

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

I was about to say that I was amazed that there is not open source package that does this like the time pkg. But then I found this: https://github.com/docker/go-units/blob/master/size.go

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is basically a direct passthrough to the qemu-img command call, so I think using an intermediary library would be more work than it's worth.

@ghost
Copy link
ghost commented Jan 23, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Jan 23, 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.

3 participants
0