Auto registration for unregistered hosts with Quick registration and invetory
-
[quote=“Tom Elliott, post: 43696, member: 7271”]I guess I’m not understanding what you’re trying to do.[/quote]
I thought I explained it well, guess not… Simply - I want register (and deploy image to) 150 new computers without need to plug every one of them to keyboard and monitor and I want it do quickly as possible when they arrive. My idea was to plug them few at the time to power and network, boot them, they automaticaly register to FOG with inventory info, they shutdown. I add these computers to one “deploy” group , add task to this group to deploy image, power on computers, let it do its works move them to “finished” group and repeat.I wanted do this with clonezlilla as we did it before, but I like the idea of have them registered, with invetory, have multiple different images ready for them when needed… So I started playing with FOG.
-
I think that’s easily done in the current SVN revision.
The newer revisions actually have a web GUI for editing the boot menu to your liking, including just quick-registering clients that aren’t registered. That’s probably the most common use for it.
-
[quote=“mrzo, post: 43743, member: 28859”]I count on it. But as I understood, quick registration only helps with naming, assigning image to registering hostsetc… But you must register host normaly (choose one of registration option from FOG boot menu, manualy register it on web page, etc…) Or am I mistaken?[/quote]
from the pop up description on this setting [CODE]Enable FOG Quick Registration auto population feature (0 = disabled, 1=enabled). If this feature is enabled, FOG will auto populate the host settings and automatically image the computer without any user intervention.[/CODE]
-
I don’t only read this information, but I also tried it. Not sure how it should work, but with Quick Registration configured, result was, when I booted targeted computer, FOG boot menu showed, and after few seconds computer booted back to OS on harddrive. When I manually choosed Quick registration and inventory from menu, host was registered with proper name given by settings, image was associated etc… But my interaction was needed. That is why I asked about possibility to choose Quick registration automaticaly from menu. This is for FOG 1.2.0 (I tried install trunk version also, but was not able to access FOG configuration page, so I did go back to 1.2.0) Am I missing something?
-
Sorry for the wall in advance. I actually was looking for this feature myself, looked at the Quick Registration Auto Population but found it didnt auto reg if something wasnt registered. I eventually figured it out and made the modification myself. If someone could provide some feedback on this, that would be great. Basically what I did was use the Host Is Valid check to make an if statement to choose between to variable = “” statements. This was all done in the BootMenu.class.php file right at line 138, might be different for you, I have FOG 1.2.0. This does require Auto Population to be turned on and configured to your specifications so as to properly fill out the sequential naming.
Attached is a screenshot of what it looks like for me. I’m sure this could be more appropriately coded, but I’m not the best at php.
TOM, If this isn’t already included, maybe we could add this and give it an on/off button in the webui?
Note: “DESTRUCTIVE: This will forcefully register and image ANY computer that is booted via PXE and isn’t already registered. I do not recommend this at all for a production network. Use with caution in a secure deployment network.”
[PHP]
####Add this
if ($this->Host && $this->Host->isValid()){
$defchoice2 = “choose --default fog.local --timeout $timeout target && goto ${target}\n”;
}ELSE{
$defchoice2 = “choose --default fog.reg --timeout $timeout target && goto ${target}\n”;
}
####Don’t touch thisif ($Advanced) $this->pxemenu['fog.advanced'] = 'Advanced Menu'; $this->memdisk = "kernel $memdisk"; $this->memtest = "initrd $memtest"; $this->kernel = "kernel $bzImage root=/dev/ram0 rw ramdisk_size=$ramsize ip=dhcp dns=$dns keymap=$keymap web=${webserver}${webroot} consoleblank=0 "; $this->initrd = "imgfetch $imagefile\n";
####Modify this
$this->defaultChoice = “$defchoice2”;
####[/PHP][url=“/_imported_xf_attachments/1/1788_Screenshot 2015-03-15 14.17.35.png?:”]Screenshot 2015-03-15 14.17.35.png[/url]
-
This already exists for dev fog.
-
Ahh, OK. I probably didn’t look hard/long enough. I am really good at missing information that’s right in front of me. I just got started with FOG last week and I must say I’m thoroughly impressed with it.
-
So, the solution could be install the trunk version?
-
In as simple terms as possible, yes!
-
Is it possible to shutdown computer after auto populating with given image instead of restarting (and booting from HD)?
-
It should be possible to customize your fog to allow for this but its not settable in fog you would have to see how the web gui does it when you manually deploy an image and check the shutdown after task box.
-
Have som problems with Fog - some computers don’t register correctly and when I checked the database, the host is registered with hostID 0 - related MAC address is in the table hostMAC (with hostID 0) but host is not showing in hosts list, and is not recognised as registered. Using older trunk version 3153.
When I manualy delete these two records from database, host register correctly. I have only two PC with thos problem and dont know why these two.
-
Just had third case - notice message “Host is not valid.” instead of “Done, with imaging”. Again delete from database, and host regiter succefully through automatic Quick registration.
-
I think this was addressed in a later SVN.
-
OK, I’ll try update to latest trunk.
-
Often when I update to the newest trunk I cannot change Fog Settings from web page (end in blank page, setting not changed, I must edit it directly in DB). Is there something I can do to fix this, or just wait to another trunk which address this?
-
What revision and do you have Apache error logs when the white screen occurs?
-
Version: 3278
And there was no log in apache error log file, only in access. I tried turn on PHP errors displaying and there is one fatal error:[B]Fatal error[/B]: Call to undefined function mcrypt_get_iv_size() in [B]/var/www/fog/lib/fog/FOGBase.class.php[/B] on line [B]301[/B]
-
Can you try 3279? The reason mcrypt_get_iv_size is failing, in my guesstimation is that my trying to keep errors from downloading the client files was what screwed this up for you. It should work better now, with any luck.
-
OK it seems for some reason mcrypt php module was installed but not enabled.
Fix:
php5enmod mcrypt
service apache2 restart