Skip to content

Centralize snapshot utilities into snapshot_store module#24

Merged
dpsoft merged 10 commits intomainfrom
feat/vz-snapshot-cli
Mar 12, 2026
Merged

Centralize snapshot utilities into snapshot_store module#24
dpsoft merged 10 commits intomainfrom
feat/vz-snapshot-cli

Conversation

@dpsoft
Copy link
Copy Markdown
Contributor

@dpsoft dpsoft commented Mar 11, 2026

  • Moved snapshot-related logic (e.g., hashing, directory management, listing, deletion) into a new snapshot_store module for better modularity and cross-platform compatibility.
  • Updated imports and restructured functions like compute_config_hash and snapshot_dir_for_hash to use the new module.
  • Simplified platform-specific code paths in cmd_snapshot by isolating shared functionality in snapshot_store.
  • Ensured comprehensive tests for snapshot_store, including VZ and KVM integration scenarios.

dpsoft and others added 10 commits March 11, 2026 14:23
- Moved snapshot-related logic (e.g., hashing, directory management, listing, deletion) into a new `snapshot_store` module for better modularity and cross-platform compatibility.
- Updated imports and restructured functions like `compute_config_hash` and `snapshot_dir_for_hash` to use the new module.
- Simplified platform-specific code paths in `cmd_snapshot` by isolating shared functionality in `snapshot_store`.
- Ensured comprehensive tests for `snapshot_store`, including VZ and KVM integration scenarios.
Resolve conflict in src/vmm/snapshot.rs: keep snapshot_store
re-exports (config hash, listing, deletion moved to snapshot_store module).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Implemented conditional handling for `x86_64` and `aarch64` architectures in snapshot serialization/deserialization tests (`test_vcpu_state_serde_roundtrip`, `test_vm_snapshot_serde_roundtrip`).
- Updated `capture_irqchip` and `restore_irqchip` functions to reduce unused variable warnings by changing parameter names to `_vm` and `_state`.
- Removed unnecessary `GuestMemoryMmap` import from `boot.rs`.
- Updated `kvm_bindings` device type constants to use aliased names for consistency.
- Enhanced vCPU configuration by initializing `kvm_vcpu_init` directly with `get_preferred_target`.
- Added conditional `SYS_poll` and `SYS_epoll_wait` handling for better architecture support.
- Fix kvm-bindings constant names (kvm_device_type_ prefix)
- Fix get_preferred_target API (takes &mut kvm_vcpu_init)
- Gate x86_64-only syscalls (SYS_epoll_wait, SYS_poll) with cfg
- Remove unused import (GuestMemoryMmap) and variables
- Make snapshot tests arch-conditional for VcpuState fields
- Add runner.arch to CI cache keys to prevent cross-arch pollution
- Add aarch64 cross-check instructions to AGENTS.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dpsoft dpsoft merged commit bd66cee into main Mar 12, 2026
18 checks passed
@dpsoft dpsoft deleted the feat/vz-snapshot-cli branch March 12, 2026 11:47
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.

1 participant