Skip to content

Persist FUSE and virtio-fs state with attachment revalidation #4441

Description

Tracking issue: MicroVM support and private snapshot restore.

Motivation

The guest-visible FUSE session and virtio-fs queues cannot be reconstructed safely
by reconnecting a host directory alone. Restored protocol state must agree with
the exported filesystem and its access policy, and stale host handles must not
silently identify a different file or grant a broader attachment.

Proposed Scope

  • Persist the FUSE session and virtio-fs device/queue state required by the
    supported snapshot contract.
  • Define treatment of node identities, open handles, and pending requests at the
    capture boundary, rejecting unsupported states explicitly.
  • Reconstruct and revalidate live filesystem attachments, including export roots,
    access modes, and the identity requirements of restored protocol state.
  • Use the shared attachment-preparation contract introduced for networking and
    participate in its acknowledged activation and cleanup sequence.
  • Document the consistency assumptions for externally mutable host filesystems.

Acceptance Criteria

  • Focused tests round-trip supported FUSE and queue state and reject malformed
    or incompatible state without panics.
  • Replaced, missing, or incompatible host objects fail revalidation rather
    than silently acquiring another object's identity or broader permissions.
  • A VMM test captures and restores during active filesystem I/O, then verifies
    data access, request completion, and the documented handle semantics.
  • Failure during attachment reconstruction releases opened resources and does
    not activate a partially restored device.
  • Combined console, network, and filesystem restore is exercised through
    cargo xflowey vmm-tests-run; unit coverage alone does not close this issue.
  • The Guide states which live-attachment states are supported and what host
    filesystem changes invalidate a restore.

Dependencies

Keep this PR after network reconstruction so both devices use the same preparation
and failure contract.

Non-Goals

This issue does not snapshot the host filesystem itself or provide point-in-time
consistency for arbitrary external writers. Dormant devices and choosing a new
filesystem attachment at restore time are separate work.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions