..and one FOG-VM to rule them all.
-
First, something I’ve been meaning to get off my chest for a while. A huge THANK YOU to the FOG Team for all the hard work and for making such an incredible imaging solution available to the masses! I’ve never seen such a flexible, free, easy to use solution and it’s become my default, even over all the expensive/enterprise alternates out there.
I don’t know whether or not anyone else has asked before, I’m not sure what search term to use in the forums. I use FOG in many different deployments, including as a Linux Mint VM w/Vmware Workstation on my primary laptop. It’s often that I need to use FOG at different office locations with different private network subnets. It’s really not a big deal for me to spin up several different FOG vm’s, each with their own unique static IP address but I was wondering if there’s an easy way I could quickly switch the static IP address and corresponding address defined in FOG so that I can use a single FOG-VM instead of multiple? I believe I ran across instructions in the forums a while back for re-IP’ng a FOG install but it seemed too complex/time consuming to get working right and when I was trying to do it, eventually threw up my hands and just re-installed Mint/FOG. Maybe this is more of a feature request and maybe it’s already been added but I’d appreciate it if someone could respond and tell me if this would be possible or not. I’d rather not have to edit the FOG configuration in multiple places and a bunch of configuration files in LM to accomplish this each time.
-
https://github.com/FOGProject/fog-community-scripts/tree/master/MakeFogMobile
Should allow you to do what you’re looking for.
-
AWESOME + Exactly what I’ve been looking for! Thanks so much Tom!
-
@lof you will probably want to install dnsmasq on your fog server and have the make fog mobile script manage that too. That way you can supply pxe boot information to your client network and still have a VMware that is assigned by dhcp address.
-
@george1421 The mobile script actually installs dnsmasq for you already!
-
@george1421 Thanks George! So I’ve already made sure DHCP at each location has server options 66/67 configured. 66 points to the assigned static for my FOG vm and 67 for the undionly kpxe option. My VM works perfectly for one location and I tested it recently and was able to pxe-boot 5 HP desktops and deploy images to them. So are you simply saying that instead of using static addresses at each location, I could install dnsmasq and have everything work using automatic-dhcp network settings on my Linux Mint vm instead of manual-static? Sorry if I’m not clear on what you’re driving at…
-
@tom-elliott Yes I thought I read that, …so would setting a static IP each time mess things up or you both are just saying it would be unnecessary with dnsmasq?
-
@lof said in ..and one FOG-VM to rule them all.:
so would setting a static IP each time mess things up or you both are just saying it would be unnecessary with dnsmasq?
With the MakeFogMobile project, your FOG Server should consume DHCP so that everything is automatic (no static required as this is opposite of mobility). Also, with the MakeFogMobile project, you no longer need options 66 and 67 to be set on your DHCP servers - dnsmasq handles it all from your mobile FOG server.
-
What if you don’t want dnsmasq or DHCP running on your FOG server? What if you want a FOG server to just be a FOG server?
-
@sudburr The script could be modified to not run dnsmasq if you don’t want it. However without this, one would run into difficulties with knowing the IP address of the FOG server to set DHCP option 66 with - as a windows DHCP server only allows one reservation for one MAC address, so you could not have more than one reservation in a DHCP server that serves several subnets. As well, you’d have to manually re-configure DHCP each time with the new lease or static IP - which is contrary to the idea of a mobile FOG Server.
-
@lof The best solution (IMO) for a mobile deployment server is to run dnsmasq on your fog server. That way regardless of the target environment, as long as your fog server is connected IT will be the pxe boot server. As soon as you unplug your mobile deployment server the target network will go back to what ever is currently configured in dhcp options 66 and 67. The only risk to the target environment is if they have voip phones that need to be provisioned via a pxe boot PBX AND they happen to reboot when your fog server is installed. They might not get their config file from the pbx. Its kind of a small risk, but still a risk.
-
@george1421 Thanks George and thanks everyone else for your responses. This is great news and exactly what I need. I’ve only configured DCHP options 66/67 at one office but there are three others where I haven’t and a couple of them don’t use Windows server-based DHCP but rather DHCP on local firewalls. All offices do have VOIP phones but I don’t think there will be any risk because they all operate on separate VLANS configured for VOIP traffic. I’m at one of the other offices today and plan to install MakeFogMobile with dnsmasq and see if I can get it to work. Since dnsmasq is included in MakeFogMobile all I should need to do is run install.sh as root in a folder containing the install.sh and MainScript.sh scripts, correct? Can I run those scripts from any location or is there a specific location you would recommend? As I said previously, my VM is running the current (18.3 Sylvia - Cinnamon 64-bit) version of Linux Mint.
-
@lof For your dnsmasq configuration.
- Make sure that dnsmasq version 2.76 or newer is installed with
dnsmasq -v
command. - Use the following config file for dnsmasq. Save it in /etc/dnsmasq.d and save it as ltsp.conf
# Don't function as a DNS server: port=0 # Log lots of extra information about DHCP transactions. log-dhcp # Set the root directory for files available via FTP. tftp-root=/tftpboot # The boot filename, Server name, Server Ip Address dhcp-boot=undionly.kpxe,,<fog_server_IP> # Disable re-use of the DHCP servername and filename fields as extra # option space. That's to avoid confusing some old or broken DHCP clients. dhcp-no-override # inspect the vendor class string and match the text to set the tag dhcp-vendorclass=BIOS,PXEClient:Arch:00000 dhcp-vendorclass=UEFI32,PXEClient:Arch:00006 dhcp-vendorclass=UEFI,PXEClient:Arch:00007 dhcp-vendorclass=UEFI64,PXEClient:Arch:00009 # Set the boot file name based on the matching tag from the vendor class (above) dhcp-boot=net:UEFI32,i386-efi/ipxe.efi,,<fog_server_IP> dhcp-boot=net:UEFI,ipxe.efi,,<fog_server_IP> dhcp-boot=net:UEFI64,ipxe.efi,,<fog_server_IP> # PXE menu. The first part is the text displayed to the user. The second is the timeout, in seconds. pxe-prompt="Booting FOG Client", 1 # The known types are x86PC, PC98, IA64_EFI, Alpha, Arc_x86, # Intel_Lean_Client, IA32_EFI, BC_EFI, Xscale_EFI and X86-64_EFI # This option is first and will be the default if there is no input from the user. pxe-service=X86PC, "Boot to FOG", undionly.kpxe pxe-service=X86-64_EFI, "Boot to FOG UEFI", ipxe.efi pxe-service=BC_EFI, "Boot to FOG UEFI PXE-BC", ipxe.efi dhcp-range=<fog_server_ip>,proxy
Make sure you change
<fog_server_ip>
to the current IP address of your FOG server. The make fog mobile script (only needs to be run once since it sets up a cron job) will modify this file when it runs. This dnsmasq configuration will give you dynamic boot file name based on the pxe booting client. (bios or uefi). - Make sure that dnsmasq version 2.76 or newer is installed with
-
@george1421 the scripts re-configure dnsmasq every time the IP of the box changes. See line 216 in the script.
-
@george1421 Thanks George/Wayne, so won’t the MakeFogMobile install.sh script install the current version of dnsmasq? Are you saying to run that script and then put the ltsp.conf with the content you listed into /etc/dnsmasq.d/ ? Will there already be a ltsp.conf file in there that I’ll need to overwrite? Just want to get all my ducks in a row before I try this.
-
@lof you need to install dnsmasq manually. Its not a direct function of fog.
-
@george1421 Thanks George, so the mobile script doesn’t install dnsmasq as Tom said yesterday? Sorry, that’s where I got the idea that the dnsmasq install would already be covered during the MakeFogMobile install.
-
@lof Mmmmm. I’m pretty sure that dnsmasq is not added by the script, but the script will manage dnsmasq if its installed. Wayne wrote the script so he would know for sure. But, if it was me, I would just install dnsmasq and be done with it.
-
@george1421 Oh ok, I’m looking at the tarballs now: www.thekelleys.org.uk/dnsmasq/ Look’s like dnsmasq-2.78.tar.gz is what I need. The software manager in Linux Mint has it listed but it’s only showing version 2.75 It says I already have the Dnsmasq-base (executable/docs) installed but its version 2.75 Do you think I should uninstall that?
-
@lof well you need the fixes in 2.76. I’m a bit surprised that mint is not current.
[edit] I just checked and ubuntu 16.04 is a bit behind. They only support 2.75 as you noted. Newer versions of ubuntu do support later releases of dnsmasq. I do have instructions on compiling your own copy. It should work with the tarball you found. I have not tested it with 2.78, but I guess try: https://forums.fogproject.org/topic/8725/compiling-dnsmasq-2-76-if-you-need-uefi-support