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("UBUNTU_VM_STATE_DIR") or script_dir / ".vm" / "ubuntu2604")
state_dir = Path(env("UBUNTU_VM_STATE_DIR") or script_dir / "vm" / "ubuntu2604")
disk_size = env("UBUNTU_VM_DISK_SIZE") or "20G"
@@ -125,7 +125,7 @@ def usage(stream=sys.stdout):
Usage: {Path(sys.argv[0]).name} [--daemon] [--download-only] [--state-dir DIR] [-- QEMU_ARGUMENT ...]
Start an Ubuntu 26.04 LTS cloud image virtual machine. A writable overlay is
created in the state directory (default: .vm/ubuntu2604/), so the downloaded
created in the state directory (default: vm/ubuntu2604/), so the downloaded
base image is never modified. The VM hardware (memory, CPUs, SSH port forward,
...) is defined in qemu/ubuntu2604.ini, which is rendered to qemu.ini in the
state directory and loaded with QEMU's -readconfig, followed by
@@ -136,13 +136,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/ubuntu2604; overrides UBUNTU_VM_STATE_DIR)
(default: vm/ubuntu2604; overrides UBUNTU_VM_STATE_DIR)
-h, --help Show this help
Environment variables:
UBUNTU_VM_BASE_IMAGE Base qcow2 image path (default: resolved by shared image helper)
UBUNTU_VM_SEED_IMAGE cloud-init seed ISO path (default: alongside the VM disk)
UBUNTU_VM_STATE_DIR Runtime state directory (default: .vm/ubuntu2604)
UBUNTU_VM_STATE_DIR Runtime state directory (default: vm/ubuntu2604)
UBUNTU_VM_DISK_IMAGE Writable overlay path
UBUNTU_VM_DISK_SIZE New overlay virtual capacity (default: 20G)
VM_IMAGE_ARCH Guest/host architecture: arm64 or amd64 (default: auto-detected from the host)