Skip to content

Commit c5a5585

Browse files
committed
Duplication
1 parent 9b29757 commit c5a5585

File tree

118 files changed

+6612
-4691
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+6612
-4691
lines changed

pages/bare_metal_cloud/dedicated_servers/api-os-installation/guide.de-de.md

+44-129
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
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
55
---
66

77
## Objective
@@ -22,7 +22,7 @@ Fully automating OS installation or reinstallation on a [dedicated server](/link
2222

2323
### OS Compatibility <a name="os-compatibility"></a>
2424

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.
2626

2727
You can list all your [dedicated servers](/links/bare-metal/bare-metal) with the following API call:
2828

@@ -92,6 +92,14 @@ Example of specific questions for Debian 12 (Bookworm):
9292
```json
9393
{
9494
"inputs": [
95+
{
96+
"name": "hostname",
97+
"description": "Custom hostname",
98+
"default": "",
99+
"mandatory": false,
100+
"type": "hostname",
101+
"enum": []
102+
},
95103
{
96104
"name": "sshKey",
97105
"description": "SSH Public Key",
@@ -164,123 +172,43 @@ Each question has the following attributes:
164172

165173
¹ If a mandatory question without default value is not answered, the API will return an error.
166174

167-
### Disk Groups <a name="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 <a name="install-task"></a>
175+
### Create an OS reinstallation task <a name="install-task"></a>
241176

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:
243178

244179
> [!api]
245180
>
246-
> @api {v1} /dedicated/server POST /dedicated/server/{serviceName}/install/start
181+
> @api {v1} /dedicated/server POST /dedicated/server/{serviceName}/reinstall
247182
>
248183
249184
With the following parameters:
250185

251186
|Parameter|Value|Required|
252187
|---|---|---|
253188
|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||
189+
|operatingSystem|OS to install||
190+
|customizations|OS reinstallation customizations|⚠️¹|
191+
|storage|OS reinstallation storage configurations||
192+
|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.
258195

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`.
260197

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.
263199

264200
#### Linux payload example
265201

266202
The following payload will install Debian 12 (Bookworm) with SSH key-based authentication and a custom bash post-installation script:
267203

268204
```json
269205
{
270-
"details": {
271-
"customHostname": "mon-tux"
272-
},
273-
"templateName": "debian12_64",
274-
"userMetadata": [
275-
{
276-
"key": "sshKey",
277-
"value": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQC9xPpdqP3sx2H+gcBm65tJEaUbuifQ1uGkgrWtNY0PRKNNPdy+3yoVOtxk6Vjo4YZ0EU/JhmQfnrK7X7Q5vhqYxmozi0LiTRt0BxgqHJ+4hWTWMIOgr+C2jLx7ZsCReRk+fy5AHr6h0PHQEuXVLXeUy/TDyuY2JPtUZ5jcqvLYgQ== my-nuclear-power-plant"
278-
},
279-
{
280-
"key": "postInstallationScript",
281-
"value": "IyEvYmluL2Jhc2gKZWNobyAiY291Y291IHBvc3RJbnN0YWxsYXRpb25TY3JpcHQiID4gL29wdC9jb3Vjb3UKY2F0IC9ldGMvbWFjaGluZS1pZCAgPj4gL29wdC9jb3Vjb3UKZGF0ZSAiKyVZLSVtLSVkICVIOiVNOiVTIiAtLXV0YyA+PiAvb3B0L2NvdWNvdQo="
282-
}
283-
]
206+
"operatingSystem": "debian12_64",
207+
"customizations": {
208+
"hostname": "mon-tux",
209+
"sshKey": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQC9xPpdqP3sx2H+gcBm65tJEaUbuifQ1uGkgrWtNY0PRKNNPdy+3yoVOtxk6Vjo4YZ0EU/JhmQfnrK7X7Q5vhqYxmozi0LiTRt0BxgqHJ+4hWTWMIOgr+C2jLx7ZsCReRk+fy5AHr6h0PHQEuXVLXeUy/TDyuY2JPtUZ5jcqvLYgQ== my-nuclear-power-plant",
210+
"postInstallationScript": "IyEvYmluL2Jhc2gKZWNobyAiY291Y291IHBvc3RJbnN0YWxsYXRpb25TY3JpcHQiID4gL29wdC9jb3Vjb3UKY2F0IC9ldGMvbWFjaGluZS1pZCAgPj4gL29wdC9jb3Vjb3UKZGF0ZSAiKyVZLSVtLSVkICVIOiVNOiVTIiAtLXV0YyA+PiAvb3B0L2NvdWNvdQo="
211+
}
284212
}
285213
```
286214

@@ -310,20 +238,12 @@ The following payload will install Windows Server 2022 Standard (Core) in French
310238

311239
```json
312240
{
313-
"details": {
314-
"customHostname": "ma-fenetre"
315-
},
316-
"templateName": "win2022core-std_64",
317-
"userMetadata": [
318-
{
319-
"key": "language",
320-
"value": "fr-fr"
321-
},
322-
{
323-
"key": "postInstallationScript",
324-
"value": "ImNvdWNvdSBwb3N0SW5zdGFsbGF0aW9uU2NyaXB0UG93ZXJTaGVsbCIgfCBPdXQtRmlsZSAtRmlsZVBhdGggImM6XG92aHVwZFxzY3JpcHRcY291Y291LnR4dCIKKEdldC1JdGVtUHJvcGVydHkgLUxpdGVyYWxQYXRoICJSZWdpc3RyeTo6SEtMTVxTT0ZUV0FSRVxNaWNyb3NvZnRcQ3J5cHRvZ3JhcGh5IiAtTmFtZSAiTWFjaGluZUd1aWQiKS5NYWNoaW5lR3VpZCB8IE91dC1GaWxlIC1GaWxlUGF0aCAiYzpcb3ZodXBkXHNjcmlwdFxjb3Vjb3UudHh0IiAtQXBwZW5kCihHZXQtRGF0ZSkuVG9Vbml2ZXJzYWxUaW1lKCkuVG9TdHJpbmcoInl5eXktTU0tZGQgSEg6bW06c3MiKSB8IE91dC1GaWxlIC1GaWxlUGF0aCAiYzpcb3ZodXBkXHNjcmlwdFxjb3Vjb3UudHh0IiAtQXBwZW5kCg=="
325-
}
326-
]
241+
"operatingSystem": "win2022core-std_64",
242+
"customizations": {
243+
"hostname": "ma-fenetre",
244+
"language": "fr-fr",
245+
"postInstallationScript": "ImNvdWNvdSBwb3N0SW5zdGFsbGF0aW9uU2NyaXB0UG93ZXJTaGVsbCIgfCBPdXQtRmlsZSAtRmlsZVBhdGggImM6XG92aHVwZFxzY3JpcHRcY291Y291LnR4dCIKKEdldC1JdGVtUHJvcGVydHkgLUxpdGVyYWxQYXRoICJSZWdpc3RyeTo6SEtMTVxTT0ZUV0FSRVxNaWNyb3NvZnRcQ3J5cHRvZ3JhcGh5IiAtTmFtZSAiTWFjaGluZUd1aWQiKS5NYWNoaW5lR3VpZCB8IE91dC1GaWxlIC1GaWxlUGF0aCAiYzpcb3ZodXBkXHNjcmlwdFxjb3Vjb3UudHh0IiAtQXBwZW5kCihHZXQtRGF0ZSkuVG9Vbml2ZXJzYWxUaW1lKCkuVG9TdHJpbmcoInl5eXktTU0tZGQgSEg6bW06c3MiKSB8IE91dC1GaWxlIC1GaWxlUGF0aCAiYzpcb3ZodXBkXHNjcmlwdFxjb3Vjb3UudHh0IiAtQXBwZW5kCg=="
246+
}
327247
}
328248
```
329249

@@ -345,7 +265,7 @@ As you can see, this PowerShell script for Windows is equivalent to the previous
345265

346266
> [!primary]
347267
>
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.
349269
>
350270
351271
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
363283
```json
364284
{
365285
"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",
370286
"status": "init",
287+
"startDate": "2024-01-26T17:57:10+01:00",
371288
"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"
377291
}
378292
```
379293

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:
381295

382296
> [!api]
383297
>
384298
> @api {v1} /dedicated/server GET /dedicated/server/{serviceName}/task/{taskId}
385299
>
386300
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:
388302

389303
> [!api]
390304
>
@@ -395,13 +309,14 @@ You can also monitor the progress of the installation process with the following
395309

396310
A default efi bootloader path is set when installing from OVHcloud templates but you have the possibility to manage it.
397311

398-
You can retrieve it with the following API call :
312+
You can retrieve it with the following API call:
399313

400314
> [!api]
401315
>
402316
> @api {v1} /dedicated/server GET /dedicated/server/{serviceName}
403317
>
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:
405320

406321
> [!api]
407322
>
@@ -418,7 +333,7 @@ You also can set it in the payload of the following API call :
418333

419334
[Bring Your Own Linux (BYOLinux)](/pages/bare_metal_cloud/dedicated_servers/bring-your-own-linux)
420335

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)
422337

423338
[Managing software RAID](/pages/bare_metal_cloud/dedicated_servers/raid_soft)
424339

0 commit comments

Comments
 (0)