The nova.virt.baremetal.pxe Module

Class for PXE bare-metal nodes.

class PXE(virtapi)

Bases: nova.virt.baremetal.base.NodeDriver

PXE bare metal driver.

activate_bootloader(context, node, instance)

Configure PXE boot loader for an instance

Kernel and ramdisk images are downloaded by cache_tftp_images, and stored in /tftpboot/{uuid}/

This method writes the instances config file, and then creates symlinks for each MAC address in the instance.

By default, the complete layout looks like this:

/tftpboot/
./{uuid}/
kernel ramdisk deploy_kernel deploy_ramdisk config
./pxelinux.cfg/
{mac} -> ../{uuid}/config
activate_node(context, node, instance)

Wait for PXE deployment to complete.

cache_images(context, node, instance, admin_password, image_meta, injected_files, network_info)

Prepare all the images for this instance.

deactivate_bootloader(context, node, instance)

Delete PXE bootloader images and config.

deactivate_node(context, node, instance)
destroy_images(context, node, instance)

Delete instance’s image file.

build_network_config(network_info)
build_pxe_config(deployment_id, deployment_key, deployment_iscsi_iqn, deployment_aki_path, deployment_ari_path, aki_path, ari_path)

Build the PXE config file for a node

This method builds the PXE boot configuration file for a node, given all the required parameters.

The resulting file has both a “deploy” and “boot” label, which correspond to the two phases of booting. This may be extended later.

get_deploy_aki_id(instance_type)
get_deploy_ari_id(instance_type)
get_image_dir_path(instance)

Generate the dir for an instances disk.

get_image_file_path(instance)

Generate the full path for an instances disk.

get_partition_sizes(instance)
get_pxe_config_file_path(instance)

Generate the path for an instances PXE config file.

get_pxe_mac_path(mac)

Convert a MAC address into a PXE config file name.

get_tftp_image_info(instance, instance_type)

Generate the paths for tftp files for this instance

Raises NovaException if - instance does not contain kernel_id or ramdisk_id - deploy_kernel_id or deploy_ramdisk_id can not be read from

instance_type[‘extra_specs’] and defaults are not set

Previous topic

The nova.virt.baremetal.ipmi Module

Next topic

The nova.virt.baremetal.utils Module

This Page