[ipxe-devel] help pushing iscsi targets with DHCP
Gruher, Joseph R
joseph.r.gruher at intel.com
Thu Jul 25 15:11:23 UTC 2013
Thanks for the responses Matthew and Robin. I do have a perfectly identical set of nodes and installing the OS on the iSCSI targets is not a problem, I've done it before, just using statically configured IPs and targets, and now I'd like to dynamically assign the targets. I'm booting Linux on the clients.
Both responses suggest using a client-side iPXE script to solve the problem of dynamically assigning targets to the clients. Perhaps that is the best approach then. However, I was hoping to solve it on the DHCP server side so I could use the same general solution with clients using a BIOS iSCSI boot.
Is it possible to implement target assignment from the DHCP server side in dhcpd.conf, using the root-path option there (aka DHCP option 17)?
After doing some more reading last night it looks like it might at least be possible by using host or subclass statements, each having a unique root-path and being tied to a unique MAC, except then I have to capture all the client MAC addresses on the server. It would be nice if I could just tell the server when it hands out 10.0.0.1 hand out the root path for target01, and 10.0.0.2 hand out target02, and so on, so I can just pair targets to IPs. All the clients are identical so it doesn't actually matter if they get the same target every time and long as they each get a unique target.
Thanks,
Joe
-----Original Message-----
From: ipxe-devel-bounces at lists.ipxe.org [mailto:ipxe-devel-bounces at lists.ipxe.org] On Behalf Of Robin Smidsrød
Sent: Thursday, July 25, 2013 4:18 AM
To: ipxe-devel at lists.ipxe.org
Subject: Re: [ipxe-devel] help pushing iscsi targets with DHCP
On 25.07.2013 04:02, Gruher, Joseph R wrote:
> I have DHCP services and iSCSI targets running on a CentOS 6.4
> installation. So far so good. I would like to set up my clients to
> receive iSCSI target information via DHCP so I don’t have to configure
> them all manually.
That is a fairly common request. Be aware, though, that unless all your machines have identical hardware, you'll need to install a specific image for each type of hardware configuration. This has nothing to do with iSCSI, however, just normal Windows behavior.
> This is touched on here:
> http://etherboot.org/wiki/sanboot/iscsi_boot
That article only talks about how to "connect" your iSCSI target to your client and boot it. But if you don't already have an OS on that iSCSI volume it will just refuse to boot.
> The part I’m not following is this seems to specify a single iSCSI
> target that is going to be passed to every client. I would like each
> client to receive a unique target, for example, 10.0.01 gets target01,
> and 10.0.0.2 gets target02, and so on. Each client needs its own
> target for boot, unless I’m missing something.
I usually use the hostname, MAC, uuid or some other uniquely identifying variable to specify in an iPXE script which target is assigned to which client. And yes, you do need one target for each client (at least if you're running Windows on them, or any common non-cluster OS).
> Is this possible and could anyone point me to some guidance on how to
> implement it?
The installation can be done fairly straight-forward using wimboot + sanhook. You can see the script part I'm using here:
https://gist.github.com/robinsmidsrod/2234639#file-menu-ipxe-L417
Once your OS is installed, booting it is just a matter of using a script like this: https://gist.github.com/robinsmidsrod/2234639#file-menu-ipxe-L103
As you can see, that script does a lot of other things as well, but you only need these two pieces to netboot Windows.
If you want a bit more information on the installation part, read also this wiki article: http://ipxe.org/howto/winpe
-- Robin
_______________________________________________
ipxe-devel mailing list
ipxe-devel at lists.ipxe.org
https://lists.ipxe.org/mailman/listinfo.cgi/ipxe-devel
More information about the ipxe-devel
mailing list