[SOLVED] iscsi and dhcp question/suggestion.



  • Hi.

    I'm new at this, so please let me know if I'm missing something obvious.

    I'm playing with servers, virtualization and iscsi. I have server A and B, both running proxmox, which is a bare metal hypervisor. My third server C is running ubuntu server and working as a SAN as an iscsi target.

    My goal is to create virtual machines on A and B and have them install on iscsi targets on C. The plan is being able to easily move the virtual machines between A and B because all data is stored on C.

    Here's how far I've gotten so far.

    I create a VM on A called Adam. I allocate space on C and make an iscsi target called iqn.2018-05.local.mynet:adamsstorage.sys0. On A I define that Adam has no local harddrive but two network cards - one for regular trafic, one for iscsi duty.

    I boot up Adam with ubuntu server 16.04, it asks me all the regular stuff, language preferences, username, timezone. It also asks which of the two network cards I want to use as the primary and I pick the iscsi one.

    Then the installer looks for a drive to install on and after a while gives up and gives me a menu to select from. I pick iscsi from the menu and type "iscsi:<ipnumber of="" c="">:iqn.2018-05.local.mynet:adamsstorage.sys0" and hit enter. Everything installs just fine and eventually it asks me to reboot.

    That's where the "trouble" starts.

    Since there are no drives defined in the VM setting for Adam it goes to network boot and starts looking for a iPXE solution. It doesn't find one and after a while reboots and starts looking again. If I manually break the boot sequence, enters the iPXE command line and types "sanboot iscsi:<ipnumber of="" c="">:iqn.2018-05.local.mynet:adamsstorage.sys0" it boots from the iscsi image on C and everything is fine. Next time I boot I have to manually enter it again, which gets a bit tiresome.

    Time to ask pfsense for help. I run a pfsense router/firewall and it hands out dhcp addresses to everything on my network. I have done static dhcp mappings for A, B and C, works like a charm.

    If I go to the dhcp settings for my iscsi network I have an option called Network Booting. If I enter "iscsi:<ipnumber of="" c="">:iqn.2018-05.local.mynet:adamsstorage.sys0" under Root Path the Adam virtual machine boots up fine.

    So far, so good.

    Trouble is, then I create a second VM called Bob. Bob installs on <ipnumber of="" c="">:iqn.2018-05.local.mynet:bobsstorage.sys0 on C, but pfsense tells him to boot from <ipnumber of="" c="">:iqn.2018-05.local.mynet:adamsstorage.sys0 too - which is less than optimal.

    Is there any way to add the Network Booting option to the individual static dhcp mappings so I'll be able to tell Adam to use <ipnumber of="" c="">:iqn.2018-05.local.mynet:adamsstorage.sys0 for booting while Bob is told to use <ipnumber of="" c="">:iqn.2018-05.local.mynet:bobsstorage.sys0 instead?

    ..or is there a smarter way to do it?</ipnumber></ipnumber></ipnumber></ipnumber></ipnumber></ipnumber></ipnumber>



  • Nevermind, I found the option to set the Root Path for individual static dhcp entries.