@@ -250,8 +250,10 @@ Deploy your application with the compose file:
250250- ` --gpu ` : GPU assignments
251251- ` --ppcie ` : Enable PPCIE mode (attach ALL available GPUs and NVSwitches)
252252- ` --env-file ` : Environment variables file
253+ - ` --user-config ` : Path to user config file (will be placed at ` /dstack/.user-config ` in the CVM)
253254- ` --kms-url ` : KMS server URL
254255- ` --gateway-url ` : Gateway server URL
256+ - ` --stopped ` : Create VM in stopped state (requires dstack-vmm >= 0.5.4)
255257
256258#### Port Mapping
257259
@@ -390,6 +392,40 @@ export DSTACK_VMM_URL=http://ml-cluster:8080
390392 --env-file ./ml-secrets.env
391393```
392394
395+ ##### VM with User Configuration and Stopped State
396+
397+ ``` bash
398+ # Create a user configuration file
399+ cat > user-config.json << EOF
400+ {
401+ "timezone": "UTC",
402+ "locale": "en_US.UTF-8",
403+ "custom_settings": {
404+ "debug_mode": false,
405+ "log_level": "INFO"
406+ }
407+ }
408+ EOF
409+
410+ # Deploy VM in stopped state with user config
411+ ./vmm-cli.py deploy \
412+ --name " configured-vm" \
413+ --image " dstack-0.5.4" \
414+ --compose ./app-compose.json \
415+ --vcpu 4 \
416+ --memory 8G \
417+ --disk 100G \
418+ --user-config ./user-config.json \
419+ --stopped
420+
421+ # The VM is created but not started - start it manually when ready
422+ ./vmm-cli.py start configured-vm
423+ ```
424+
425+ ** Note:** The ` --stopped ` flag is useful for:
426+ - Pre-staging VMs for later use
427+ - Preparing VMs with specific configurations before startup
428+
393429### Environment Variable Encryption
394430
395431The VMM CLI automatically encrypts sensitive environment variables before sending them to the server.
0 commit comments