Skip to content

Conversation

@sjmiller609
Copy link
Collaborator

@sjmiller609 sjmiller609 commented Dec 23, 2025

Note

Adds end-to-end QEMU standby/restore support and refines process/QMP handling, plus observability improvements.

  • QEMU snapshot/restore: Enables Standby/Restore using QMP migrate-to-file; saves qemu-config.json on start and loads it for restore; starts QEMU with -incoming exec:cat < memory and waits for VM readiness
  • QMP client utilities: New wait helpers (WaitMigration, WaitVMReady), Migrate, and tuned timeouts/polling; exposes status and raw commands
  • Process startup refactor: Shared startQEMUProcess with socket readiness checks, log redirection, cleanup handling, and debug timings; constants for dial/wait intervals
  • Capabilities: SupportsSnapshot now true for QEMU
  • Integration tests: Adds TestQEMUStandbyAndRestore covering snapshot/restore path; extends QEMU E2E helpers
  • Instance flows: Standby/restore paths add tracing spans, clearer logs, network recreate/release, and deletion of snapshots post-restore
  • Cloud Hypervisor: Restore path gains timing/debug logs

Written by Cursor Bugbot for commit c998b64. This will update automatically on new commits. Configure here.

Base automatically changed from qemu to main December 23, 2025 20:24
@sjmiller609 sjmiller609 requested a review from rgarcia December 23, 2025 20:59
// QEMU uses migrate to file for snapshots
// The "file:" protocol is deprecated in QEMU 7.2+, use "exec:cat > path" instead
memoryFile := destPath + "/memory"
uri := "exec:cat > " + memoryFile
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shell command paths not escaped for spaces/metacharacters

The QEMU exec: migration protocol runs commands through /bin/sh -c, but the file paths in uri := "exec:cat > " + memoryFile and incomingURI := "exec:cat < " + memoryFile are not quoted or escaped. If the data directory path contains spaces or shell metacharacters (e.g., /home/user/My Data/hypeman), the shell will misparse the command, causing snapshot and restore operations to fail silently or produce unexpected behavior.

Additional Locations (1)

Fix in Cursor Fix in Web

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

follow up

@sjmiller609 sjmiller609 merged commit 73750f6 into main Dec 23, 2025
4 checks passed
@sjmiller609 sjmiller609 deleted the qemu-capabilities branch December 23, 2025 21:09
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.

3 participants