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]: Implement snapshot support #485

Open
1 task done
uhidontkno opened this issue May 12, 2024 · 8 comments
Open
1 task done

[Feature]: Implement snapshot support #485

uhidontkno opened this issue May 12, 2024 · 8 comments
Labels
enhancement New feature or request

Comments

@uhidontkno
Copy link

Is there an existing feature request for this?

  • I have searched the existing feature requests

Is your proposal related to a problem?

Instead of waiting up to 15 minutes for Windows to install, I propose that a snapshot feature should be implemented so that there should be a way to install windows once, make a snapshot for it, then be able to load it anytime for instant Windows installations.

Describe the solution you'd like.

One solution could be to have a way to save the entire VM's disk to somewhere else using docker cp for example, then feeding that file into the Windows Docker Container, or simply implement QEMU snapshots support

Describe alternatives you've considered.

I haven't tried anything yet.

Additional context

No response

@uhidontkno uhidontkno added the enhancement New feature or request label May 12, 2024
@uhidontkno uhidontkno changed the title [Feature]: Should be able to add snapshots [Feature]: Implement snapshot support May 12, 2024
@lucaspdude
Copy link

Interested in this also.

At work we use some old VB6 configured machine and it would be really nice if we could make snapshots since most of the configuration is manual for this environment.

@kroese
Copy link
Contributor

kroese commented May 12, 2024

Inside the /storage volume there is a file called data.img that contains the whole harddisk.

So the only thing you need to do for instant installations is to provide an existing /storage volume, which can be binded to a local folder like this:

volumes:
  - /example/folder:/storage

So for backing up or restoring machines, all you need to do is make a copy of /example/folder. And if you have multiple folders, you can easily switch between them by changing that line in your compose file.

I have no plans to implement QEMU snapshots, but the above method should provide pretty similar functionality. The only difference is that you cannot make a copy of /storage while the machine is powered on and that it uses a bit more diskspace because nothing is layered like with real snapshots.

@baiomys
Copy link

baiomys commented May 12, 2024

ZFS volume can be passed to docker instead of /storage via
/dev/zvol/mypool/myvol:/disk1
It has native support for compression, snapshots, encryption, thin provisioning, etc.
So it is worth spending couple of days reading ZFS for dummies.
=)

@TeroKeso
Copy link

ZFS passthrough would be a good addition to readme.md. Like @baiomys did say just link them to some instructions page like https://blog.victormendonca.com/2020/11/03/zfs-for-dummies/ if they need more info

@kroese
Copy link
Contributor

kroese commented May 28, 2024

@TeroKeso There is already a section about disk pass-through in the readme. It doesnt recommend a specific filesystem, but ZFS is not the only filesystem that can do snapshots, there is also BTRFS for example, which is a lot easier to setup for newbies propably.

In fact: its not even needed to use disk pass-through at all to use snapshots, you can also snapshot the partition that contains the/storage folder instead.

So I will not recommend a specific filesystem for snapshots in the readme. The recommended way to backup the container is to just make a periodic copy of the /storage folder. And how you make that copy (manually or via snapshots) is up to the user.

@TeroKeso
Copy link

You are absolutely right about the difficulty level. I just understand what I'm doing and that's why I suggested writing the instructions. I'm not experienced enough to write instructions and see all possibilities.

Zvol or similar helps with snapshot+backup when /storage is just one big file (HDD).

Thank you for taking the time to reply and I'm sorry that my question got a bit out of the title/topic

@kroese
Copy link
Contributor

kroese commented May 28, 2024

@TeroKeso Your suggestion was not off-topic at all.

But personally I have never used ZFS (because it looked so difficult), so I'm just a bit hesitant to recommend it to other people, because its better to only recommend things you have personal experience with.

Also because there are other options, like BTRFS for snapshots, I do not want to steer people in a certain direction, when I do not know which of the options is the best or easiest.

@baiomys
Copy link

baiomys commented May 29, 2024

ZFS makes you think completely different, it extends old plain storage paradigm in new dimension.
That's why learning curve is kind of steep.

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

No branches or pull requests

5 participants