diskimage-builder/diskimage_builder/elements/iscsi-boot/environment.d/open-iscsi-config
Hoang Trung Hieu a4648872ba Add iscsi-boot element for CentOS images
This patch adds an element that handles the configuration for
creating a disk capable of being a remote root filesystem through
iSCSI on CentOS images.

Tested on Fujitsu Server and boot with BIOS and UEFI mode successfully.
- Tested Boot-From-Volume + EFI for centos7 with following elements:
  "centos7 vm devuser cloud-init-datasources dhcp-all-interfaces
   iscsi-boot dracut-regenerate block-device-efi"

Co-authored-By: Nguyen Van Trung <trungnv@vn.fujitsu.com>

Change-Id: Ia1f23d722dced6f254fd7aee86abe8066a72fa42
2018-06-25 12:01:52 +00:00

15 lines
412 B
Plaintext

if [[ $DISTRO_NAME = "centos7" ]]; then
eval declare -A image_elements=($(get_image_element_array))
found=0
for i in "${!image_elements[@]}"; do
[ "$i" = "dracut-regenerate" ] && found=1
done
[ "$found" = 0 ] && echo "The dracut-regenerate element is required!" && exit 1
DIB_DRACUT_ENABLED_MODULES+="
- name: network
- name: iscsi
"
export DIB_DRACUT_ENABLED_MODULES
fi