设为首页 收藏本站
查看: 3393|回复: 0

[经验分享] How to configure ESXi to boot via Software iSCSI?

[复制链接]

尚未签到

发表于 2015-4-4 11:37:30 | 显示全部楼层 |阅读模式
http://blogs.vmware.com/vsphere/2011/11/how-to-configure-esxi-to-boot-via-software-iscsi.html
Introduction
VMware introduced support for iSCSI back in the ESX 3.x days. However, ESX could only boot from an iSCSI LUN if a hardware iSCSI adapter was used. Hosts could not boot via VMware's iSCSI driver using a NIC with special iSCSI capabilities.
It quickly became clear that there was a need for booting via Software iSCSI. VMware's partners are developing blade chassis containing blade servers, storage and network interconnects in a single rack. The blades are typically disk-less, and in many cases have iSCSI storage. The requirement is to have the blade servers boot off of an iSCSI LUN using NICs with iSCSI capabilities, rather than using dedicated hardware iSCSI initiators.
In ESXi 4.1, VMware introduced support for booting the host from an iSCSI LUN via the Software iSCSI adapter. Note that support was introduced for ESXi only, and not classic ESX.
Check that the NIC is supported for iSCSI Boot
Much of the configuration for booting via Software iSCSI is done via the BIOS settings of the NICs and the host. Ensure that you are using a compatible NIC by checking the VMware HCL. This is important, but be aware. If you select a particular NIC and you see iSCSI as a feature, you might assume that you are good to go with using it to boot. This is not the case.
Too see if a particular NIC is supported for iSCSI boot, you need to set the I/O Device Type to Network (not iSCSI) and then check the foot notes. If the foot notes states that iBFT is supported, then this card may be used for Boot from iSCSI (I'll explain iBFT later). Yes, this is all rather cryptic and difficult to follow in my opinion. I'm going to see if I can get this changed internally to make it a little more intuitive.

Steps to configure BIOS for Software iSCSI Boot

Now that you have verified that your NIC is supported, lets move on to the configuration steps. First step is to go into the BIOS of the NIC and ensure that it is enabled for iSCSI Boot. Here is how one would do it on a HP DL series:
  
Similarly, here is how you would do this on a DELL PowerEdge R710:
  
The next step is to get into the NIC configuration. In my testing I used a Broadcom NetXtreme NIC, which comes with a boot agent. Broadcom’s Multi-Boot Agent (MBA) software utility enables a host to execute a boot process using images from remote servers, including iSCSI targets. You access the MBA by typing S during the boot sequence:

This takes us into the MBA Configuration Menu:

Select iSCSI as the boot protocol. The key sequence CTRL-K will allow you to access the iSCSI  Configuration settings. If iSCSI isn’t available as a boot protocol, it may mean that the iSCSI firmware has not been installed, or that iSCSI has not been enabled on the NIC. There are a number of different parameters to configure. The main menu lists all available parameters.

First select General Parameters. In this example, I am going to use static IP information, so I need to set Disabled for theTCP/IP parameters via DHCP and iSCSI parameters via DHCP parameters.
When doing the initial install, Boot to iSCSI Target must also be left Disabled. You will need to change it to Enabled for subsequent boots. I'll tell you when later on in the post. You should therefore end up with settings similar to the following:

Press  to exit the General Parameters Configuration Screen and then select Initiator Parameters. At the iSCSI Initiator Parameters Configuration screen, one would enter values for the IP Address, Subnet Mask, Default Gateway, Primary DNS, and Secondary DNS parameters as needed. If authentication is required then enter the CHAP ID (Challenge Handshake Authentication Protocol) and CHAP Secret parameters.

Press  to return to the Main Menu and then select the 1st Target Parameters. Enter values for the Target IP Address, Target name, and Login information. The iSCSI Name corresponds to the iSCSI initiator name to be used by the client system. If authentication is required then enter the CHAP ID and CHAP Secret parameters. Note also that the Boot LUN ID(which LUN on the target we will use) is also selected here.

Press  to return to the Main Menu and then press  again to display the Exit Configuration screen and then select Exit and Save the Configuration. That completes the BIOS configuration. We are now ready to install ESXi onto an iSCSI LUN via the software iSCSI initiator.
Steps to install ESXi onto an iSCSI LUN via Software iSCSI

After configuring the MBA parameters in the Broadcom NIC, you can now go ahead with the ESXi installation. The install media for ESXi is placed in the CDROM as per normal. The next step is to ensure that Boot Controller/device order is set in the BIOS. For Broadcom cards, the NIC should be before the CDROM in the boot order.
When the host is powered on, the system BIOS loads a NIC's OptionROM code and starts executing. The NIC's OptionROM contains bootcode and iSCSI initiator firmware. The iSCSI initiator firmware establishes an iSCSI session with the target.
On boot, a successful login to the target should be observed before installation starts. In this example, the iSCSI LUN is on a NetApp Filer. If you get a failure at this point, you need to revisit the configuration steps done previously. Note that this screen doesn't appear for very long:
  
  The installation now begins.
As part of the install process, what could best be described as a memory-only VMkernel is loaded. This needs to discover suitable LUNs for installation, one of which is the iSCSI LUN. However, for the VMkernel's iSCSI driver to communicate with the target, it needs the TCP/IP protocol to be setup. This is all done as part of one the start-up init script. The NIC's OptionROM is also responsible for handing-off the initiator and target configuration data to the VMkernel. The hand-off protocol is called iBFT (iSCSI Firmware Boot Table). Once the required networking is setup, an iSCSI session is established to the target configured in the iBFT and LUNs beneath the targets are discovered and registered with VMkernel SCSI stack (PSA).
  If everything is successful during the initial install, you will be offered the iSCSI LUN as a destination for the ESXi image, similar to the following:

You can now complete the ESXi installation as normal.
Steps to Boot ESXi from an iSCSI LUN via Software iSCSI

Once the install has been completed, a single iSCSI Configuration change is required in the iSCSI Configuration General Parameter. The change is to set the 'Boot to iSCSI target' to Enabled.
  
Now you can reboot the host and it should boot ESXi from the iSCSI LUN via the software iSCSI initiator.
Gotchas

  • Make sure your NIC is on the HCL for iSCSI boot. Remember to check the foot notes of the NIC.
  • Make sure that your device has a firmaware version that supports iSCSI boot.
  • Make sure that the iSCSI configuration settings for initiator and target are valid.
  • Check the login screen to make sure your initiator can login to the target.
  • Multipathing is not supported at boot, so ensure that the 1st target path is working.
  • If you make changes to the physical network, these must be reflected in the iBFT.
  • A new CLI command, esxcfg-swiscsi -b -q, displays the iBFT settings in the VMkernel.

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-53740-1-1.html 上篇帖子: Adding a nested ESXi on 5.1 下篇帖子: Synchronizing ESX/ESXi time with a Microsoft Domain Controller
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表