[nova] Spawning instance that will do PXE booting

Thomas Goirand zigo at debian.org
Tue Dec 14 11:06:11 UTC 2021


On 12/12/21 6:38 PM, Cedric Lemarchand wrote:
> So I validated what from my point of view seems to be the most
> "supported" way to boot an Openstack instance in PXE :
> 
> - add the flavor the extra specs "hw:boot_menu = 1" (thanks Sean)
> - spawn the instance
> - configure the extra_dhcp_opts of the associated port (thanks
> Christian). Its not supported with the CLI, but doable with an sdk,
> below a Pythonic example [1]
> - reboot the instance, hit esc at the bios prompt then third choice (iPXE)
> 
> This allows the use of the Openstack DHCP and to keep port security
> enabled, which is nice.
> 
> Cheers
> 
> [1]
> ---
> conn.update_port(port_id, extra_dhcp_opts=[
>     {"opt_name": "server-ip-address","opt_value": "10.0.0.15"},
>     {"opt_name": "bootfile-name", "opt_value": "pxelinux.0"},
>     {"opt_name": "tftp-server", "opt_value": "10.0.0.15"}
>     ]
> )

Hi,

It really is supported by the cli. I've done this way:

openstack port create ${MACHINE} --network oci-boot-network \
 --extra-dhcp-option \
 name=tftp-server,value=$<ip>,ip-version=4 \
 --extra-dhcp-option \
 name=bootfile-name,value=http://<ip>/oci/ipxe.php,ip-version=4 \
 --fixed-ip subnet=subname,ip-address=<fixed-ip>

At the present moment, I have a working OCI [1] functional CI that works
with non-admin OpenStack credentials (just a normal user).

I hope to be able to share this very soon, so that anyone can try
without too much hassle.

Cheers,

Thomas Goirand (zigo)

[1]
https://salsa.debian.org/openstack-team/debian/openstack-cluster-installer



More information about the openstack-discuss mailing list