You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/bare_metal_cloud/dedicated_servers/api-os-installation/guide.de-de.md
+44-129
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: OVHcloud API and OS Installation (EN)
3
-
excerpt: Use OVHcloud API to install or re-install an OS on your dedicated server
4
-
updated: 2024-10-16
3
+
excerpt: Use OVHcloud API to install or reinstall an OS on your dedicated server
4
+
updated: 2025-02-25
5
5
---
6
6
7
7
## Objective
@@ -22,7 +22,7 @@ Fully automating OS installation or reinstallation on a [dedicated server](/link
22
22
23
23
### OS Compatibility <aname="os-compatibility"></a>
24
24
25
-
Log in to the [API console](https://api.ovh.com/) and go to the `/dedicated/server`{.action} section.
25
+
Log in to the [API console](/links/api) and go to the `/dedicated/server`{.action} section.
26
26
27
27
You can list all your [dedicated servers](/links/bare-metal/bare-metal) with the following API call:
28
28
@@ -92,6 +92,14 @@ Example of specific questions for Debian 12 (Bookworm):
92
92
```json
93
93
{
94
94
"inputs": [
95
+
{
96
+
"name": "hostname",
97
+
"description": "Custom hostname",
98
+
"default": "",
99
+
"mandatory": false,
100
+
"type": "hostname",
101
+
"enum": []
102
+
},
95
103
{
96
104
"name": "sshKey",
97
105
"description": "SSH Public Key",
@@ -164,123 +172,43 @@ Each question has the following attributes:
164
172
165
173
¹ If a mandatory question without default value is not answered, the API will return an error.
166
174
167
-
### Disk Groups <aname="disk-group"></a>
168
-
169
-
Some [dedicated servers](/links/bare-metal/bare-metal) have multiple groups of disks. For example, one group with SATA disks and another group with SSD disks. Those servers are sometimes also called **hybrid servers**.
170
-
171
-
To list the disk groups and their disks, you can use the following API call in order to identify the disk group on which you want the OS to be installed:
172
-
173
-
> [!api]
174
-
>
175
-
> @api {v1} /dedicated/server GET /dedicated/server/{serviceName}/specifications/hardware
176
-
>
177
-
178
-
Example reply:
179
-
180
-
```json
181
-
{
182
-
"bootMode": "uefi",
183
-
"defaultHardwareRaidSize": null,
184
-
"description": "SCALE-7 - AMD Epyc 7763",
185
-
"expansionCards": null,
186
-
"threadsPerProcessor": 128,
187
-
"memorySize": {
188
-
"unit": "MB",
189
-
"value": 524288
190
-
},
191
-
"defaultHardwareRaidType": null,
192
-
"diskGroups": [
193
-
{
194
-
"defaultHardwareRaidType": null,
195
-
"numberOfDisks": 2,
196
-
"diskGroupId": 1,
197
-
"diskType": "SSD",
198
-
"defaultHardwareRaidSize": null,
199
-
"diskSize": {
200
-
"unit": "GB",
201
-
"value": 480
202
-
},
203
-
"description": "2 X Disk SSD 480 GB, JBOD",
204
-
"raidController": null
205
-
},
206
-
{
207
-
"defaultHardwareRaidType": null,
208
-
"numberOfDisks": 2,
209
-
"diskGroupId": 2,
210
-
"diskType": "NVME",
211
-
"defaultHardwareRaidSize": null,
212
-
"diskSize": {
213
-
"unit": "GB",
214
-
"value": 1920
215
-
},
216
-
"raidController": null,
217
-
"description": "2 X Disk NVME 1920 GB, JBOD"
218
-
}
219
-
],
220
-
"processorArchitecture": "x86_64",
221
-
"coresPerProcessor": 64,
222
-
"processorName": "Epyc7763",
223
-
"formFactor": "1u",
224
-
"motherboard": "S8036-M",
225
-
"numberOfProcessors": 1,
226
-
"usbKeys": null
227
-
}
228
-
```
229
-
230
-
In this example, there are 2 disk groups:
231
-
232
-
- the first one (diskGroupId=1) contains 2 x 480 GB disks.
233
-
- the second one (diskGroupId=2) contains 2 x 1,9 TB disks.
234
-
235
-
> [!primary]
236
-
>
237
-
> By default, the OS will be installed on diskGroupId 1.
238
-
>
239
-
240
-
### Create an OS installation task <aname="install-task"></a>
175
+
### Create an OS reinstallation task <aname="install-task"></a>
241
176
242
-
When you have gathered all the information that you need, you can create the OS installation task with the following API call:
177
+
When you have gathered all the information that you need, you can create the OS reinstallation task with the following API call:
243
178
244
179
> [!api]
245
180
>
246
-
> @api {v1} /dedicated/server POST /dedicated/server/{serviceName}/install/start
181
+
> @api {v1} /dedicated/server POST /dedicated/server/{serviceName}/reinstall
247
182
>
248
183
249
184
With the following parameters:
250
185
251
186
|Parameter|Value|Required|
252
187
|---|---|---|
253
188
|serviceName|Server name|✅|
254
-
|templateName|OS to install|✅|
255
-
|diskGroupId|Id of the disk group on which the OS will be installed|❌|
256
-
|customHostname|Custom hostname|❌|
257
-
|userMetadata|Answers to the OS specific questions|❌|
|properties|Arbitrary properties to pass to cloud-init's config drive datasource|❌|
193
+
194
+
¹ Operating system specific, some customization(s) might be required on some operating systems.
258
195
259
-
`userMetadata` contains a list of key/value with the answers to the OS-specific questions:
196
+
`customizations` contains a hash with the answers to the OS-specific questions: hash key is the `name` of the question and its value is the answer to that question, in the requested `type`.
260
197
261
-
- Key must be the `name` of the question.
262
-
- Value must be the answer to the question, in the requested `type`.
198
+
`storage` contains customization related to disks & hardware RAID, partitions, software RAID, LVM, ZFS, etc. See [OVHcloud API and Storage](/pages/bare_metal_cloud/dedicated_servers/partitioning_ovh) for more details.
263
199
264
200
#### Linux payload example
265
201
266
202
The following payload will install Debian 12 (Bookworm) with SSH key-based authentication and a custom bash post-installation script:
@@ -345,7 +265,7 @@ As you can see, this PowerShell script for Windows is equivalent to the previous
345
265
346
266
> [!primary]
347
267
>
348
-
> For Windows OS, you can provide PowerShell or batch scripts. If you want to provide a batch script, please provide `cmd` value to key `postInstallationScriptExtension` in the `userMetadata` payload.
268
+
> For Windows OS, you can provide PowerShell or batch scripts. If you want to provide a batch script, please provide `cmd` value to key `postInstallationScriptExtension` in the `customizations` section.
349
269
>
350
270
351
271
While running Windows post-installation script, the following files while remain:
@@ -363,28 +283,22 @@ While running Windows post-installation script, the following files while remain
363
283
```json
364
284
{
365
285
"taskId": 123456789,
366
-
"ticketReference": null,
367
-
"lastUpdate": "2024-01-26T17:57:10+01:00",
368
-
"needSchedule": false,
369
-
"startDate": "2024-01-26T17:57:10+01:00",
370
286
"status": "init",
287
+
"startDate": "2024-01-26T17:57:10+01:00",
371
288
"doneDate": null,
372
-
"tags": null,
373
-
"comment": "Start dedicated server installation",
374
-
"plannedInterventionId": null,
375
-
"note": null,
376
-
"function": "reinstallServer"
289
+
"function": "reinstallServer",
290
+
"comment": "Start bare metal OS installation"
377
291
}
378
292
```
379
293
380
-
`123456789` is the OS installation task ID. You can follow the OS installation task status with the following API call:
294
+
`123456789` is the OS reinstallation task ID. You can follow the OS reinstallation task status with the following API call:
381
295
382
296
> [!api]
383
297
>
384
298
> @api {v1} /dedicated/server GET /dedicated/server/{serviceName}/task/{taskId}
385
299
>
386
300
387
-
You can also monitor the progress of the installation process with the following API call which displays a detailed list of steps:
301
+
You can also monitor the progress of the reinstallation process with the following API call which displays a detailed list of steps:
388
302
389
303
> [!api]
390
304
>
@@ -395,13 +309,14 @@ You can also monitor the progress of the installation process with the following
395
309
396
310
A default efi bootloader path is set when installing from OVHcloud templates but you have the possibility to manage it.
397
311
398
-
You can retrieve it with the following API call :
312
+
You can retrieve it with the following API call:
399
313
400
314
> [!api]
401
315
>
402
316
> @api {v1} /dedicated/server GET /dedicated/server/{serviceName}
403
317
>
404
-
You also can set it in the payload of the following API call :
318
+
319
+
You also can set it in the payload of the following API call:
405
320
406
321
> [!api]
407
322
>
@@ -418,7 +333,7 @@ You also can set it in the payload of the following API call :
418
333
419
334
[Bring Your Own Linux (BYOLinux)](/pages/bare_metal_cloud/dedicated_servers/bring-your-own-linux)
420
335
421
-
[OVHcloud API & Partitioning](/pages/bare_metal_cloud/dedicated_servers/partitioning_ovh)
336
+
[OVHcloud API and Storage](/pages/bare_metal_cloud/dedicated_servers/partitioning_ovh)
0 commit comments