@JeremyBrown Are you still having this issue?
The fog log is saying that the host has multiple macs
If it’s still happening I will gladly help you use the fogApi powershell module to find the duplicate macs and how to fix it from there.
@JeremyBrown Are you still having this issue?
The fog log is saying that the host has multiple macs
If it’s still happening I will gladly help you use the fogApi powershell module to find the duplicate macs and how to fix it from there.
@JJ-Fullmer No difference with a different image.
This is the error message
Here is the ls -l of that image
ls -l /images/Base-Stable/
total 11098480
-rwxrwxr-x 1 fogproject root 6 Oct 12 07:34 d1.fixed_size_partitions
-rwxrwxr-x 1 fogproject root 1048576 Oct 12 07:35 d1.mbr
-rwxrwxr-x 1 fogproject root 872 Oct 12 07:35 d1.minimum.partitions
-rwxrwxr-x 1 fogproject root 20 Oct 12 07:34 d1.original.fstypes
-rwxrwxr-x 1 fogproject root 0 Oct 12 07:34 d1.original.swapuuids
-rwxrwxr-x 1 fogproject root 10722570 Oct 12 07:35 d1p1.img
-rwxrwxr-x 1 fogproject root 754 Oct 12 07:35 d1p2.img
-rwxrwxr-x 1 fogproject root 11352884934 Oct 12 07:40 d1p3.img
-rwxrwxr-x 1 fogproject root 153330 Oct 12 07:40 d1p4.img
-rwxrwxr-x 1 fogproject root 872 Oct 12 07:34 d1.partitions
-rwxrwxr-x 1 fogproject root 872 Oct 12 07:35 d1.shrunken.partitions
And the contents of d1.partitions
cat /images/Base-Stable/d1.partitions
label: gpt
label-id: 745A6813-735A-4940-840D-28D0E805850A
device: /dev/nvme0n1
unit: sectors
first-lba: 34
last-lba: 83886046
sector-size: 512
/dev/nvme0n1p1 : start= 2048, size= 204800, type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B, uuid=CFB2D745-2975-480D-BD56-EA18B65E03C5, name="EFI system partition", attrs="GUID:63"
/dev/nvme0n1p2 : start= 206848, size= 32768, type=E3C9E316-0B5C-4DB8-817D-F92DF00215AE, uuid=57426B89-9DEE-4BDF-9CBF-E9452D985FD5, name="Microsoft reserved partition", attrs="GUID:63"
/dev/nvme0n1p3 : start= 239616, size= 57417925, type=EBD0A0A2-B9E5-4433-87C0-68B6B72699C7, uuid=857B1626-9DC1-44FD-8120-2AB922BBBD85, name="Basic data partition"
/dev/nvme0n1p4 : start= 82761728, size= 1120256, type=DE94BBA4-06D1-4D40-A16A-BFD50179D6AC, uuid=DE086091-5C6A-4D63-89E2-579581B9BD63, attrs="RequiredPartition GUID:63"
Maybe it’s because it’s captured as /dev/nvmeXX instead of /dev/sdaXX ? Just brainstorming there.
Doing an update to the latest dev version just to be sure this isn’t fixed in a recent patch.
Found that enabling just the PCI option
PCI bus based UFS Controller support
is all that is needed for the disk to show in FOS
On my first attempt to image though it gave errors regarding partition overlap and partition size. The disk shows in fog as 119 GB, my win 10 image (single disk resizable) is under 22 GB. Not sure how it isn’t expanding into the disk, there may be something else special needed.
Trying a different image.
Should also mention I’m using the latest available linux kernel version for the test 6.6.1
Some possible usb options found when searching UFS in kernel config.
Seems like we need the UFSCHD driver defined here https://www.kernel.org/doc/html/latest/scsi/ufs.html
One generic option for UFS was enabled at the top level.
Symbol: PHY_MTK_UFS [=n] │
│ Type : tristate │
│ Defined at drivers/phy/mediatek/Kconfig:30 │
│ Prompt: MediaTek UFS M-PHY driver │
│ Depends on: (ARCH_MEDIATEK || COMPILE_TEST [=n]) && OF [=n] │
│ Location: │
│ -> Device Drivers │
│ (1) -> PHY Subsystem │
│ -> MediaTek UFS M-PHY driver (PHY_MTK_UFS [=n]) │
│ Selects: GENERIC_PHY [=y] │
│ Selected by [n]: │
│ - SCSI_UFS_MEDIATEK [=n] && SCSI_UFSHCD [=y] && SCSI_UFSHCD_PLATFORM [=y] && ARCH_MEDIATEK && RESET_CONTROLLE
Symbol: PHY_QCOM_QMP_UFS [=n] │
│ Type : tristate │
│ Defined at drivers/phy/qualcomm/Kconfig:89 │
│ Prompt: Qualcomm QMP UFS PHY Driver │
│ Depends on: PHY_QCOM_QMP [=n] │
│ Location: │
│ -> Device Drivers │
│ (2) -> PHY Subsystem │
│ -> Qualcomm QMP PHY Drivers (PHY_QCOM_QMP [=n]) │
│ -> Qualcomm QMP UFS PHY Driver (PHY_QCOM_QMP_UFS [=n]) │
│ Selects: GENERIC_PHY [=y]
Symbol: PHY_SAMSUNG_UFS [=n] │
│ Type : tristate │
│ Defined at drivers/phy/samsung/Kconfig:32 │
│ Prompt: Exynos SoC series UFS PHY driver │
│ Depends on: OF [=n] && (ARCH_EXYNOS || COMPILE_TEST [=n]) │
│ Location: │
│ -> Device Drivers │
│ (3) -> PHY Subsystem │
│ -> Exynos SoC series UFS PHY driver (PHY_SAMSUNG_UFS [=n]) │
│ Selects: GENERIC_PHY [=y]
This top level was enabled
Symbol: SCSI_UFSHCD [=y] │
│ Type : tristate │
│ Defined at drivers/ufs/Kconfig:6 │
│ Prompt: Universal Flash Storage Controller │
│ Depends on: SCSI [=y] && SCSI_DMA [=y] │
│ Location: │
│ -> Device Drivers │
│ (4) -> Universal Flash Storage Controller (SCSI_UFSHCD [=y]) │
│ Selects: PM_DEVFREQ [=y] && DEVFREQ_GOV_SIMPLE_ONDEMAND [=y] && NLS [=y]
This one was not enabled, enabling it in a test
Symbol: SCSI_UFSHCD_PLATFORM [=y] │
│ Type : tristate │
│ Defined at drivers/ufs/host/Kconfig:30 │
│ Prompt: Platform bus based UFS Controller support │
│ Depends on: SCSI_UFSHCD [=y] && HAS_IOMEM [=y] │
│ Location: │
│ -> Device Drivers │
│ -> Universal Flash Storage Controller (SCSI_UFSHCD [=y]) │
│ (6) -> Platform bus based UFS Controller support (SCSI_UFSHCD_PLATFORM [=y])
Also enabling these other choices
--- Universal Flash Storage Controller │ │
│ │ [*] Universal Flash Storage BSG device node │ │
│ │ [*] PCI bus based UFS Controller support │ │
│ │ [ ] DesignWare pci support using a G210 Test Chip │ │
│ │ [*] Platform bus based UFS Controller support │ │
│ │ [] Cadence UFS Controller platform driver
Microsoft recently released a “business only” surface Go 4.
This go around they switched from having an NVME controller option to only offering a UFS based option.
See also https://www.microsoft.com/en-us/surface/business/surface-go-4
In the past models you could get either eMMC based storage or NVME based storage.
UFS, being as it has previously not been a common pc form factor storage option, is not supported in the Fog Kernel (I’m on 6.1.22)
I imagine for me to get this thing deployed right now, I’ll need to go build a custom kernel.
Perhaps we can add UFS storage support in the kernel going forward?
A minor bugfix update has been released…and then something more was caught (aliases for functions weren’t being exported) and another version was released right after
Release notes: https://github.com/darksidemilk/FogApi/releases/tag/2310.6.3
PSGallery: https://www.powershellgallery.com/packages/FogApi/2310.6.3
@Lenain Just a little FYI.
I don’t know when I’ll have time to test it out fully before putting it into production, but the idea of adding this to the module was not forgotten and I started a branch for it while I was working on some other bug fixes
https://github.com/darksidemilk/FogApi/commit/03c0342cff759ef272a64bbb91cbb1b5999bab9c
@typotony Sorry I’m late to the party.
I haven’t built a “helper” command yet for removing fog images, but I do have Get-FogImages
https://fogapi.readthedocs.io/en/latest/commands/Get-FogImages/
If you setup the fogapi powershell module, you can use that to get a list of the current images.
You can delete the records of the fog images from the database via
i.e. this would delete ALL your images
$images = get-fogimages
$images | Foreach-object {
Remove-fogobject -type object -coreObject image -idofobject $_.data.id
}
That little snippet is untested but should be enough to get you started.
I’m pretty sure the api command won’t remove the files from the server though.
However, I believe the path to the files, or at least the relative path is in a child property of the data property when you run Get-FogImages.
So if you set this up to run on the linux based fog server using the powershell api module, you could script something that runs in a cronjob to delete from the database and then the files.
i.e. (again untested as I’m away from my test environment, so the property names are guesses, but it should point you in the right direction)
Get-FogImages | % {
if ($_.data.name -eq "removeMe") {
Remove-fogobject -type object -coreObject image -idofobject $_.data.id
rm -fr $_.data.path
}
}
This, if run on the fog server where you have configured the fogapi module (see my signature for doc links), would find images named “removeMe” and then delete them from the database and then the files from the server.
@Sebastian-Roth Sadly I have not actually done this.
I believe that it is possible and @tom-elliott may have some insight on accessing the api over https. I believe he has some forum posts elsewhere discussing it. I think there may be some fog server side configuration needed to enable https api. For sure you need to have the root CA certificate that issued your fog server web certificate trusted on the machine issuing the commands. In theory that should be all there is to it, but I haven’t done a ton of testing on it, and while it’s on my to-do list, it’s a bit far down the list. Not to say SSL/TLS isn’t very important even behind a firewall, I just haven’t got there yet.
@glequeau In theory, if you can get all the certificates trusted correctly and can access a fog api url in a browser over https, then it should work for the powershell commands as well. That’s how it typically works with powershell and api commands.
That was long, here’s a short version:
If that doesn’t work, then we just have more development needed on https api commands
You could also try editing your locally installed version of the fogapi module. Specifically the invoke-fogapi command (probably at C:\program files\windowspowershell\modules\fogapi\2303.5.33\fogapi.psm1
) then search for that command in the compiled version of the file.
You would add the -SkipCertificateCheck
switch to all calls to invoke-restmethod
and invoke-webrequest
which would bypass that error and still use the ssl connection, but ignore errors about untrusted certificates
@Sebastian-Roth I have a work in progress concept for permanent links. But things have gotten busy and I haven’t had much free time to get it working in full.
Short version is that we’ll be able to create uuids for all pages and that can be used as a permanent link even if it moves elsewhere in the doc.
@Lenain That’s great to hear, glad we could get it figured out.
@JJ-Fullmer I think I have determined this is a problem in an internal process with the api. Gonna try to narrow it down some more.
@KaiHerlemann
You should be able to do this without too much trouble for just the basic ssl communication like you do for any other linux server. I would suggest at install time NOT selecting ssl and then altering the config to use your custom certificate. I don’t think we’ve implemented custom certs into the install process. I use an internal CA and custom cert on the fog server for https web access, I configured it in apache after installing fog. I think there are some other places that get ssl enabled when you select ssl in the installer.
@Sebastian-Roth might know more on how the client uses certificates.
@UserBxl Do you have an unattend.xml file with sysprep?
Did you happen to open the microsoft store or any microsoft store apps before running sysprep as that can cause issues.
This error typically means there’s an error in the unattend file or something went wrong with sysprep.
When you see the error you may be able to hit shift+f10
to bring up a cmd console and you can try to look at sysprep log files, i.e. notepad C:\Windows\System32\sysprep\Panther\setupact.log
there’s a few places they may reside, see also https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/deployment-troubleshooting-and-log-files?view=windows-11
That may help point you in the right direction.
Some common ones I’ve run into
Write-Verbose "Removing current user packages"
Get-AppxPackage | Remove-AppxPackage -EA 0;
#see also https://docs.microsoft.com/en-us/windows/application-management/apps-in-windows-10
$allowedApps = @(
"Microsoft.549981C3F5F10", #cortana
"Microsoft.DesktopAppInstaller",
"Microsoft.GetHelp",
"Microsoft.HEIFImageExtension",
"Microsoft.HEVCVideoExtension",
"Microsoft.MicrosoftEdge.Stable",
"Microsoft.Microsoft3DViewer",
"Microsoft.MicrosoftOfficeHub",
"Microsoft.MicrosoftStickyNotes",
"Microsoft.MPEG2VideoExtension",
"Microsoft.MSPaint",
# "Microsoft.Office.OneNote",
"Microsoft.ScreenSketch",
"Microsoft.StorePurchaseApp",
"Microsoft.VCLibs",
"Microsoft.VP9VideoExtensions",
"Microsoft.WebMediaExtensions",
"Microsoft.WebpImageExtension",
"Microsoft.Windows.Photos",
"Microsoft.WindowsAlarms",
"Microsoft.WindowsCalculator",
"Microsoft.WindowsCamera",
# "microsoft.windowscommunicationsapps",
# "Microsoft.WindowsFeedbackHub",
# "Microsoft.WindowsMaps",
# "Microsoft.WindowsSoundRecorder",
"Microsoft.WindowsStore",
# "Microsoft.Xbox.TCUI",
# "Microsoft.XboxApp",
"Microsoft.XboxGameOverlay",
"Microsoft.XboxGamingOverlay",
# "Microsoft.XboxIdentityProvider",
"Microsoft.XboxSpeechToTextOverlay",
"Microsoft.YourPhone",
"Microsoft.ZuneMusic",
"Microsoft.ZuneVideo"
)
Write-Verbose "Removing provisioned appx packages that dont match allowed list"
Get-AppxProvisionedPackage -Online | Where-Object {
$_.DisplayName -notin $allowedApps;
} | ForEach-Object {
if($_.PackageName) {
Write-Verbose "Removing provisioned package $($_.DisplayName)"
Remove-AppxProvisionedPackage -Online -packagename $_.PackageName;
}
}
Hope that helps to get you started.
@Sebastian-Roth said in >FOG vs UEFI:
@jeremyvdv Maybe this is going to help you: https://wiki.fogproject.org/wiki/index.php/Windows_DHCP_Server
This is also on the new docs page https://docs.fogproject.org/en/latest/installation/network-setup/dhcp-server-settings/
@george1421 said in >FOG vs UEFI:
@jeremyvdv If you have a windows dhcp server AND you need to pxe boot both bios and uefi based computers you might want to review this wiki page to setup dhcp profiles so your dhcp server sends the proper boot file name based on the target computer: https://wiki.fogproject.org/wiki/index.php/BIOS_and_UEFI_Co-Existence#Using_Windows_Server_2012_.28R1_and_later.29_DHCP_Policy
This is also on the new docs page
https://docs.fogproject.org/en/latest/kb/how-tos/bios-and-uefi-co-existence/
@Lenain I also made a github issue for making a function out of this
https://github.com/darksidemilk/FogApi/issues/7
If you’re feeling saucy feel free to fork the repo and give it a go and pull request it. I’ll get to it eventually, but it could be quite a while, life is rather busy at the moment.
@Lenain Howdy, I’m the author of the FogApi powershell module and I’m happy to help.
A few questions
function Send-WoL {
param (
$Mac,
$port = 9
)
process {
$MacByteArray = $Mac -split "[:-]" | ForEach-Object { [Byte] "0x$_"}
[Byte[]] $MagicPacket = (,0xFF * 6) + ($MacByteArray * 16)
$UdpClient = New-Object System.Net.Sockets.UdpClient
$UdpClient.Connect(([System.Net.IPAddress]::Broadcast),$port)
$UdpClient.Send($MagicPacket,$MagicPacket.Length)
$UdpClient.Close()
}
}
Send-Wol -mac "12:34:56:78:90:aa"
If you’re trying to do a wake only task, the syntax will likely be different for the json you need to send
You might try creating a scheduled wake on lan task manually and then get the pending task from the api to see the fields
i.e. Get-FogObject -type objectactivetasktype -coreActiveTaskObject scheduledtask | select -expand data | select * -ExcludeProperty host | ConvertTo-Json
I ran that and in comparing those values and assuming you don’t want it to be scheduled, this should do the trick (I tested it and it did indeed do the trick)
$jsonData = @"
{
"taskTypeID":"14",
"wol":"1",
"other2":"-1",
"other4":"1",
"isActive":"1"
}
"@
New-FogObject -type objecttasktype -coreTaskObject host -jsonData $jsonData -IDofObject $hostID
The send-fogimage function was a good one to look at for an example, but pushing an image has more fields for the task than other tasks, some tasks only need the type id and what host to run it on. This one might even work without some of these variables.
Hope that helps
Fog version: 1.5.10.4
Running on centOS 7
I have a number of hosts where the active directory information is randomly going poof.
The host gets imaged, it joins the domain with a post download script, and all is well. Then some time later I go check on things to find the information has gone away and no one has edited it.
I think it might have something to do with the fog service and adding pending macs, but I’m not sure. I have globally disabled adding new hosts via the fog client to see if that had any affect, but there was no change.
I’m unsure where to look at the moment to troubleshoot this further.