-
Notifications
You must be signed in to change notification settings - Fork 9
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 #68
Disk resize #68
Conversation
Would it possible to extract the storage pool code to an other file and in an other struct than the Driver? This file and struct are really too big. Since we break previous installation, do we need to take extra precaution or just a sentence in the release notes is enough ? |
Sure I can move the storage pool code to a separate file. Not sure which struct you refer to?
We have strong ties between bundle version <-> crc version <-> machine driver version, crc releases won't start unless you use exactly the right versions. Usually we did not give much thought to backward compat with this reasoning. We should try to be more flexible than that, but I definitely did not try hard here :) |
I refer to the Driver struct. Almost all methods belong to it. |
77bdfe4
to
e84b146
Compare
This will be more consistant with what other go packages are doing, having go files in the top-level directory is very unusual
Until now, the libvirt machine driver directly creates an image file, and then passes this path to libvirt. This commit adds a libvirt storage pool where this file will live, this will enable a later commit to implement something similar to `virsh vol-resize` in order to be able to resize disk images. This does not change anything related to how the files used by the libivirt machine driver are laid out, it only 'registers' the '~/.crc/machines/crc' directory with libvirt so that it knows this location contains disk images (see 'virsh pool-list' and 'virsh vol-list')
With the recently added UpdateConfigRaw method and libvirt storage pool/storage volume support, all that remains to be done is to call `vol.Resize()` when the size changed. The application will then need to make sure the partitions/filesystem inside the VM are resized appropriately.
/lgtm |
This set of commits adds disk resize support to the libvirt machine driver. It starts by adding libvirt storage pool support so that
virStorageVolResize
can be used.