Skip to content

Latest commit

 

History

History
92 lines (71 loc) · 2.36 KB

DEVELOPMENT.md

File metadata and controls

92 lines (71 loc) · 2.36 KB

Development

Files within this repository configuring the development environment:

Files Description
var/aliases/qemu.sh Use Qemu to start a virtual machine with PXE boot
var/aliases/ipxe.sh Help function to download and build iPXE

Localhost

Start the pxesrv daemon as foreground process:

$PXESRV_PATH/pxesrv -p $PXESRV_PORT

Build or download iPXE from the offical web-page;

# install build dependencies, build iPXE, and install to $PXESRV_ROOT
ipxe-build-from-source
# ...or download iPXE from the offical source to $PXESRV_ROOT
ipxe-download

Use ipxe.iso as initial rootfs for a KVM VM instance:

# start the iPXE.iso in a kvm instance
ipxe-instance
# on iPXE interactive prompt...initialize the network
iPXE> dhcp
# query the PXESrv instance on localhost
iPXE> chain http://127.0.0.1:4567/redirect

Use Qemu to start a local VM with PXE boot enabled ( cf.Qemu Network Emulation). Connect to PXESrv instance running on localhost:

pxe-instance
# use ctrl-b to drop into the shell
# get an IP address
iPXE> dhcp
# 10.0.2.2 is the default gateway (aka the host)
iPXE> chain http://10.0.2.2:4567/redirect
# ...
# create a link to another iPXE boot configuration
>>> ln -s $PXESRV_ROOT/centos $PXESRV_ROOT/once/10.0.2.2
# note that the gateway address is the client host address also

Virtual Machines

Use the Vagrantfile to start virtual machine instances...

vagrant up
# start PXESrv
vagrant ssh -- 'PXESRV_ROOT=/srv/pxesrv $PXESRV_PATH/pxesrv -p $PXESRV_PORT'
# ...using the Systemd unit
vagrant ssh -- sudo systemctl enable --now pxesrv.service

Client

Start a VM instance with PXE boot enable and connect to VNC:

pxe-vm-instance lxdev01
# us the VM instance fore development/testing
vm r lxdev01 # delete the VM instance 

Use ctrl-b to access the iPXE shell.

# start the network interface
dhcp
# query the PXESrv boot server
chain http://lxcm02.devops.test:4567/redirect