Skip to content

Commit 1c18d24

Browse files
committed
Update docs for --stopped and --user-config
1 parent 80cafe2 commit 1c18d24

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed

docs/vmm-cli-user-guide.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

395431
The VMM CLI automatically encrypts sensitive environment variables before sending them to the server.

vmm/src/tests/test-deployment.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Test script for vmm-cli.py deployment functionality
44
# Tests the complete compose + deploy workflow with local VMM instance
55

6-
set -e # Exit on any error
6+
set -e # Exit on any error
77

88
# Colors for output
99
RED='\033[0;31m'

0 commit comments

Comments
 (0)