@loosus456
so running it /installfog.sh did not ask you? ok. running as root? otherwise I am not sure.
Posts made by mparlette
-
RE: Is the FOG installer supposed to ask for an image storage location?
-
RE: Is the FOG installer supposed to ask for an image storage location?
@loosus456
[root@localhost bin]# cat installfog.sh | grep /images
storageLocation=“/images”
echo -n " * What is the storage location for your images directory? (/images) "
[[ -z $storageLocation ]] && storageLocation=“/images”
while [[ ! -d $storageLocation && $storageLocation != “/images” ]]; do
echo -n " * Please enter a valid directory for your storage location (/images) "
[[ -z $storageLocation ]] && storageLocation=“/images” -
RE: Is the FOG installer supposed to ask for an image storage location?
pay attention to the instructions for the drive partitioning for CentOS. you will have a partition mounted on /images where they are stored at. Find it in the wiki.
Mike
-
RE: Disable snapin hashing
@Sebastian-Roth OK. I just didn’t wait long enough sorry to rattle your cage. Thanks for the help it did the hash just waited a while and it’s working now.
-
RE: Disable snapin hashing
@Sebastian-Roth Yes.
My setup is almost exact to @JJ-Fullmer except I am on 1.5.4
[root@localhost snapins]# systemctl status FOGSnapinHash
● FOGSnapinHash.service - FOGSnapinHash
Loaded: loaded (/usr/lib/systemd/system/FOGSnapinHash.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2019-02-05 16:19:42 PST; 2 months 15 days ago
Main PID: 2447 (FOGSnapinHash)
CGroup: /system.slice/FOGSnapinHash.service
├─2447 /usr/bin/php -q /opt/fog/service/FOGSnapinHash/FOGSnapinHash &
└─2475 /usr/bin/php -q /opt/fog/service/FOGSnapinHash/FOGSnapinHash &Feb 05 16:19:42 localhost systemd[1]: Started FOGSnapinHash.
Feb 05 16:19:42 localhost systemd[1]: Starting FOGSnapinHash… -
RE: Disable snapin hashing
@JJ-Fullmer @Sebastian-Roth I would really like some help in this area as well. I am creating snapins and just got stuck in the same spot.
---------------------------------SnapinClient---------------------------------
4/23/2019 12:39 PM Client-Info Client Version: 0.11.16
4/23/2019 12:39 PM Client-Info Client OS: Windows
4/23/2019 12:39 PM Client-Info Server Version: 1.5.4
4/23/2019 12:39 PM Middleware::Response Success
4/23/2019 12:39 PM SnapinClient Running snapin test
4/23/2019 12:39 PM SnapinClient ERROR: Snapin hash does not exist@JJ-Fullmer check it out using your stuff
$dataSet = @{“name” = “test4”
“description” = “test4”
“file” = “MA-Redirect.ps1”
“args” = “747EPO.CDA.BEA.LAB”
“runWith” = “powershell.exe”
“isEnabled” = “1”
“runWithArgs” = “-ExecutionPolicy Bypass -NoProfile -File”}
$dataToSend = ($dataSet | ConvertTo-JSON)
New-FogObject -type object -coreObject snapin -jsonData $dataToSend
-
RE: FOG API AD JSON Settings
Well so far it works with using a “1” for “useAD” and “ADDomain” is getting populated. But here is the catch I wasn’t using the create, this was an edit:
foreach($row2 in $hosts.hostID){ $HostJson = (@{hosts = $row2; createdBy = "groups6"; description = "$($depname[0])"; imageID = "2"; "useAD" = "1"; "ADDomain" = "ede" } | ConvertTo-Json) $HostURL = $baseUri+"/host/" + $row2 +"/edit" Invoke-RestMethod -Uri $HostURL -Method PUT -Headers $headers -body $HostJson -ContentType "application/json" }
-
RE: FOG API AD JSON Settings
Rob / Sebastian -
I am going to attempt to do some testing in this area. I am using @JJ-Fullmer module with great success. You should investigate his work as well. I will let you guys know what I find out. I am snatching up the code and will give it a try on my script. Which version of FOG are you using 1.5.4?
Mike Parlette
-
RE: Update-FogObject / Powershell module use
@JJ-Fullmer I love your PS module, great work! I am still hammering away on things. and I will let you know if I run across anything else like this. I have been able to make a neat script in less than 200 lines that does a lot based off of a CSV input file.
-
RE: Update-FogObject / Powershell module use
I have this figured out. IT seems like the Update-FogObject PS module isn’t handling this correctly (Content type issue?). Just used Invoke-RestMethod instead.
Please resolve this.
Thanks. -
Update-FogObject / Powershell module use
Not sure if this is the correct place for this post but I am using the PowerShell module created by: JJ Fullmer
https://github.com/FOGProject/fog-community-scripts/tree/master/PowershellModules/FogApiCan someone look over this code for me? Trying to move hosts from one group to another:
Import-Module FogApi $Groupnames = Get-FogObject -type object -coreObject group $groupassoc = (Get-FogObject -type object -coreObject groupassociation).groupassociations $queue = $Groupnames.groups | where {$_.Name -eq "Queued"} $Hostnames = (Get-FogObject -type object -coreObject host).hosts $sys_queue = $groupassoc | where {$_.groupID -eq $queue.id} $free_sys = $groupassoc | where {$_.groupID -eq "0"} if($free_sys.Count -gt 0){ Write-host I found $free_sys.count hosts to move to Queued. foreach($freehost in $free_sys){ #command to move $free_sys to queued group. $HostJson = (@{hosts = $free_sys.ID} | ConvertTo-Json) write-host Update-FogObject ... Update-FogObject -type object -coreObject group -jsonData $HostJson -IDofObject $queue.ID } }
output:
Update-FogObject ... Invoke-RestMethod : The remote server returned an error: (501) Not Implemented. At C:\Program Files\WindowsPowerShell\Modules\FogApi\FogApi.psm1:270 char:19 + $result = Invoke-RestMethod @apiCall; + ~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand PS C:\Users\Administrator> $HostJson { "hosts": [ "34", "35", "36", "37", "38", "39", "40", "41", "42", "43" ] } PS C:\Users\Administrator> $queue.ID 35
-
RE: Date off in dashboard #253 - Github
Thanks George.
CentOS 7 w/ FOG 1.5.4
/etc/php.ini date.timezone entry was commented out.corrected with:
date.timezone =“America/Vancouver”rebooted, and seems to be showing correctly now:
Appreciate the help, I have a mega lab of hardware that I am gonna be setting up with FOG for McAfee. You may see me around the forums from time to time.
Do you want me to retract the GitHub bug report?
Mike Parlette
-
RE: Date off in dashboard #253 - Github
@george1421
mrparle@10-72-101-22 ~]$ php -i |grep “php.ini”
Configuration File (php.ini) Path => /etc
Loaded Configuration File => /etc/php.ini
PHP Warning: Unknown: It is not safe to rely on the system’s timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone ‘UTC’ for now, but please set date.timezone to select your timezone. in Unknown on line 0
[mrparle@10-72-101-22 ~]$I dont see a timezone setting in the e /opt/fog/.fogsettings file
gui shows:
TZ INFO > UTC [UTC + 0:00]So should I set the php.ini and match the setting in the gui / restart services / reboot and see if that makes it work?
Thanks Mike
-
Date off in dashboard #253 - Github
Has anyone had this issue before? I have the system time showing me the correct date and time. So the graph on the dashboard is 1 day off.
[mrparle@10-72-101-22 fog]$ date
Tue Jun 26 16:41:26 PDT 2018 -
RE: CentOS 7 Installation Problems
@wanderbread I am not sure what is going on but I was extremely happy with the CentOS 7 install. Make sure to follow the specific install instructions for the flavor. I was able to blow it all away and rebuild the server within a few hours no problems. Good luck.