Use vm/ instead of the hidden .vm/ as the default state directory

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
guofangandClaude Sonnet 5.5 committed 2026-10-23 23:41:21 +08:00
1 parent 2fe0d568ce
commit 69e2141b7c
7 files changed
+32 -32

No files matched your search

+4 -4
View File
@@ -53,7 +53,7 @@ else:
base_image = Path(result.stdout.rstrip("\n"))
uses_shared_base_image = True
state_dir = Path(env("VM_STATE_DIR") or script_dir / ".vm" / "debian13")
state_dir = Path(env("VM_STATE_DIR") or script_dir / "vm" / "debian13")
disk_size = env("VM_DISK_SIZE") or "20G"
@@ -124,7 +124,7 @@ def usage(stream=sys.stdout):
Usage: {Path(sys.argv[0]).name} [--daemon] [--download-only] [--state-dir DIR] [-- QEMU_ARGUMENT ...]
Start the Debian 13 virtual machine. A writable overlay is created in the state
directory (default: .vm/debian13/), so the downloaded base image is never
directory (default: vm/debian13/), so the downloaded base image is never
modified. The VM hardware (memory, CPUs, SSH port forward, ...) is defined in
qemu/debian13.ini, which is rendered to qemu.ini in the state directory and
loaded with QEMU's -readconfig, followed by qemu/debian13-<os>-<arch>.ini (os is linux or darwin, arch is amd64 or arm64). Later
@@ -134,13 +134,13 @@ Options:
--daemon Run in the background while keeping the graphical window
--download-only Download the base image if it is missing, then exit
--state-dir DIR Directory for the VM disk, seed ISO and runtime files
(default: .vm/debian13; overrides VM_STATE_DIR)
(default: vm/debian13; overrides VM_STATE_DIR)
-h, --help Show this help
Environment variables:
VM_BASE_IMAGE Base qcow2 image path (default: resolved by shared image helper)
VM_SEED_IMAGE cloud-init seed ISO path (default: alongside the VM disk)
VM_STATE_DIR Runtime state directory (default: .vm/debian13)
VM_STATE_DIR Runtime state directory (default: vm/debian13)
VM_DISK_IMAGE Writable overlay path
VM_DISK_SIZE New overlay virtual capacity (default: 20G)
VM_IMAGE_ARCH Guest/host architecture: arm64 or amd64 (default: auto-detected from the host)