Figured I should add, my speed issue was related to running PHPIPAM (a ip management tool) on my storage node server. It was slowing my image deploys down, not the zstd. It’s crazy fast at compression level 19 now.
Best posts made by JJ Fullmer
-
RE: ZSTD Compression
-
RE: FOG API add snapin, run task and then delete
@sebastian-roth Hey that’s me!
@Chris-Whiteley I do this all the time. So 100% yes you can do this. I even have some pre-built helper functions for it in the published powershell module FogApi.
So step one is install and setup the fogapi powershell module (check the links in my signature)I actually do pretty much that exact process in my provisioning of machines.
Check outSet-fogsnapins
for setting a list of snapins to a host https://fogapi.readthedocs.io/en/latest/commands/Set-FogSnapins/
(I just noticed I forgot to remove the $dept parameter in that function, that was for my internal use, you can just ignore it)Start-FogSnapins
for starting the deploy all snapins task on a host
https://fogapi.readthedocs.io/en/latest/commands/Start-FogSnapins/Remove-FogObject
for removing the snapins from a host, looks like I haven’t published a helper function for removing the snapins just yet.
https://fogapi.readthedocs.io/en/latest/commands/Remove-FogObject/- here’s an example of how you would remove the snapins. To remove them you have to remove the snapinassociation object.
#create a list/array of the snapins you want to remove $snapinsToRemove = @('snapin','names','here'); #get all the snapin associaion objects $AllAssocs = (Get-FogObject -type object -coreObject snapinassociation).snapinassociations # Get the snapins associated with your host $AllHostSnapins = Get-FogAssociatedSnapins -hostId $hostID; #get the ids of the snapins you want to remove, from the list of snapins attached to your host. $snapinIds = ($AllHostSnapins | Where-Object name -in $snapinsToRemove).id #Get a list of the snapinassociation ids that match your host id and are in the list of snapin ids attached to your host $assocsToRemove = $allAssocs | Where-Object { $_.hostID -eq $hostID -AND $_.snapinID -in $snapinIds} # loop through the found associations and remove them $assocsToRemove | ForEach-Object { Remove-FogObject -type object -coreObject snapinassociation -IDofObject $_.id; }
That should do the trick.
-
RE: Capture not the entire disk but more than one partition
As a side note:
The image type description in the wiki (I got there from the balloon help: https://wiki.fogproject.org/wiki/index.php?title=Managing_FOG#Images) points to a non-existing page (404): https://docs.fogproject.org/en/latest/management/image-management.htmlThanks! @JJ-Fullmer would you find the time to fix that quickly?
Fixed!
@medchemii thanks for letting us know. We changed the structure of the new docs page a bit and it affected the links. We’re working on getting redirection working for old links still -
Adding Custom Printer Configuration
Add printer configuration to printer management. i.e. a sharp copier that requires you to manually click auto configuration for the printer to update it’s settings to match the printer.
I already have this scripted and imagine it would be pretty easy to add to the existing printer management. I would gladly add and test the code myself if someone could point me in the right direction.So lets say you have added a printer and configured it to all the correct settings, like how many input trays, types of output trays, maybe it requires putting in a security pin or it has a punch module. And it looks like this for example.
Then to save those configuration settings you simply need to run this command in a command prompt
RUNDLL32 PRINTUI.DLL,PrintUIEntry /Ss /n"Printer Name" /a Path\ConfigFile.dat m f g p
and then to configure the printer once it’s been added with the saved config
RUNDLL32 PRINTUI.DLL,PrintUIEntry /Sr /n"Printer Name" /a Path\ConfigFile.dat m f g p
I imagine that the way the print manager works is similar to the script I use to add a printer with the similar command line inputs.
For example, I can use the following script (manually adding in the parameters in the call of installPrinter in the main function) to install a printer. I could probably easily change it to take arguments into the execution like snapin arguments taken from the printer information. Which I imagine is somewhat how the add a printer works.@ECHO off call :main exit :main REM Function to call other functions and run the installation process call :setVars call :funcHead "Welcome to the Printer installer!" REM inputs: 1 - Printer Port Name, 2 - printer ip or hostname 3- driverPath 4 - printer name 5 - printer model 6 - config file 7 - raw or lpr call :installPrinter EXIT /B :setVars REM function for setting script variables, typically for directories call :funcHead "Setting script variables" set share="\\networkShare\Printers\Drivers" net use "%share%" echo. done! EXIT /B :installPrinter REM Function to add a new Printer REM inputs: 1 - Printer Port Name, 2 - printer ip or hostname 3- driverPath 4 - printer name 5 - printer model 6 - config file 7 - raw or lpr call :funcHead "Installing Printer %~4" call :printerPort %~1 %~2 %~7 call :printerDriver "%~3" call :addPrinter "%~4" "%~5" %~1 call :configPrinter "%~6" "%~4" echo. done installing printer %~4! EXIT /B :printerPort REM function for adding a printer port REM var inputs 1 - port name 2 -hostname or ip address 3 -port type (raw or lpr) call :dots echo. Creating the printer port... IF %~3==lpr ( Cscript %WINDIR%\System32\Printing_Admin_Scripts\en-US\Prnport.vbs -a -r %~1 -h %~2 -o lpr -q lp -n 515 ) ELSE ( REM raw Cscript %WINDIR%\System32\Printing_Admin_Scripts\en-US\Prnport.vbs -a -r %~1 -h %~2 -o raw -n 9100 ) echo. done! call :dots EXIT /B :printerDriver REM function to add the driver input 1=full driver path call :dots echo. Adding printer driver... PNPUTIL -i -a "%~1" echo. done! call :dots EXIT /B :addPrinter REM add the printer to the created port REM 1 - printer name 2 - printer model associated with driver 3 - port name call :dots echo. adding printer to network port... Cscript %WINDIR%\System32\Printing_Admin_Scripts\en-US\Prnmngr.vbs -a -p "%~1" -m "%~2" -r %~3 echo. done! call :dots :configPrinter REM add any special printer configurations REM 1 - config file path 2 - printer name call :dots echo. Configuring Printer... REM To create a config file for a printer, use the following syntax REM RUNDLL32 PRINTUI.DLL,PrintUIEntry /Ss /nPrinterName /a ConfigFilePath.dat m f g p RUNDLL32 PRINTUI.DLL,PrintUIEntry /Sr /n"%~2" /a %~1 m f g p echo. done! call :dots EXIT /B :dots REM just echoing dots in a Function instead of copy pasting them so that it's consistent echo ...................................................................... EXIT /B :funcHead REM A simple function for displaying a consistent header at the start of functions call :dots echo. %~1 call :dots EXIT /B
I would rather use the fog print management with the added ability to import printer config files, as it is the only thing it doesn’t do that my scripting method does. Granted I could just set this idea up as a snapin, but I don’t have the remove printer functionality in my script as is. So What can I do to add this functionality in.
-
RE: Version stable
@Andrew-Single This post I made many moons ago at my old job might be helpful to you. It may require some adaptation, but I still use it on a daily basis to update my fog to the latest version…
Also this is the wiki on how to install the svn version manually
https://wiki.fogproject.org/wiki/index.php/SVNhope that helps
-
RE: Odd NFS issue
I mount my /images from an attached array straight into the /images folder and it works without issue. But I’m using ubunutu 14.04 and the drive is formatted as ext4. But regardless I imagine it would still work.
What does your /etc/exports look like?
cat /etc/exports
what does your /etc/fstab say? That’s where the options for mounting it in the os would be
cat /etc/fstab
what are the permissions currently on /images?
ls -l /images
Are you on the latest trunk of FOG 1.2? I think FOG 1.2 had a fogstorage user that needed permissions to the storage nodes and its password needs to be set correctly in the gui storage node settings.
Does the graph of the space usage display on the fog gui homepage?
Are you able to mount the nfs drive elsewhere?
for example if you happen to have an enterprise version of windows install the
“client for NFS” in the “turn windows features on and off” found in the “add or remove programs” control panel.If that client is installed you can mount an NFS share in windows by either
running this command in a run prompt…\fog-server\images
or
In command linemount \\fog-server\images Z: cd /d Z: Z:\>dir images directory listing pops up
Granted @Wayne-Workman is probably right saying you should add it as a separate storage node since its hosted on a different machine and a different OS and all. But some of this might help troubleshoot this if getting it to work is possible through your current configuration
-
RE: Client boot to HD goes to memtest.
@AlexMaxwell I don’t suppose you’d be willing to share how you got winPE to work through pxe using an iso? I tried to do that many moons ago to no avail.
Please and thank you =D -
RE: FOG 1.3 persistent groups
@Sebastian-Roth
Ok let me try to explain at least my idea in a simpler way. I tend to use too many words.So lets say you have a department like accounting. This department all needs access to the same printers, software, and needs to be in the same OU.
I want to be able to add a host to the accounting group that already has all those settings saved.
So when I add a host to the accounting group I can then apply all the saved printers, OU settings, snapins, and image with a single action.Does that make sense?
I think @george1421’s desires are a little more complex then mind, but a similar idea.
-
RE: New Inits
Sadly the resizable download doesn’t work on nvme drives. mps and mpa do work though.
-
RE: dnsmasq breaks apt-get
If you want to make it so you don’t have to comment out port=0 then you can fix this by fixing the resolvconf missing dns server issue.
See this old post for a ton of detail…
https://forums.fogproject.org/topic/2799/dnsmasq-kills-dns-lookup-on-fog-server/6
I know I’ve posted it in a more readable form more recently, but found that one first.TL:DR
just edit the interface-order at/etc/resolvconf/interface-order
to have your main ethernet adapter at the top and be sure to have nameserver lines defined in your static ip definitions if not using dhcp. -
RE: Client boot to HD goes to memtest.
@AlexMaxwell You are a beautiful and wonderful person.
-
RE: ZSTD Compression
@Junkhacker Well deploy is where speed is more important to me.
I gave 19 a go with the split and it actually had some weird error on the first deploy, I was in a meeting in my office so I didn’t really get to see the whole thing, but then it auto-retried the task and worked proper the second time. 2 minutes 18 seconds. The image size on the server seems to still be bigger than pigz was with 7.1 GB for a 15 GB image instead of 6.7 G for the old 18 GB image. But, don’t need to be too picky about it.@Tom-Elliott Two minor issues I noticed. The first time (the slow deploy) I queued the image after doing a full host inventory via the pxe boot on the host. I had not specified any snapins and it randomly added like 10 of them. The second time I queued it from the gui and deleted the snapins and the problem didn’t repeat itself. However in both instances the drive didn’t resize itself.
-
RE: MSI Silent install
Although I imagine you figured this out by now, I also wanted to do this and found this post. I figured this is as good a spot as any to post it.
I’ve noticed that the service works better when it’s installed on each computer after imaging rather than trying to include it as part of an image.
So the idea of this script is to download the latest version and install it silently right after imaging, so I would suggest adding it as a snapin that you put on all clients. The only change you should need to make is changing the fogip variable to your fog server ip.@ECHO off set fogip=192.168.100.100 echo "downloading latest client..." powershell -Command "wget http://%fogip%/fog.client/download.php?newclient -OutFile C:\FOGService.msi;" echo "installing client..." msiexec /i C:\FOGService.msi /quiet WEBADDRESS=%fogip% echo "starting service..." net start FOGService echo "Done!" exit
-
RE: Unable to Register Optiplex 780
How is your FOG server configured for dhcp?
Do you use a dnsmasq dhcp proxy?
Is fog the dhcp server?
Do you have a linux or windows dhcp server externally? -
RE: ZSTD Compression
@JJ-Fullmer Well it wasn’t actually phpipam that was slowing it down.
I had some ssl logs running for a website running on that server. It was tracking access logs for every access of the ssl cert and site. Which was also adding up to over 400 GB of logs. I changed the apache configuration of the site to log much less. That solved the problem. So again, nothing wrong with zstd. Just wanted to have the right answer in case someone else happens to see a constant 5-8 Mbps transmit and receive on a storage node. -
RE: Windows 10 Image
Since you’re very new to FOG server I feel the need to ask if you’ve been able to make images for windows 7 or 8?
Are you just new to FOG or are you new to imaging entirely?Depending on what customizations you want to make, making an image for any version of windows isn’t all that different really.
What is your end goal here?
-
RE: MSI Silent install
@Jbob oh sorry, that was kind of vague.
It starts and all that but it doesn’t seem to do anything when I set the client to a task on the server.
This could be just me and I need to test more though. -
RE: m.2 PCIe SSD not recognised in FOG
@Toby777 I think it might still work on larger drives and you can manually expand the partition. That’s pretty good for RAW from what I’ve seen. Trouble with RAW is that it does every sector of the drive no matter how much space is taken up. Before multiple and extended linux partitions became supported I only used it for very specialized images for computers that were always the same size hard drive.