Skip to content

snapshot: add container_snapshot_path to load snapshot request#4072

Closed
CuriousGeorgiy wants to merge 1 commit intofirecracker-microvm:mainfrom
CuriousGeorgiy:gh-4014-hack
Closed

snapshot: add container_snapshot_path to load snapshot request#4072
CuriousGeorgiy wants to merge 1 commit intofirecracker-microvm:mainfrom
CuriousGeorgiy:gh-4014-hack

Conversation

@CuriousGeorgiy
Copy link
Copy Markdown

@CuriousGeorgiy CuriousGeorgiy commented Aug 24, 2023

Changes

Firecracker does not support renaming resources at snapshot-restore, so as a workaround we manually substitute the VM state with the path of the block device backing the container snapshot to the path of the new container snapshot path received from the LoadSnapshot request.

Reason

When a snapshot of a VM created by firecracker-containerd is restored, due to the non-deterministic container snapshot path (it depends on the containerd snapshotter implementation), the container snapshot path at the time of the snapshot creation is different from the container snapshot path at the time of the snapshot loading.

Closes #4014

License Acceptance

By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license. For more information on following
Developer Certificate of Origin and signing off your commits, please check
CONTRIBUTING.md.

PR Checklist

  • If a specific issue led to this PR, this PR closes the issue.
  • The description of changes is clear and encompassing.
  • Any required documentation changes (code and docs) are included in this PR.
  • API changes follow the Runbook for Firecracker API changes.
  • User-facing changes are mentioned in CHANGELOG.md.
  • All added/changed functionality is tested.
  • New TODOs link to an issue.
  • Commits meet contribution quality standards.

  • This functionality cannot be added in rust-vmm.

@CuriousGeorgiy
Copy link
Copy Markdown
Author

This PR is not intended to be merged, it just serves as an illustration of what I want to achieve in #4014.

When a snapshot of a VM created by firecracker-containerd is restored,
due to the non-deterministic container snapshot path (it depends
on the containerd snapshotter implementation), the container snapshot
path at the time of the snapshot creation is different from the
container snapshot path at the time of the snapshot loading.

Firecracker does not support renaming resources at snapshot-restore, so
as a workaround we manually substitute the VM state with the path of the
block device backing the container snapshot to the path of the new
container snapshot path received from the LoadSnapshot request.

Closes firecracker-microvm#4014

Signed-off-by: Georgiy Lebedev <lebedev.gk@phystech.edu>
@Manciukic
Copy link
Copy Markdown
Contributor

Following the discussion in #4014, we should follow the same pattern as #4731 to edit snapshot resources on restore

@Manciukic Manciukic closed this Oct 22, 2025
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

Successfully merging this pull request may close these issues.

[Snaps] Drive mounts for block device disk paths during snapshot loading

2 participants