Skip to content

Commit 25494fa

Browse files
docs
1 parent 271fc74 commit 25494fa

File tree

1 file changed

+81
-8
lines changed

1 file changed

+81
-8
lines changed

docs/getting-started.md

Lines changed: 81 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
> ⚠️ **Active Development:** OpenHVX is not production-ready. This guide targets **contributors and early testers**.
44
5-
---
6-
75
## Prerequisites
86

97
- Windows host with **Hyper-V** (for Agent tests)
@@ -38,16 +36,13 @@ This initializes the **platform-wide administrator** via the Admin Auth API.
3836
> - The `mode` parameter defines the registration behavior:
3937
> - `once`: create only if missing (409 if already exists)
4038
> - `reset`: reset password only if user exists
41-
> - `upsert`: create if missing, or reset if exists (recommended for bootstrap)
39+
> - `upsert`: create if missing, or reset if exists (**recommended for bootstrap**)
4240
> - Replace `x-api-key` and credentials as needed.
4341
4442
### Curl
4543

4644
```bash
47-
curl -k -X POST "https://admin-api.openhvx.local/api/v1/admin/auth/register?mode=upsert" \
48-
-H "content-type: application/json" \
49-
-H "x-api-key: example" \
50-
--data-binary '{"email":"admin@openhvx.local","password":"3x4mpl3"}'
45+
curl -k -X POST "https://admin-api.openhvx.local/api/v1/admin/auth/register?mode=upsert" -H "content-type: application/json" -H "x-api-key: example" --data-binary '{"email":"admin@openhvx.local","password":"3x4mpl3"}'
5146
```
5247

5348
**Expected response (example):**
@@ -68,6 +63,84 @@ curl -k -X POST "https://admin-api.openhvx.local/api/v1/admin/auth/register?mode
6863
> - Avoid exposing the API key in your shell history: export it to a variable (`export ADMIN_REGISTER_KEY=...`) and use `-H "x-api-key: $ADMIN_REGISTER_KEY"`.
6964
> - Change the password and registration key in real environments.
7065
66+
## Set up the Image Repository (with **openhvx-img**)
67+
68+
OpenHVX expects a JSON index describing available base images (cloud-init compatible `.vhdx` files).
69+
The easiest way to generate this index is via the **[OpenHVX/openhvx-img](https://github.com/OpenHVX/openhvx-img)** tool.
70+
71+
### 1) Place your images on a shared path
72+
73+
Store your `.vhdx` base images in a shared folder accessible by all Hyper‑V Agents — typically an SMB share.
74+
75+
Example layout on the share:
76+
77+
```
78+
\\fileserver\EXAMPLE\
79+
├─ public/
80+
│ ├─ Rocky-10-GenericCloud-Base.vhdx
81+
│ ├─ Ubuntu-22.04-LTS.vhdx
82+
│ └─ ...
83+
└─ _index/
84+
```
85+
86+
### 2) Generate the image index
87+
88+
Run the `openhvx-img` tool with the `-root` and `-output` options to automatically scan your repository and produce the index file.
89+
90+
```bash
91+
openhvx-img -root \\fileserver\EXAMPLE\ -output \\fileserver\EXAMPLE\_index\images.json
92+
```
93+
94+
This creates a JSON structure like:
95+
96+
```json
97+
{
98+
"schema": "openhvx.images/v1",
99+
"generatedAt": "2025-09-07T09:20:02Z",
100+
"images": [
101+
{
102+
"id": "Rocky-10-GenericCloud-Base",
103+
"scope": "public",
104+
"tenantId": null,
105+
"name": "Rocky-10-GenericCloud-Base",
106+
"path": "\\192.168.1.37\\openhvx\\public\\Rocky-10-GenericCloud-Base.vhdx",
107+
"os": "linux",
108+
"arch": "x86_64",
109+
"gen": 2,
110+
"sizeBytes": 1501560832,
111+
"mtime": "2025-09-07T09:17:04Z"
112+
}
113+
]
114+
}
115+
```
116+
117+
> 💡 The `path` values must correspond to actual network locations accessible by the Agents.
118+
119+
### 3) Mount the index in the Controller
120+
121+
Bind the `_index` directory in the Controller container and set the `IMAGES_INDEX_PATH` environment variable.
122+
123+
**docker-compose.override.yml (example):**
124+
125+
```yaml
126+
services:
127+
controller:
128+
volumes:
129+
- /mnt/openhvx/_index:/share/_index:ro
130+
environment:
131+
- IMAGES_INDEX_PATH=/share/_index/images.json
132+
```
133+
134+
### 4) Verify access from the Agent
135+
136+
Make sure that each Hyper‑V host running an Agent can access the `public/` folder (where the images are stored).
137+
138+
Example test (Windows PowerShell):
139+
140+
```powershell
141+
Test-Path "\\fileserver\EXAMPLE\public\Rocky-10-GenericCloud-Base.vhdx"
142+
```
143+
71144
## Build Agent Tools (Windows helpers)
72145

73146
These binaries are required by the PowerShell Agent to create **cloud-init ISOs** and to bridge **serial consoles**.
@@ -133,5 +206,5 @@ This will:
133206
## Next Steps
134207

135208
- Read: **Overview → Architecture & Features**
136-
- Contribute: open issues/PRs on GitHub → [https://github.com/openhvx](https://github.com/openhvx)
209+
- Contribute: open issues/PRs on GitHub → https://github.com/openhvx
137210
- Roadmap & known limitations: _(coming soon)_

0 commit comments

Comments
 (0)