The
create target for PXE or network booting an OpenBSD install. It sets the boot order to:
- hard disk
- network
Also new is defining the MAC address of the network interface. For QEMU this has to start with 52:54:00.
Code:
create :
virt-install \
--prompt \
--connect=qemu:///system \
--name="${DOMAIN}" \
--ram=2048 \
--vcpus=2 \
--description 'OpenBSD virt-install with serial' \
--os-type=unix \
--os-variant=openbsd4 \
--boot hd,network \
--disk path=${IMAGEFILE},size=4,bus=virtio \
--disk path=${IMAGEDIR}/${DOMAIN}_ports,size=8,bus=virtio \
--network bridge=br0,mac=52:54:00:aa:aa:01,model=virtio \
--graphics vnc \
--serial dev,path=/dev/ttyS0 \
${DEBUG}
In order to PXE boot and to give this VM a fixed IP address I used this entry in
/etc/dhcpd.conf:
Code:
host pxe-client {
hardware ethernet 52:54:00:aa:aa:01 ;
fixed-address 192.168.222.230;
filename "pxeboot";
next-server 192.168.222.20;
}