UPDATE: XenServer boot from iSCSI (at least with iBFT) is just plain awful. Don't bother. Multipath does not work. Too many hacks to try to get things to work. It is not supported, anyway, and it will probably break every time you do an upgrade. Plus, the NICs that you use for iSCSI boot will be unusable for any other purpose. This is aspect of XenServer is very immature and not robust.
- Credits (Special thanks for pointers from:)
- https://www.krystalmods.com/index.php?title=xenserver-6-supports-iscsi-boot-undocumented-feature&more=1&c=1&tb=1&pb=1
- http://serverfault.com/questions/598773/install-xenserver-on-iscsi-target
- http://serverfault.com/questions/431864/boot-from-iscsi-how-does-it-work
- Notes/Warnings
- This was originally writtenf or XenServer 6.2.
- The NIC that is used for iSCSI boot will not be available for use for any other purposes (admin network, regular storage network, VM network, etc.)
- This is with Intel I350 Gbit NICs, as on a Supermicro X9DRT motherboard, which uses the ibft module.
- Once booted, you're in a Busybox environment... some commands will be limited or may not work the way in which you are accustomed on a full Linux system. Consider the information here for more troubleshooting steps to confirm that iSCSI works (LUNs are reachable, access is granted, etc.)
- As a best practice, use all lower-case named target and initiator names (some firmwares may silently convert case).
- WARNING: If you do not have your LUNs properly masked, do not specify the installation target correctly, and so forth, you may destroy your data. Know what you are doing, and use at your own risk.
- Connect up the Intel NICs
- Enable the Option ROM in the BIOS and add to the boot order; configure the iSCSI boot-enabled NICs in the NIC ROM set-up (perhaps ctrl-D when prompted after POST and prior to OS boot); You'll want to configure networking, initiator and target name; consider following these SAN best practices
- Configure the iscsi target to allow access from this initiator
- Boot off the CD and enter the command shell:
- Insert the XenServer 6.2 CD and power on the computer. At the "boot: " prompt, type "shell" and press enter.
- Prepare iscsi:
- echo "InitiatorName=iqn.2014-01.local:hostname" > /etc/iscsi/initiatorname.iscsi (replace the initiator name and/or hostname as appropriate)
- echo "node.session.initial_logon_retry_max = 60" >> /etc/iscsi/iscsid.conf
- modprobe iscsi_ibft
- modprobe scsi_transport_iscsi
- modprobe iscsi_tcp
- iscsid -c /etc/iscsi/iscsid.conf -i /etc/iscsi/initiatorname.iscsi -f &
- set up multipath (if you have multiple paths)
- modprobe dm-multipath
- Start the installer
- /opt/xensource/installer/init --use_ibft
- (use --mpath if you have set up multipath)
- (use --device_mapper_multipath=true)
- (use --network_device=eth0 , or the correct iSCSI network device, if needed)
- Go to http://debaan.blogspot.com/2014/10/iscsi-stuff-in-busybox-on-linux.html and follow those steps to get logged in to both LUNs and get them seen with multipath.
- Start the installer as before. Wait until the last step, when it says that it is ready to reboot.
- Alt+F2 to get to a command shell (again).
- Set up a chroot:
- mount -o bind /dev /tmp/root/dev
- mount -o bind /sys /tmp/root/sys
- mount -o bind /proc /tmp/root/proc
- chroot /tmp/root /bin/bash
- cd /boot
- re-run the
iscsiadm -m discovery -t sendtargets -p 10.10.10.20 commands to make the chroot environment aware of the targets - mkinitrd --with=dm-multipath --with=iscsi_ibft --with=scsi_transport_iscsi -f /boot/initrd-2.6.32.43-0.4.1.xs1.8.0.835.170778xen 2.6.32.43-0.4.1.xs1.8.0.835.170778xen