Introduce storage param, usb device

This commit is contained in:
f-trycua
2025-04-13 17:47:34 -07:00
parent 701d0869fe
commit 4cb4278c47
23 changed files with 1699 additions and 481 deletions
+129 -6
View File
@@ -15,7 +15,8 @@ curl --connect-timeout 6000 \
"memory": "4GB",
"diskSize": "64GB",
"display": "1024x768",
"ipsw": "latest"
"ipsw": "latest",
"storage": "ssd"
}' \
http://localhost:3000/lume/vms
```
@@ -44,7 +45,8 @@ curl --connect-timeout 6000 \
"readOnly": false
}
],
"recoveryMode": false
"recoveryMode": false,
"storage": "ssd"
}' \
http://localhost:3000/lume/vms/lume_vm/run
```
@@ -84,9 +86,15 @@ curl --connect-timeout 6000 \
<summary><strong>Get VM Details</strong> - GET /vms/:name</summary>
```bash
# Basic get
curl --connect-timeout 6000 \
--max-time 5000 \
http://localhost:3000/lume/vms/lume_vm\
http://localhost:3000/lume/vms/lume_vm
# Get with storage location specified
curl --connect-timeout 6000 \
--max-time 5000 \
http://localhost:3000/lume/vms/lume_vm?storage=ssd
```
```
{
@@ -111,7 +119,8 @@ curl --connect-timeout 6000 \
-d '{
"cpu": 4,
"memory": "8GB",
"diskSize": "128GB"
"diskSize": "128GB",
"storage": "ssd"
}' \
http://localhost:3000/lume/vms/my-vm-name
```
@@ -121,10 +130,17 @@ curl --connect-timeout 6000 \
<summary><strong>Stop VM</strong> - POST /vms/:name/stop</summary>
```bash
# Basic stop
curl --connect-timeout 6000 \
--max-time 5000 \
-X POST \
http://localhost:3000/lume/vms/my-vm-name/stop
# Stop with storage location specified
curl --connect-timeout 6000 \
--max-time 5000 \
-X POST \
http://localhost:3000/lume/vms/my-vm-name/stop?storage=ssd
```
</details>
@@ -132,10 +148,17 @@ curl --connect-timeout 6000 \
<summary><strong>Delete VM</strong> - DELETE /vms/:name</summary>
```bash
# Basic delete
curl --connect-timeout 6000 \
--max-time 5000 \
-X DELETE \
http://localhost:3000/lume/vms/my-vm-name
# Delete with storage location specified
curl --connect-timeout 6000 \
--max-time 5000 \
-X DELETE \
http://localhost:3000/lume/vms/my-vm-name?storage=ssd
```
</details>
@@ -152,7 +175,7 @@ curl --connect-timeout 6000 \
"name": "my-vm-name",
"registry": "ghcr.io",
"organization": "trycua",
"noCache": false
"storage": "ssd"
}' \
http://localhost:3000/lume/pull
```
@@ -180,7 +203,9 @@ curl --connect-timeout 6000 \
-H "Content-Type: application/json" \
-d '{
"name": "source-vm",
"newName": "cloned-vm"
"newName": "cloned-vm",
"sourceLocation": "default",
"destLocation": "ssd"
}' \
http://localhost:3000/lume/vms/clone
```
@@ -226,3 +251,101 @@ curl --connect-timeout 6000 \
http://localhost:3000/lume/prune
```
</details>
<details open>
<summary><strong>Get Configuration</strong> - GET /lume/config</summary>
```bash
curl --connect-timeout 6000 \
--max-time 5000 \
http://localhost:3000/lume/config
```
```json
{
"homeDirectory": "~/.lume",
"cacheDirectory": "~/.lume/cache",
"cachingEnabled": true
}
```
</details>
<details open>
<summary><strong>Update Configuration</strong> - POST /lume/config</summary>
```bash
curl --connect-timeout 6000 \
--max-time 5000 \
-X POST \
-H "Content-Type: application/json" \
-d '{
"homeDirectory": "~/custom/lume",
"cacheDirectory": "~/custom/lume/cache",
"cachingEnabled": true
}' \
http://localhost:3000/lume/config
```
</details>
<details open>
<summary><strong>Get VM Storage Locations</strong> - GET /lume/config/locations</summary>
```bash
curl --connect-timeout 6000 \
--max-time 5000 \
http://localhost:3000/lume/config/locations
```
```json
[
{
"name": "default",
"path": "~/.lume/vms",
"isDefault": true
},
{
"name": "ssd",
"path": "/Volumes/SSD/lume/vms",
"isDefault": false
}
]
```
</details>
<details open>
<summary><strong>Add VM Storage Location</strong> - POST /lume/config/locations</summary>
```bash
curl --connect-timeout 6000 \
--max-time 5000 \
-X POST \
-H "Content-Type: application/json" \
-d '{
"name": "ssd",
"path": "/Volumes/SSD/lume/vms"
}' \
http://localhost:3000/lume/config/locations
```
</details>
<details open>
<summary><strong>Remove VM Storage Location</strong> - DELETE /lume/config/locations/:name</summary>
```bash
curl --connect-timeout 6000 \
--max-time 5000 \
-X DELETE \
http://localhost:3000/lume/config/locations/ssd
```
</details>
<details open>
<summary><strong>Set Default VM Storage Location</strong> - POST /lume/config/locations/default/:name</summary>
```bash
curl --connect-timeout 6000 \
--max-time 5000 \
-X POST \
http://localhost:3000/lume/config/locations/default/ssd
```
</details>