Not sure am I missing something, but I do following Python code:
```
try:
result = client.delete("/me/ipxeScript/ubuntu-2004-test")
except ResourceNotFoundError as e:
pass
with open("ipxe.cmd", "r") as fh:
script_content = fh.read()
if not script_content:
raise Exception("unable to read script content")
result = client.post("/me/ipxeScript",
description = "Testing script for Ubuntu 20.04",
name = "ubuntu-2004-test",
script = script_content,
)
name = "example.ip-12-34-56.eu"
result = client.get("/dedicated/server/{}/boot".format(name),
bootType="ipxeCustomerScript"
)
for boot_id in result:
result = client.get("/dedicated/server/{}/boot/{}".format(name, boot_id))
print(json.dumps(result, indent=2, sort_keys=True))
if result.get("kernel") == "ubuntu-2004-test":
print("Tatget boot ID: {}".format(result.get("bootId")))
target_boot_id = result.get("bootId")
if target_boot_id:
result = client.put("/dedicated/server/{}".format(name), bootId=target_boot_id)
result = client.get("/dedicated/server/{}".format(name))
print(json.dumps(result, indent=2, sort_keys=True))
```
(this is copy pasted ad-hoc, there may be some python errors, but FULL script works here)
above code gives output:
```
Tatget boot ID: 21821
{
"bootId": 21821,
...
```
but when I reboot the server it doesn't do iPXE. When I reboot the server and during POST screen I press F11 for boot menu (IPMI remote console) and I select iPXE it works and installation via custom iPXE script starts. I can see my custom iPXE script works as I have couple of echos and sleep in me `#!ipxe` script and I can see them on IPMI remote glass console.
Not sure how to force netboot via API into my `ipxeCustomerScript` script without a need to press F11 via IPMI remote console.
Any tips?
Regards.
Dedicated Servers - API, netboot with ipxeCustomerScript doesn't netboot
Related questions
- Blacklisted IP ranges by UCEPROTECTL3
34391
23.02.2021 09:08
- Hot to delete my account?
33032
29.07.2018 19:49
- Free easy to setup OpenWRT NAT firewall for OVH (c)ESXi dedicated hosts
27695
16.05.2022 07:18
- Upcoming change: EFI System Partition over RAID1 for Linux installations
27213
08.10.2025 16:29
- Proxmox + opnsense
26937
19.07.2018 15:53
- Network Resilience Improvement for LACP aggregation on OVHcloud Bare Metal Servers
25965
27.10.2025 11:21
- .iso install on IPMI very slow
25175
22.05.2018 11:14
- Purchased a dedicated server - Awaiting Validation on a Saturday
25169
19.05.2018 20:07
- KVM error, blank screen, not send Keys
25022
11.12.2021 11:45
- Can't cancel/return server
23309
25.06.2018 08:31