-
Notifications
You must be signed in to change notification settings - Fork 250
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
Disk resize #1607
Disk resize #1607
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this is where macOS user will currently fall ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same my concern,
startConfig.DiskSize
will have the default DiskSize, shouldn't we comparestartConfig.DiskSize != constants.DefaultDiskSize
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is checking for
UpdateConfigRaw
failures, at the moment the hyperkit driver only ignores disk sizes, so it won't return an error, it needs an update in order to return an error. This is one part whereUpdateConfigRaw
could be improved, return an error if it was called but did not modify any fields.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand what you are asking :( However, I did not want the 'disk-size' config to default to
constants.DefaultDiskSize
as this would cause unexpected behaviour when doingcrc start --disk-size 50; crc stop; crc start
.It would try to resize the disk back to
constants.DefaultDiskSize
, but the libvirt driver errors out when trying to do that. So it's better to keep the old size, and0
is used as a means to indicate "no value was set"There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
machine-driver-hyperkit
implementation may be something like this: (untested)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried on macOS and the flag is just discarded. I guess it's fine for a first release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
crc-org/machine-driver-hyperkit#21 should improve this, together with the commit I added to this PR to show a warning when
ErrNotImplemented
is returned.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
crc-org/machine-driver-hyperkit#21 is not for disk size. Should we add it ?