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

[Feature] Logical separation between VM images and VM instances? #153

Closed
idroz opened this issue May 10, 2023 · 2 comments
Closed

[Feature] Logical separation between VM images and VM instances? #153

idroz opened this issue May 10, 2023 · 2 comments

Comments

@idroz
Copy link
Collaborator

idroz commented May 10, 2023

Archives exported by macpine are VM disk images. It may be desirable to be able to store imported images in .cache and list them using e.g. alpine images. alpine launch could then be used to launch a VM instance using locally-available images (it does it anyway, we just don't expose listing of those local images to the user)

@maxzinkus
Copy link
Collaborator

maxzinkus commented May 10, 2023

I think that this would add a somewhat unnecessary distinction between things that, to the user, aren't that different.

I think a slightly different feature, snapshotting instances at save points by exporting new .qcow2 files to ~/.macpine/instance-name/snapshots so you can reset an instance immediately into any point in its past you've saved, would be amazing.

Then you could alpine snap instance-name list or alpine snap instance-name restore snap-name (maybe we list them with names and numbers for convenience and support both).

$ alpine snap cheerful-result new "working-mysql"
saving instance state...
snapshot 1. "working-mysql"` created
$ alpine snap cheerful-result list
0. "first-snapshot" 5/5/2023 07:22:36
1. "working-mysql" 5/8/2023 12:45:00
$ alpine snap cheerful-result restore 1
restoring...
cheerful-result restored to "working-mysql"
$ alpine snap cheerful-result delete first-snapshot
snap "first-snapshot" deleted

We'd have to think about how to manage the instance disk file to ensure consistency while the .qcow2 changes underneath, ideally without adding a ton of storage cost.

Maybe a diff-based disk format could be applied here?

@maxzinkus
Copy link
Collaborator

Come to think of it, this is basically re-engineering alpine publish in a way that adds a ton of complexity. Tentatively closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants