EUCweb / BIS-F

Base Image Script Framework (BIS-F)
https://eucweb.com
GNU General Public License v3.0
96 stars 34 forks source link

7.1912.1 Hydrate not starting - File precache configuration not found. Skipping. #201

Closed tschuegy closed 4 years ago

tschuegy commented 4 years ago

Hydration is not working propertly on Win10 1809. The settings are set in the GPO and i can see them in the log file:

01.02.2020 20:02:33 | CLAB05$ | INFORMATION... | Define new global variable LIC_BISF_POL_PVSHydration=1 01.02.2020 20:02:33 | CLAB05$ | INFORMATION... | Processing function New-BISFGlobalVariable 01.02.2020 20:02:33 | CLAB05$ | INFORMATION... | Define new global variable LIC_BISF_CLI_PVSHydration=YES 01.02.2020 20:02:33 | CLAB05$ | INFORMATION... | Processing function New-BISFGlobalVariable 01.02.2020 20:02:33 | CLAB05$ | INFORMATION... | Define new global variable LIC_BISF_CLI_PVSHydration_Paths=C:\Program Files|C:\Program Files (x86) 01.02.2020 20:02:33 | CLAB05$ | INFORMATION... | Processing function New-BISFGlobalVariable 01.02.2020 20:02:33 | CLAB05$ | INFORMATION... | Define new global variable LIC_BISF_CLI_PVSHydration_Extensions=.exe,.dll 01.02.2020 20:02:33 | CLAB05$ | INFORMATION... | Processing function New-BISFGlobalVariable

Powershell script "10_PersBISF_HydratePVS.ps1" skipped with following message: 01.02.2020 20:03:59 | CLAB05$ | INFORMATION... | =========================== 10_PersBISF_HydratePVS.ps1 =========================== 01.02.2020 20:03:59 | CLAB05$ | INFORMATION... | Processing function Test-BISFPVSSoftware 01.02.2020 20:03:59 | CLAB05$ | INFORMATION... | Processing function Test-BISFService 01.02.2020 20:03:59 | CLAB05$ | INFORMATION... | Service BNDevice exists 01.02.2020 20:04:00 | CLAB05$ | INFORMATION... | Product Citrix Provisioning Services Target Device Driver (PVS) (Version 7.24.0.24019) installed 01.02.2020 20:04:00 | CLAB05$ | INFORMATION... | File precache configuration not found. Skipping. 01.02.2020 20:04:00 | CLAB05$ | INFORMATION... | =========================== FINISH SCRIPT ===========================

Is it a bug or do i have a misconfiguration in my environment?

matthias-schlimm commented 4 years ago

wtf... I'm testing it last wednesday and it runs without issues, let me chek

matthias-schlimm commented 4 years ago

@tschuegy please upload the complete BIS-F personlization log here

tschuegy commented 4 years ago

Hallo Matthias

Du hast mich auf den richtigen Weg gebracht. Die InstallLocation in der Registry ist bei mir igendwie falsch. Werde es nochmals testen. Wenn OK, denn werde ich den thread schliessen.

Melde mich wieder und sorry für die Aufregung.

Gruss tschuegy

tschuegy commented 4 years ago

Mein Verdacht hat sich leider nicht bestätigt, obwohl der Registry Wert bei mir falsch war. Aber hydrate funktioniert bei mir noch immer nicht. Hier das komplette Logfile:

PERS_BISF_CLAB05_20200202-065612.log

tschuegy commented 4 years ago

@matthias-schlimm

My problem is that the variable $DisableMode has already the value $true bevore the script set it again. It must be set during another script?

grafik

It runs when i change the condition of the if: if (-not($LIC_BISF_CLI_PVSHydration -eq "YES")) { Write-BISFLog -Msg "File precache configuration not found. Skipping." -ShowConsole -Color Yellow Return }

matthias-schlimm commented 4 years ago

Tested it with latest Win 1809 (english OS only) and BIS-F 7.1912.1 and no modifications for the Check of the $DisableMode or $EnableMode

added the ouput to the console only, like you

image

My settings are looking different

image

please translate your above comment above to english, I will invite the origin developer of this script

matthias-schlimm commented 4 years ago

@Trentent can you have a look at this, I'm not able to reproduce it, but @tschuegy has a different output on this and the PVS Hydration is not working

matthias-schlimm commented 4 years ago

@tschuegy from the log above:

you have configured shared configuration to a unc path

02.02.2020 06:56:24 | CLAB05$ | INFORMATION... | Define new global variable LIC_BISF_CLI_EX=YES
02.02.2020 06:56:24 | CLAB05$ | INFORMATION... | Processing function New-BISFGlobalVariable
02.02.2020 06:56:24 | CLAB05$ | INFORMATION... | Define new global variable LIC_BISF_CLI_EX_PT=\\SLAB01.lab.local\netlogon\BISF

but also using a local one

02.02.2020 06:56:13 | CLAB05$ | INFORMATION... | Processing function Import-BISFSharedConfiguration
02.02.2020 06:56:13 | CLAB05$ | INFORMATION... | Import JSON Shared Configuration 
02.02.2020 06:56:13 | CLAB05$ | INFORMATION... | Reading Shared Configuration from file C:\Program Files (x86)\Base Image Script Framework (BIS-F)\BISFSharedConfig.json
02.02.2020 06:56:21 | CLAB05$ | INFORMATION... | Shared Configuration is stored in C:\Program Files\BISF\LoginConsultantsAndUCWeb_BISF_7.1912.1_all_en_SPB01\BISF-Configuration\LAB.LOCAL\BISFconfig_MicrosoftWindows10Enterprise_x64_1809.json
02.02.2020 06:56:21 | CLAB05$ | INFORMATION... | create RegHive HKLM:\SOFTWARE\Policies\Login Consultants\BISF
02.02.2020 06:56:21 | CLAB05$ | INFORMATION... | Import Json Configuration into local Registry to path HKLM:\SOFTWARE\Policies\Login Consultants\BISF

is there a configuration missmatch ?

tschuegy commented 4 years ago

I have a VM to create the json file to a central share and on the Master Image deployment i copyied that to local and set the location in BISFSharedConfig.json to the local one... I had done this, because i don't have GPO permissions on the customers AD.

But i can change anything in my LAB environment :-) How should i configure the settings? Only per GPO and no json file?

matthias-schlimm commented 4 years ago
tschuegy commented 4 years ago

I have no GPO on the target clients, only json file... but i will try to change it to gpo only...

Trentent commented 4 years ago

Hi team, just checking in on the results of the GPO/json testing.

matthias-schlimm commented 4 years ago

thanks Trentent,

I'm able to reproduce the issue now. if I'm configure it with GPO now, the settings are in the registry and right configured, but PVS Hydration is skipped.

My test this morning runs well will the json configuration .. wtf

I think as @tschuegy has described above it's possible to update the code and kick out the $EnableMode and $DisableMode ..

if (-not($LIC_BISF_CLI_PVSHydration -eq "YES")) {
Write-BISFLog -Msg "File precache configuration not found. Skipping." -ShowConsole -Color Yellow
Return
}

@Trentent what do you think ? What's your reason for the $EnableMode and $DisableMode?

Trentent commented 4 years ago

A lack of coffee most likely.

I think I did it so that way the if statement was easier to read (for me). It can be simplified by adopting @tschuegy fix. Then the two variable statements can be removed too.

...

Begin {
    $script_path = $MyInvocation.MyCommand.Path
    $script_dir = Split-Path -Parent $script_path
    $script_name = [System.IO.Path]::GetFileName($script_path)
    $PathsToCache = $LIC_BISF_CLI_PVSHydration_Paths
    $ExtensionsToCache = $LIC_BISF_CLI_PVSHydration_Extensions
}
function FileToCache ($File) {
    #Write-BISFLog -Msg "Caching File : $File" -ShowConsole -Color Cyan
    $hydratedFile = [System.IO.File]::ReadAllBytes($File)
}

if (-not(Test-BISFPVSSoftware)) {
    Write-BISFLog -Msg "PVS Software not found. Skipping file precache."  -ShowConsole -Color Yellow
    Return
}
if (-not($LIC_BISF_CLI_PVSHydration -eq "YES")) {
    Write-BISFLog -Msg "File precache configuration not found. Skipping."  -ShowConsole -Color Yellow
    Return
}

` ...

matthias-schlimm commented 4 years ago

ok, thanks .. I will update the code

matthias-schlimm commented 4 years ago

update in developer branch done

https://github.com/EUCweb/BIS-F/blob/develop/Framework/SubCall/Personalization/10_PersBISF_HydratePVS.ps1

matthias-schlimm commented 4 years ago

@tschuegy can you grab a copy of the developer branch and test it again please

tschuegy commented 4 years ago

@matthias-schlimm it works like a charm :-)