Skip to content

Add configurable sandbox storage path#70

Open
markus-24 wants to merge 1 commit into
jamesstringer90:mainfrom
markus-24:feat/configurable-storage-path
Open

Add configurable sandbox storage path#70
markus-24 wants to merge 1 commit into
jamesstringer90:mainfrom
markus-24:feat/configurable-storage-path

Conversation

@markus-24

Copy link
Copy Markdown

What

Adds an optional Storage Folder to the create-sandbox flow, so a VM's VHDX can be created on a drive other than the default %ProgramData%\AppSandbox location. This addresses the common "not enough space on C:" situation.

Closes #24. Related: #58.

Changes

  • UI — new optional "Storage Folder" field (Windows-only) in the create-sandbox modal, with a Browse… button backed by an IFileOpenDialog folder picker.
  • Backendstorage_folder added to AsbVmConfig / VmConfig; vhdx_dir construction branches on it when set and falls back to the default otherwise. Templates always remain in ProgramData.
  • Validation (validate_storage_folder) — absolute path, local fixed drive (no network/removable), length fits MAX_PATH, target folder is creatable (recursively, via SHCreateDirectoryExW), and no existing disk.vhdx already at the target.
  • Free-space UX — the HDD line shows free space on the chosen drive, and a pre-flight warns (but does not block) if the drive has less free space than the configured size, since VHDX files are dynamic and a tight fit is not necessarily wrong.

Compatibility

  • Windows-only; the field is hidden on macOS.
  • Empty folder = current default behavior, so this is fully backward-compatible.

Testing

  • Builds clean: AppSandbox project, Release|x64 (MSVC v143) on top of current main (v0.1.3).
  • web/app.js passes node --check.

Single commit, branched off main.

Let users choose where a VM's VHDX is created instead of always using the
default location under C:, addressing the common "not enough space on C:"
problem (jamesstringer90#24, jamesstringer90#58).

- New optional "Storage Folder" field in the create-sandbox modal, with a
  Browse button (IFileOpenDialog) wired through the webview2 bridge.
- storage_folder added to AsbVmConfig/VmConfig; vhdx_dir construction
  branches on it when set and falls back to the default otherwise.
- Validation of the chosen folder: path syntax, drive existence, length,
  creatability, and a guard against an existing disk at the target.
- HDD size line shows the free space of the selected drive, refreshed as
  the field changes.
@normalswissguy

Copy link
Copy Markdown

im new to github and how do i download this?

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.

Feature Request: Configurable sandbox storage path

2 participants