Bring Your Own Linux (BYOLinux)
The Bring Your Own Linux (BYOLinux) feature enables you to deploy cloudready Linux images directly on your dedicated server. You can therefore use the bare metal service as a resource for your deployments.
What does cloudready mean?
The cloudready standard generally means being agnostic of the infrastructure on which the image is deployed. In addition to the requirements and limitations mentioned below, you must ensure that the image (downloaded or generated) meets the technical expectations of a cloudready image.
Requirements
- A dedicated server in your OVHcloud account
- Access to the OVHcloud API (for the "Deployment via API" section of this guide)
- Your image must be smaller than the server RAM minus 3GiB
- An executable script
/root/.ovh/make_image_bootable.sh, which will reinstall and configure the bootloader, for example, GRUB
To apply OVHcloud customizations at first boot, your image must include cloud-init or a compatible alternative (such as FreeBSD's nuageinit).
OVHcloud Control Panel Access
- Direct link: Dedicated Servers
- Navigation path:
Bare Metal Cloud>Dedicated servers> Select your server
NOTE: As with any classical OS installation, a new installation with BYOLinux will erase all the data on the server.
Instructions
Technical limitations:
There are some technical limitations linked to the use of physical products such as dedicated servers. Here is a non-exhaustive list to keep in mind during your deployment preparation:
- Boot type: UEFI or legacy (depending on the boot type of your server)
- Image format: qcow2
- Only one partition in the qcow2 image
- Partition filesystem: ext4, XFS, or BTRFS (without subvolumes)
Deployment methods:
- Deployment via the Control Panel: Allows you to deploy your image using the OVHcloud Control Panel.
- Deployment via API: You can use the OVHcloud API to integrate images into your own scripts to automate deployments.
Deploy your image via the Control Panel
In the General information tab, click the more options ... button next to Operating system (OS), then click Install my server.
In the window that appears, select Custom in the menu, then Bring Your Own Linux - byolinux, and click Next.
You will be redirected to the configuration page. Make sure your image URL is in the correct format. Fill in the rest of the required fields on this page. Once you have confirmed that the information is correct, click Confirm.
You can find more details on the options in the deployment options section below.
Deploy your image via the API
Log in to the API console and go to the /dedicated/server section.
The Bring Your Own Linux (BYOLinux) payload should be similar to the following:
NOTE: In the customizations section, only imageURL is mandatory. Also, the imageCheckSum value has been masked because it changes regularly whenever the target image is rebuilt.
Even though configDriveUserData could be sent to the API directly in clear text by escaping special characters, it is recommended to send a base64-encoded script to the API. You can use the following UNIX/Linux command to encode your data:
Here is the clear-text version of configDriveUserData from the example above:
Once you filled in the fields, start the deployment by clicking Execute.
Deployment options
1 Standard cloud-init user-data; typically a #cloud-config document or a script (see the official cloud-init examples). Equivalent to OpenStack's server create --user-data <file>. Its JSON representation must be on a single line \n for line breaks, as JSON strings cannot contain carriage returns.
2 Use only if you need HTTP Headers, such as Basic Auth
3 The EFI bootloader path is used by iPXE to boot your operating system. Examples:
The paths below use JSON escaping: \\ represents a single backslash. For example, \\efi\\debian\\grubx64.efi is the path \efi\debian\grubx64.efi.
4 JSON object of arbitrary key/value pairs, equivalent to OpenStack's server create --property key=value. The pairs are written to the config drive's meta_data.json under the meta key, where cloud-init can read them. Example: "configDriveMetadata": {"role": "webserver", "env": "prod"} becomes "meta": {"role": "webserver", "env": "prod"} in meta_data.json. See the OpenStack metadata service documentation for the full schema.
During installation, OVHcloud adds a small config drive partition to your server. Cloud-init reads it at first boot to apply OVHcloud's baseline configuration. Set configDriveUserData to add your own cloud-init user-data.
NOTE: Unlike standard OVHcloud OS templates (e.g., Debian 12, Windows Server), BYOLinux does not support the postInstallationScript customization option. To run commands or scripts after installation, use configDriveUserData with a cloud-init runcmd directive instead, as in the above example.
Common customer errors
The following table gives an overview of well-known customer errors and how to fix them:
See the OVHcloud API and Storage Common customer errors for related partitioning issues.
Go further
BYOLinux on GitHub - Examples and in-depth documentation
OVHcloud API and OS Installation
Bring Your Own Image (BYOI) / Bring Your Own Linux (BYOLinux), a comparison sheet
Browse all the Dedicated Servers guides.
Browse the rest of the OVHcloud US documentation for guides on our other products and services.
Learn more about Dedicated Servers on the OVHcloud US website.