Implement a caching mechanism for VMDisk image sources to optimize VM creation
Currently, to create a VM, two objects must be created: VMInstance and VMDisk. The process requires creating the VMDisk first, specifying the image source — typically a public cloud image like the official Ubuntu Noble image from the internet.
Problem: Each time we create a VMDisk, the image is downloaded again from the internet, even if it has already been used previously. This leads to unnecessary network usage and slows down the VM creation process.
Suggestion: It would be beneficial to implement a caching or internal repository system for image sources. This way, once an image is downloaded for the first time, it could be reused locally for subsequent VMDisk creations, improving both network efficiency and VM creation speed.
Thanks for the feature request.
I think we can consider implementing such resources as VMImage
So VMDisk can be created from VMImage which holds all the data locally in the cluster.
Implemented https://cozystack.io/docs/virtualization/vm-image/