cua icon indicating copy to clipboard operation
cua copied to clipboard

[Lume] Flexible Storage Locations for VMs, Disk Images, and IPSW Files

Open Else00 opened this issue 10 months ago • 2 comments

Current Behavior

Currently, lume stores all VM-related files (configurations, virtual disk images, NVRAM) in ~/.lume directory. There's no way to:

  • Store VMs in different locations
  • Separate VM configs from their disk images
  • Control where IPSW files are downloaded and stored

Desired Behavior

  1. Multiple VM Locations

    • Ability to create VMs in different locations (e.g., one on internal drive, another on external drive)
    • Option to register existing VMs from different locations
  2. Separated Storage

    • Option to store VM configurations in default location while keeping large disk images elsewhere
    • Ability to move disk images without recreating VMs
  3. IPSW Management

    • Control where IPSW files are downloaded and stored
    • Option to cache and reuse IPSW files
    • Commands to manage cached IPSW files

Else00 avatar Feb 05 '25 14:02 Else00

Thanks for submitting this issue @Else00. Some of these changes are actually part of our immediate priority timeline. We are likely to introduce a lume config and lume register commands to modify the default locations. I’d like to hear your thoughts on whether the spec below meets your needs.

lume <command>

Commands:
  
  # New commands for storage management:
  lume config get           Show configuration settings
  lume config set           Update configuration settings
  lume register <name>      Register an existing VM or update storage locations
  lume move <name> <path>   Move VM disk image to new location

Command Options:
  config get:
    --all              Show all configuration values
    --vm-path          Show default VM storage path
    --ipsw-path        Show IPSW cache location
    --ghcr-path   Show container registry cache location
    --registry         Show default container registry
    --organization     Show default organization

  config set:
    --vm-path <path>         Set default VM storage path
    --ipsw-path <path>       Set IPSW cache location
    --ghcr-path <path>  Set container registry cache location
    --registry <url>         Set default container registry
    --organization <org>     Set default registry organization

  register:
    --config-path <path>     Path to store VM configuration
    --disk-path <path>       Path to store VM disk image
    --nvram-path <path>      Path to store VM NVRAM

  move:
    --force                  Force move without confirmation

Modified Existing Commands:
  create:
    # Existing options...
    --config-path <path>     Override default VM configuration location
    --disk-path <path>       Override default VM storage location
    --nvram-path <path>      Override default VM NVRAM location

f-trycua avatar Feb 08 '25 18:02 f-trycua

I'd consider following the XDG Base Directory convention as a default, and support doing through a configuration file in a conventional path, and at CLI invocation time.

pepicrft avatar Feb 09 '25 16:02 pepicrft