Configure a custom iPXE script to boot your server from the OVHcloud API
Objective
This article is intended for experienced users who have at least basic knowledge about Preboot Execution Environment (PXE) and its implementation being used at OVHcloud: iPXE.
In the OVHcloud Control Panel, it is possible to specify a boot mode among a predefined list: primary disk or rescue.
With the OVHcloud API, you can define custom scripts.
Using a custom script can be useful in the following use cases:
- You are using a volatile OS that you don't want to install on disk and that remains only in memory.
- You have a multi-cloud strategy and one of the other cloud providers you use doesn't offer the OS you want to install, nor does it offer an alternative solution such as BringYourOwnImage.
- You want a standard installation process whatever the cloud provider is, so you have built your own rescue installation image to fully manage the complete OS installation of your dedicated server.
Requirements
- A dedicated server ready to be booted/rebooted in your OVHcloud account.
- Access to the OVHcloud API.
Restarting a dedicated server can cause outage of all services that only depend on this dedicated server.
Instructions
Generate an iPXE script for your dedicated server
Change server iPXE script
Specify your script within the bootScript attribute directly.
Get the server iPXE script
You can see your script within the bootScript attribute.
For example:
You can now reboot your server and it will use your iPXE to boot.
Changing boot modes
You can now switch back to disk or rescue boot from the OVHcloud Control Panel (see our guide on Activating and using rescue mode), or the OVHcloud API.
Switch to disk
Specify 1 in the bootId attribute.
You can now see that the attribute value bootScript is null.
Go further
Restarting your dedicated server
Activating and using rescue mode
iPXE - open source boot firmware
Join our community of users.