Navigation

    • Register
    • Login
    • Search
    • Recent
    • Popular
    1. Home
    2. Tyler
    T
    • Profile
    • Following 0
    • Followers 0
    • Topics 13
    • Posts 38
    • Best 5
    • Groups 0

    Tyler

    @Tyler

    5
    Reputation
    7
    Profile views
    38
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    Tyler Follow

    Best posts made by Tyler

    • RE: How to backup the server?

      Theopenem has a built in replication system, you should be able to add the new server to the com server list, configure it's storage, and then ensure the replication schedule is set up.

      If you have a com server that is using an SMB server, and you want to change that SMB server out from under the com server, then you should be able to replicate the SMB data using whichever tools it's platform affords and then point the com server at the new SMB server.

      The data in the storage location is file copy modules, images, and "Client Versions", I'm not yet familiar with the last one but the later two only change when you change them so you should be able to schedule around the replication. My client versions folder is empty, if yours is too then that is also solved.

      As far as a proper "backup", I'm unclear if that's truly possible with Theopenem, since the data at the storage location is understood based on metadata in the database. I think the intent is that you will have 2 or more com servers and that will provide redundancy, just not any sort of snapshot functionality.

      posted in Support
      T
      Tyler
    • RE: File Copy Modules failing inconsistently

      I found the client scripts and modified wie_deploy.ps1 to leave the zip file in place; it is 0kb in size. This is why Expand-Archive is throwing a fault deep in it's dependencies.

      I'm still learning how to get exit codes from curl.exe in powershell. It should be possible to replace the call to curl.exe with Invoke-WebRequest but I will have to comprehend how all the arguments are being constructed to adapt them, it's not 1-to-1.

      I believe, not at all strongly, that curl.exe is completing without throwing an error code.

      Edit: checked all the server logs, nothing related

      Logs from today

      Application.log

      2023-12-20 00:15:45,397 [Worker #13] ERROR Toems_DataModel.RawSqlRepository You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') AND (a.provision_status = 8 OR a.provision_status = 6 OR a.provision_status = ' at line 1
      2023-12-20 00:30:45,666 [Worker #8] INFO Toems_Service.Workflows.FolderSync Replicating Storage To Com Server, images will be replicated after this task. theoCom1
      2023-12-20 00:30:48,608 [Worker #8] INFO Toems_Service.Workflows.FolderSync Finished Replicating Storage To Com Server theoCom1
      2023-12-20 00:30:48,609 [Worker #8] INFO Toems_Service.Workflows.ImageSync Starting Image Replication From Com Servers To SMB Share
      2023-12-20 00:30:48,611 [Worker #8] INFO Toems_Service.Workflows.ImageSync Image replication is not used when direct smb imaging is enabled.
      2023-12-20 00:30:48,612 [Worker #8] INFO Toems_Service.Workflows.ImageSync Starting Image Replication To Com Servers
      2023-12-20 00:30:48,614 [Worker #8] INFO Toems_Service.Workflows.ImageSync Image replication is not used when direct smb imaging is enabled.
      2023-12-20 00:30:48,614 [Worker #8] INFO Toems_Service.Workflows.FolderSync All replication tasks complete
      2023-12-20 03:15:06,181 [Worker #2] ERROR Toems_DataModel.RawSqlRepository You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') AND (a.provision_status = 8 OR a.provision_status = 6 OR a.provision_status = ' at line 1
      2023-12-20 04:00:07,691 [Worker #2] INFO Toems_Service.Workflows.DataCleanup Running Data Cleanup Job
      2023-12-20 04:00:07,763 [Worker #2] INFO Toems_Service.Workflows.DataCleanup Completed Data Cleanup Job
      2023-12-20 04:30:08,725 [Worker #9] INFO Toems_Service.Workflows.FolderSync Replicating Storage To Com Server, images will be replicated after this task. theoCom1
      2023-12-20 04:30:11,685 [Worker #9] INFO Toems_Service.Workflows.FolderSync Finished Replicating Storage To Com Server theoCom1
      2023-12-20 04:30:11,687 [Worker #9] INFO Toems_Service.Workflows.ImageSync Starting Image Replication From Com Servers To SMB Share
      2023-12-20 04:30:11,689 [Worker #9] INFO Toems_Service.Workflows.ImageSync Image replication is not used when direct smb imaging is enabled.
      2023-12-20 04:30:11,689 [Worker #9] INFO Toems_Service.Workflows.ImageSync Starting Image Replication To Com Servers
      2023-12-20 04:30:11,691 [Worker #9] INFO Toems_Service.Workflows.ImageSync Image replication is not used when direct smb imaging is enabled.
      2023-12-20 04:30:11,691 [Worker #9] INFO Toems_Service.Workflows.FolderSync All replication tasks complete
      2023-12-20 06:15:00,442 [Worker #9] ERROR Toems_DataModel.RawSqlRepository You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') AND (a.provision_status = 8 OR a.provision_status = 6 OR a.provision_status = ' at line 1
      2023-12-20 08:30:46,926 [Worker #16] INFO Toems_Service.Workflows.FolderSync Replicating Storage To Com Server, images will be replicated after this task. theoCom1
      2023-12-20 08:30:49,875 [Worker #16] INFO Toems_Service.Workflows.FolderSync Finished Replicating Storage To Com Server theoCom1
      2023-12-20 08:30:49,876 [Worker #16] INFO Toems_Service.Workflows.ImageSync Starting Image Replication From Com Servers To SMB Share
      2023-12-20 08:30:49,878 [Worker #16] INFO Toems_Service.Workflows.ImageSync Image replication is not used when direct smb imaging is enabled.
      2023-12-20 08:30:49,879 [Worker #16] INFO Toems_Service.Workflows.ImageSync Starting Image Replication To Com Servers
      2023-12-20 08:30:49,880 [Worker #16] INFO Toems_Service.Workflows.ImageSync Image replication is not used when direct smb imaging is enabled.
      2023-12-20 08:30:49,881 [Worker #16] INFO Toems_Service.Workflows.FolderSync All replication tasks complete
      2023-12-20 09:15:33,458 [Worker #18] ERROR Toems_DataModel.RawSqlRepository You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') AND (a.provision_status = 8 OR a.provision_status = 6 OR a.provision_status = ' at line 1
      2023-12-20 12:15:09,537 [Worker #2] ERROR Toems_DataModel.RawSqlRepository You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') AND (a.provision_status = 8 OR a.provision_status = 6 OR a.provision_status = ' at line 1
      2023-12-20 12:30:10,043 [Worker #12] INFO Toems_Service.Workflows.FolderSync Replicating Storage To Com Server, images will be replicated after this task. theoCom1
      2023-12-20 12:30:12,975 [Worker #12] INFO Toems_Service.Workflows.FolderSync Finished Replicating Storage To Com Server theoCom1
      2023-12-20 12:30:12,977 [Worker #12] INFO Toems_Service.Workflows.ImageSync Starting Image Replication From Com Servers To SMB Share
      2023-12-20 12:30:12,979 [Worker #12] INFO Toems_Service.Workflows.ImageSync Image replication is not used when direct smb imaging is enabled.
      2023-12-20 12:30:12,979 [Worker #12] INFO Toems_Service.Workflows.ImageSync Starting Image Replication To Com Servers
      2023-12-20 12:30:12,981 [Worker #12] INFO Toems_Service.Workflows.ImageSync Image replication is not used when direct smb imaging is enabled.
      2023-12-20 12:30:12,981 [Worker #12] INFO Toems_Service.Workflows.FolderSync All replication tasks complete
      

      Frontend.log

      No entries from today

      ClientAPI.log

      2023-12-20 00:30:48,125 [67] INFO Toems_Service.Workflows.FolderSync Replicating Folder client_versions From \\10.0.0.31\theo\client_versions to \\10.0.0.31\theo\client_versions on theoCom1
      2023-12-20 00:30:48,352 [67] INFO Toems_Service.Workflows.FolderSync Replicating Folder software_uploads From \\10.0.0.31\theo\software_uploads to \\10.0.0.31\theo\software_uploads on theoCom1
      2023-12-20 04:30:11,201 [25] INFO Toems_Service.Workflows.FolderSync Replicating Folder client_versions From \\10.0.0.31\theo\client_versions to \\10.0.0.31\theo\client_versions on theoCom1
      2023-12-20 04:30:11,431 [25] INFO Toems_Service.Workflows.FolderSync Replicating Folder software_uploads From \\10.0.0.31\theo\software_uploads to \\10.0.0.31\theo\software_uploads on theoCom1
      2023-12-20 08:30:49,403 [20] INFO Toems_Service.Workflows.FolderSync Replicating Folder client_versions From \\10.0.0.31\theo\client_versions to \\10.0.0.31\theo\client_versions on theoCom1
      2023-12-20 08:30:49,628 [20] INFO Toems_Service.Workflows.FolderSync Replicating Folder software_uploads From \\10.0.0.31\theo\software_uploads to \\10.0.0.31\theo\software_uploads on theoCom1
      2023-12-20 12:30:12,495 [41] INFO Toems_Service.Workflows.FolderSync Replicating Folder client_versions From \\10.0.0.31\theo\client_versions to \\10.0.0.31\theo\client_versions on theoCom1
      2023-12-20 12:30:12,721 [41] INFO Toems_Service.Workflows.FolderSync Replicating Folder software_uploads From \\10.0.0.31\theo\software_uploads to \\10.0.0.31\theo\software_uploads on theoCom1
      

      Multicast.log

      No entries from today

      posted in Support
      T
      Tyler
    • RE: Different hardware = Multiple image clients with multiple images

      @sesam
      You may have to create A new image, but this doesn't need to be a norm going forwards.

      If you create a Universal Image then you can start collecting driver packages and use that one image for every machine using that OS version/edition (windows 10 pro, windows 10 home, windows 11 pro, etc), at least for Windows.

      to summarize the video:

      1. Make a VM in Hyper-V (I can't speak to other hypervisors)

      2. Install the OS on it, using the latest installation media (w10-22h2, w11-23h2)

      3. Do all the updates
        3.1 do some shinanigans
        3.2 probably you should install TOEC

      4. Sysprep & generalize it

      5. Take the image

      6. Deploy the image to one machine of a given model

      7. Install all the drivers for it

      8. Collect the drivers using

      powershell> Export-WindowsDriver -online -destination <URI>
      
      1. Put the drivers in a zip file and upload them via the Theopenem web interface as a Filecopy Module configured to unzip and install them as drivers

      2. On the image, clone the default profile, name it appropriately, and configure it to use that file copy

      Now when you deploy this profile to machines you have a driver package set up for, they can all use the same base image. I have skimmed over a lot of details, the video tutorial linked at the top covers them. There are a lot of caveats like you may need an answer file, and the image will not retain preconfigured network profiles.

      TOEC seems great, my usecase is really annoying so it creates a lot of problems that I don't have time to solve right now, and TOEC is not strictly required for this workflow.

      Next Tuesday is Update Tuesday so either doing this now is a little extra work you don't have time for, or a great test run, because next week you'll be able to re-update that VM (remember to checkpoint before you sysprep) and update the image for every model in one go.

      posted in Support
      T
      Tyler
    • Login screen password field misbehaves with password managers

      I've been experiencing this from the beginning but now I'm migrating to the new release. When I have my password manager autofill, it enters a password, and then that gets cleared.

      On chrome, using the old built in password manager or the new Google Password Manager, the offer to fill the password would not initially appeared, I had to put the cursor focus into a text field, then remove it, and re-enter the username field. Then after filling, I had to focus the password field, then remove focus, then the field would be filled. This being workable made me deprioritize this post

      I switched to Bitwarden. Now it does offer to fill, but nothing I do will restore the filled password. Instead I copy & paste the password. While the password field is in this bounced state, the login attempt will fail.

      In the Inspect menu, changing type="text" to type="password" corrects the behavior; but Theopenem uses ASP to generate HTML and I have not found a means to enact this change

      <input name="WebLogin$Password" type="password" id="Password" class="password watermark" maxlength="8">
      

      In C:\Program Files\Theopenem\Toems-UI\default.aspx, commenting out line 53 seems to correct the behavior as well.

      <script type="text/javascript">
          $(document).ready(function () {
              $('.uname').watermark('Username', { useNative: false });
              $('.uname').focus();
              //$('.password').watermark('Password', { useNative: false });
              $('.textbox').watermark('Verification Code', { useNative: false });
          });
      </script>
      

      I do not experience this problem on the User Creation screen, but those textboxs aren't css password fields, and I don't know where the javascript would be.

      default.aspx:

      <asp:TextBox ID="Password" runat="server" TextMode="Password" CssClass="password" ClientIDMode="Static"></asp:TextBox>
      

      create.aspx:

      <asp:TextBox ID="txtUserPwd" runat="server" TextMode="Password" CssClass="textbox"></asp:TextBox>
      

      I am not a web developer, I may have come to misguided conclusions.

      posted in Feature Requests / Feedback
      T
      Tyler
    • Safe data handling during image updates

      Currently when you update an image, one of the first things to happen is that the old image files gets deleted. If the upload does not succeed, this means operations must halt until an image can be uploaded successfully.

      This issue is difficult to discuss because the word image is used for several things, so going forwards:

      Logical Images: The concept listed on the Images page, which contain Image Profiles
      Profiles: Image Profiles
      Image Data Files: The files and folders located at [storage path]\images\

      There exists at present no way to move or clone Profiles between Logical Images, if you're using universal images then you will accrue a lot of Profiles with different File Copy configurations, reproducing these on a new Logical Image is cumbersome and time consuming, in addition to other configuration like Model Match (which must first be removed from the old Logical Image). This creates a need to avoid making a new Logical Image, so it's not viable to "update" by taking a new image. The ability to clone an image or migrate profiles would be generally nice to have, but the correct solution to this problem is to handle the Image Data Files safely to begin with.

      The essential premise of data safety is to ensure no step in the process can result in total data loss if it fails. Notably, Theopenem will never be qualified to determine if a taken image is valid and correct, that's my job; though Theopenem could do more to detect obvious failure, such as there being the wrong number of .wim files for the schema. As is though, no amount of detecting failure will recover the deleted Image Data Files.

      The structure should be, broadly, Logical Images possess a set of Image Data folders, each with their schema and .wim files. One of them is marked as Primary and this is what gets deployed normally. When an image is uploaded the new Image Data Files gets written to the storage location in parallel to the existing images' files. When I have validated the new Image Data Files, I can mark it as primary, or if there's a problem I can delete it. If it's valid, then when I feel comfortable doing so I can delete the old Image Data Files. My ideal is usually to keep one known good version in case I later discover a problem, but structurally there's no good reason to limit the depth of this history beyond reasonable datatype maximums.

      This allows deploys to take place while the image is updating, some organizations will want a way to prevent that but for me it's very useful. It also allows the new upload to be thrown into service with zero downtime; ongoing deploys have their orders and can finish, while new deploys will get the new primary. The most inconvenient step is that there will need to be a workflow that allows non-primary image data files to be deployed for testing, without making it primary, which could allow the upload to be erroneously deployed to a different machine before it is known to be good.

      This could all be structured on disk so that Theopenem can re-integrate Image Data Files that it finds but didn't expect, such as would occur if I restored the deleted files using my file server's snapshots and replications.

      posted in Feature Requests / Feedback
      T
      Tyler

    Latest posts made by Tyler

    • Continuous MySqlConnector errors

      I've been chasing down a problem and along the way, I'm now confident unrelated to the problem, I found there's many errors between Theopenem and MariaDB

      Application.log

      2025-01-27 14:35:47,724 [ExpirationManager #1] ERROR Hangfire.MySql.ExpirationManager MySqlConnector.MySqlException (0x80004005): The Command Timeout expired before the operation completed. ---> MySqlConnector.MySqlException (0x80004005): The Command Timeout expired before the operation completed.
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at MySqlConnector.Protocol.Serialization.BufferedByteReader.<ReadBytesAsync>d__2.MoveNext() in /_/src/MySqlConnector/Protocol/Serialization/BufferedByteReader.cs:line 36
      --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at MySqlConnector.Protocol.Serialization.ProtocolUtility.ReadPacketAsync(BufferedByteReader bufferedByteReader, IByteHandler byteHandler, Func`1 getNextSequenceNumber, ProtocolErrorBehavior protocolErrorBehavior, IOBehavior ioBehavior) in /_/src/MySqlConnector/Protocol/Serialization/ProtocolUtility.cs:line 408
      at MySqlConnector.Protocol.Serialization.ProtocolUtility.DoReadPayloadAsync(BufferedByteReader bufferedByteReader, IByteHandler byteHandler, Func`1 getNextSequenceNumber, ArraySegmentHolder`1 previousPayloads, ProtocolErrorBehavior protocolErrorBehavior, IOBehavior ioBehavior) in /_/src/MySqlConnector/Protocol/Serialization/ProtocolUtility.cs:line 466
      at MySqlConnector.Protocol.Serialization.StandardPayloadHandler.ReadPayloadAsync(ArraySegmentHolder`1 cache, ProtocolErrorBehavior protocolErrorBehavior, IOBehavior ioBehavior) in /_/src/MySqlConnector/Protocol/Serialization/StandardPayloadHandler.cs:line 42
      at MySqlConnector.Core.ServerSession.ReceiveReplyAsync(IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/ServerSession.cs:line 765
      --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at MySqlConnector.Core.ServerSession.<ReceiveReplyAsyncAwaited>d__78.MoveNext() in /_/src/MySqlConnector/Core/ServerSession.cs:line 800
      --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at MySqlConnector.Core.ResultSet.<ReadResultSetHeaderAsync>d__2.MoveNext() in /_/src/MySqlConnector/Core/ResultSet.cs:line 49
      at MySqlConnector.MySqlDataReader.ActivateResultSet() in /_/src/MySqlConnector/MySqlDataReader.cs:line 124
      at MySqlConnector.MySqlDataReader.<CreateAsync>d__97.MoveNext() in /_/src/MySqlConnector/MySqlDataReader.cs:line 436
      --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at MySqlConnector.Core.CommandExecutor.<ExecuteReaderAsync>d__0.MoveNext() in /_/src/MySqlConnector/Core/CommandExecutor.cs:line 61
      --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at MySqlConnector.MySqlCommand.<ExecuteNonQueryAsync>d__69.MoveNext() in /_/src/MySqlConnector/MySqlCommand.cs:line 263
      --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at MySqlConnector.MySqlCommand.ExecuteNonQuery() in /_/src/MySqlConnector/MySqlCommand.cs:line 100
      at Dapper.SqlMapper.ExecuteCommand(IDbConnection cnn, CommandDefinition& command, Action`2 paramReader) in /_/Dapper/SqlMapper.cs:line 2848
      at Dapper.SqlMapper.ExecuteImpl(IDbConnection cnn, CommandDefinition& command) in /_/Dapper/SqlMapper.cs:line 581
      at Dapper.SqlMapper.Execute(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType) in /_/Dapper/SqlMapper.cs:line 452
      at Hangfire.MySql.ExpirationManager.<>c__DisplayClass9_1.<Execute>b__0(MySqlConnection connection)
      

      Event Viewer filtering for source: MariaDB

      Aborted connection 793505 to db: 'theopenem' user: 'root' host: 'Crab.avenue.lan' (Got an error reading communication packets)
      

      Event Viewer has 41,199 events with the same event ID, 100, with the oldest on record going to January 8th. I'm not aware of anything in particular that happened on January 8th.

      The error I was chasing down now appears to be related to drivers for the machines being imaged, I thought it was an issue with accessing the .wim files but I found a thread on here talking about drivers so I went and imaged a machine I'm extremely familiar with and it worked. So probably not related. At this time I don't know of any symptoms connected to these errors. So, I consider this a bug report not a support request.

      posted in Feature Requests / Feedback
      T
      Tyler
    • RE: Microsoft Storage Spaces

      I had to step away from this for a little while but I just ran into a small snag on it.

      When a system is using Storage Spaces to pool drives, the drives do not appear in PS> Get-Disk, and this messes up the disk numbers. In wie_global_functions.ps1 : Get-Hard-Drives() we get an array of the valid disks

      $script:HardDrives=$(get-disk | where-object {$_.NumberOfPartitions -gt 0 -and $_.BusType -ne "USB"} | Sort-Object Number)
      

      In wie_deploy.ps1 : Process-Hard-Drives() we foreach through that array with an external index to get the schema

      $currentHdNumber = -1
      foreach ($hardDrive in $script:HardDrives) {
              log " ** Processing Hard Drive $($hardDrive.Number)" -display -timeStamp
              $currentHdNumber++
      [...]
      $script:hdSchema = $(curl.exe $script:curlOptions -H Authorization:$script:userTokenEncoded --data "profileId=$profile_id&clientHdNumber=$currentHdNumber&newHdSize=$($hardDrive.Size)&schemaHds=$script:imaged_schema_drives&clientLbs=$($hardDrive.LogicalSectorSize)" ${script:web}CheckHdRequirements --connect-timeout 10 --stderr -)
      

      So now we have 3 numbers, $script:hardDrive.Number, $currentHdNumber, and $script:hdSchema.SchemaHdNumber. Under normal circumstances these are all the same number, but in Storage Spaces, and who knows maybe other RAID setups, hardDrive.Number is the system's index for that disk, while currentHdNumber and SchemaHdNumber are the position of the disk in an unordered array.

      That's all good and fine, great actually, because this disjoint allows the wie to ignore this problem.

      currentHdNumber is used to request the schema so it will always request 0 first, and on most systems there's only one drive. Any time we want to get something from the server, we want this number.

      hardDrive.Number then reflects any modification to the disk order. As long as we use hardDrive.Number to direct disk operations it'll work out.

      In wie_deploy.ps1 : Download-Image(), the line used to stream the .wim onto the partition is

      $udpProc=$(Start-Process cmd "/c curl.exe $script:curlOptions -H Authorization:$script:userTokenEncoded --data ""profileId=$profile_id&hdNumber=$($hardDrive.Number)&fileName=part$wimSource.winpe.wim"" ${script:web}GetImagingFile | wimapply - 1 C: 2>>$clientLog > x:\wim.progress" -NoNewWindow -PassThru)
      

      Which uses hardDrive.Number to ask the server to send the image over. The server doesn't know about disk 3, so the request errors out. Changing this to currentHdNumber or SchemaHdNumber fixes it, and now the wie is able to deploy images to storage spaces

      There is actually a secret 4th number, $script:imageHdToUse, which is just SchemaHdNumber

      posted in Feature Requests / Feedback
      T
      Tyler
    • fShowMenu can only display 59 items

      All of the select an item menus in the WIE use a function fShowMenu(), I haven't properly chased this down yet, it's not in the scripts that get downloaded, but from google I think it's this

      https://www.powershellgallery.com/packages/PowerShellFrame/0.0.0.20/Content/Public\Show-NavigationableMenu.ps1

      I also haven't worked through to fully comprehend this code, but I can describe what I'm experiencing.

      I had 59 profiles on an image, everything worked.
      Added one more, now I get a fatal error "Menu too big!" when I go to select a profile on that image.
      Remove one, everything works again.

      With this limitation, nothing that gets displayed via an fShowMenu can have more than 59 items, this is primarily Images and Profiles-on-One-Image. Presumably this issue does not surface unless the menus are displayed, so Model Match bypasses it.

      posted in Feature Requests / Feedback
      T
      Tyler
    • Hardware Targeting File Copy Modules

      It would be very nice if I could set up File Copy Modules with drivers for specific devices, and during deploy, if that hardware is present, the module gets applied.

      I'm dealing with an issue right now where a certain Intel wifi module has a known issue in the latest published drivers where it won't report any wifi network from WAPs that offer 802.11ax, even though they can negotiate down. The solution is a released-but-not-published driver package. The issue is OEMs haven't always used a consistent module in a given model. I'm currently including it in driver packages for models that can have this module, but I'm not certain that's harmless, and it's a manual identification process.

      I would much rather configure a module to identify this device separately and get the drivers as needed. This would also simplify dealing with a lot of minor variation within models, such as the presence of fingerprint, smartcard, and NFC readers, different graphics packages, WWAN/GPS modules, which are often the same hardware appearing on a range of models within a generation or generic parts sourced by the whole industry.

      posted in Feature Requests / Feedback
      T
      Tyler
    • RE: File copy driver for WIE upload location

      As far as I know, File Copy Modules do not act on the WIE. They describe files that the WIE should add to a computer when imaging it. If "Is Driver" is enabled, it will then use DISM to install the files on the newly imaged computer.

      If you want the WIE to add drivers to a computer as part of imaging it, you configure that at Images -> {specific image} -> Image Profiles -> {specific profile} -> File Copy

      posted in Support
      T
      Tyler
    • RE: File copy driver for WIE upload location

      I don't know how to do the specific thing you're trying, but you may be able to solve the overall problem by adding the drivers to the WIE .wim image after creating it, using DISM

      https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/add-and-remove-drivers-to-an-offline-windows-image?view=windows-11

      This page lays out the whole process but pay special attention to the caution text on /recurse, a bloated image will take longer to boot in all cases, but if you are using PXE then that penalty will be higher, and some older machines can only download PXE files at 10/100, making it even worse.

      posted in Support
      T
      Tyler
    • RE: Microsoft Storage Spaces

      I've put together how to create the pools, this needs a lot of work but the basics are there

      $matchedDiskSets = Get-PhysicalDisk | Group-Object 'FriendlyName' | Where-Object {$_.Count -gt 1}
      # assuming matched disks should always be pooled, this should be a configuration recieved from the server
      if ($matchedDiskSets -gt 0) {
      
      
          <# assuming all existing pools are bad
             should try to identify good pools
             to associate disks with pools:
             $pools = Get-StoragePool -isPrimordial $false -ErrorAction SilentlyContinue
             $disksInPool = $pools | foreach { get-physicalDisks -StoragePool $_ }
          #>
          
          Get-StoragePool -isPrimordial $false -ErrorAction SilentlyContinue | Remove-StoragePool
          # ignoring secondary pools for now
          $matchedDiskSets[0].Group | ForEach-Object {
              Clear-Disk `
                  -UniqueID $_.UniqueID `
                  -RemoveOEM `
                  -RemoveData `
                  -Confirm:$false `
                  -ErrorAction SilentlyContinue
              }
          $matchedDiskSets[0].Group | Reset-PhysicalDisk
      
          # create new pool and virtualdisk, I picked WindowsPool and WindowsDisk arbitrarily
          New-StoragePool `
              -FriendlyName "WindowsPool" `
              -StorageSubsystemFriendlyName "Windows Storage*" `
              -PhysicalDisks $matchedDiskSets[0].Group `
              -ResiliencySetting Simple `
              | New-VirtualDisk -FriendlyName "WindowsDisk" -UseMaximum
      
      }
      

      The critical problem resulting from this is that the virtual disk is not going to be disk 1. It seems to vary, this is from a log from a previous image attempt with a manually created pool.

          ** Starting Image Download For Hard Drive 3 Partition 3
          
          [ERROR] Error reading 208 bytes from fd 0 (err=109): The pipe has been ended
          
          [ERROR] "[fd 0]": Error reading header: Broken pipe
          ERROR: Exiting with error code 50:
          Could not read data from a file.
      

      The unit I'm working with presently made the virtual disk be disk 2 to start, and then disk 3 after a reboot.

      PS X:\Windows\System32> get-physicaldisk
      
      Number FriendlyName
      ------ ------------
      1      Skhynix BC501 NVMe 512GB
      0      Skhynix BC501 NVMe 512GB
      
      PS X:\Windows\System32> get-disk
      
      Number    Friendly Name
      --------- ----------------
      2         WindowsDisk
      
      

      and in wie_deploy.ps1 it's assumed that machine-side disks will relate 1-to-1 with disks in the image

      line 326

      $udpProc=$(Start-Process cmd "/c curl.exe $script:curlOptions -H Authorization:$script:userTokenEncoded --data ""profileId=$profile_id&hdNumber=$($hardDrive.Number)&fileName=part$wimSource.winpe.wim"" ${script:web}GetImagingFile | wimapply - 1 C: 2>>$clientLog > x:\wim.progress" -NoNewWindow -PassThru)

      Which makes sense until pools are involved and there are gaps in the index of logical disks. This is the next thing I'm going to run down, not sure how I'm going to map the two indexes.

      edit: the windows 10 installer can't see this disk so I'm probably missing a little detail somewhere.

      posted in Feature Requests / Feedback
      T
      Tyler
    • Microsoft Storage Spaces

      Microsoft has this thing called Storage Spaces, I don't know the history but it's something akin to RAID, but also like Intel RST. As a result of the later, on Microsoft systems apparently sometimes the factory configuration uses Storage Spaces.

      So I have a Surface Laptop 2 on my desk, I imaged it like I image everything and it came up with a 512GB SSD; but also a second blank 512GB SSD. Looking at images of the motherboard what's happening here is the 1TB configuration uses two all-in-one SSD chips, each 512GB, each literally a distinct SSD, and they're supposed to be pooled under a single Storage Space to appear as one.

      It's possible to configure these Spaces in powershell but I can't imagine there's any reasonable way to detect that this should be done, so configuration regarding pools would need to be added to the image profile and I'm unclear if the image needs to be built for Spaces or if windows will adapt. This may also require considering the physical disks differently while partitioning and formatting the drives.

      I'm going to be looking into patching this into the core scripts soon

      posted in Feature Requests / Feedback
      T
      Tyler
    • RE: Having multiple servers

      @theopenem_admin Just spent a while finding my own mistakes, so now I do have the new server listed correctly on the dashboard and the dashboard loads promptly. I have cleared up a lot of errors, but I'm still getting this one when the dashboard is loaded

      FrontEnd.log

      2024-03-06 11:53:16,772 [9] ERROR Toems_ApiCalls.ApiRequest Response Data Was Null For Resource: FileSystem/GetSMBFreeSpace/
      

      I suspect something is still configured to think about SMB?
      Maybe I'll find it as I regenerate WIE.

      ClientAPI.log and Application.log are no longer accruing errors.


      This is already solved but for future problem havers, I was getting:

      2024-03-06 10:29:21,042 [44] ERROR Toems_ApiCalls.ApiRequest Could Not Complete API Request. The Response Produced An Error.Storage/GetFreeSpace
      2024-03-06 10:29:21,074 [44] ERROR Toems_ApiCalls.ApiRequest

      {
      	"Message":"An error has occurred.",
      	"ExceptionMessage":"One or more errors occurred.",
      	"ExceptionType":"System.AggregateException",
      	"StackTrace":"
      		at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
      		at Toems_ClientApi.Controllers.Authorization.InterComAuth.AuthenticateAsync(HttpAuthenticationContext context, CancellationToken cancellationToken)
      		at System.Web.Http.Controllers.AuthenticationFilterResult.<ExecuteAsync>d__5.MoveNext()
      		--- End of stack trace from previous location where exception was thrown ---
      		at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      		at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      		at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()",
      	"InnerException":
      	{
      		"Message":"An error has occurred.",
      		"ExceptionMessage":"An error occurred accessing the database. This usually means that the connection to the database failed. Check that the connection string is correct and that the appropriate DbContext constructor is being used to specify it or find it in the application's config file. See http://go.microsoft.com/fwlink/?LinkId=386386 for information on DbContext and connections. See the inner exception for details of the failure.",
      	"ExceptionType":"System.Data.Entity.Core.ProviderIncompatibleException",
      	"StackTrace":"
      		at System.Data.Entity.Utilities.DbProviderServicesExtensions.GetProviderManifestTokenChecked(DbProviderServices providerServices, DbConnection connection)
      		at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
      		at System.Data.Entity.Utilities.DbConnectionExtensions.GetProviderInfo(DbConnection connection, DbProviderManifest& providerManifest)
      		at System.Data.Entity.DbModelBuilder.Build(DbConnection providerConnection)
      		at System.Data.Entity.Internal.LazyInternalContext.CreateModel(LazyInternalContext internalContext)
      		at System.Data.Entity.Internal.RetryLazy`2.GetValue(TInput input)
      		at System.Data.Entity.Internal.LazyInternalContext.InitializeContext()
      		at System.Data.Entity.Internal.InternalContext.Initialize()
      		at System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType)
      		at System.Data.Entity.Internal.Linq.InternalSet`1.Initialize()
      		at System.Data.Entity.Internal.Linq.InternalSet`1.get_InternalContext()
      		at System.Data.Entity.Infrastructure.DbQuery`1.System.Linq.IQueryable.get_Provider()
      		at System.Linq.Queryable.Where[TSource](IQueryable`1 source, Expression`1 predicate)
      		at Toems_DataModel.GenericRepository`1.GetFirstOrDefault(Expression`1 filter, Func`2 orderBy)
      		at Toems_Service.Entity.ServiceSetting.GetSetting(String settingName)
      		at Toems_Service.Entity.ServiceSetting.GetSettingValue(String settingName)
      		at Toems_ClientApi.Controllers.Authorization.InterComAuth.<isValidRequest>d__9.MoveNext()",
      	"InnerException":
      	{
      		"Message":"An error has occurred.",
      		"ExceptionMessage":"The provider did not return a ProviderManifestToken string.",
      		"ExceptionType":"System.Data.Entity.Core.ProviderIncompatibleException",
      		"StackTrace":"
      			at System.Data.Entity.Core.Common.DbProviderServices.GetProviderManifestToken(DbConnection connection)
      			at System.Data.Entity.Utilities.DbProviderServicesExtensions.GetProviderManifestTokenChecked(DbProviderServices providerServices, DbConnection connection)",
      		"InnerException":
      		{
      			"Message":"An error has occurred.",
      			"ExceptionMessage":"Unable to connect to any of the specified MySQL hosts.",
      			"ExceptionType":"MySql.Data.MySqlClient.MySqlException",
      			"StackTrace":"
      				at MySql.Data.MySqlClient.NativeDriver.Open()
      				at MySql.Data.MySqlClient.Driver.Open()
      				at MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings)
      				at MySql.Data.MySqlClient.MySqlPool.CreateNewPooledConnection()
      				at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection()
      				at MySql.Data.MySqlClient.MySqlPool.TryToGetDriver()
      				at MySql.Data.MySqlClient.MySqlPool.GetConnection()
      				at MySql.Data.MySqlClient.MySqlConnection.Open()
      				at MySql.Data.MySqlClient.MySqlProviderServices.GetDbProviderManifestToken(DbConnection connection)
      				at System.Data.Entity.Core.Common.DbProviderServices.GetProviderManifestToken(DbConnection connection)",
      			"InnerException":
      				{
      				"Message":"An error has occurred.",
      				"ExceptionMessage":"No such host is known",
      				"ExceptionType":"System.Net.Sockets.SocketException",
      				"StackTrace":"
      					at System.Net.Dns.GetAddrInfo(String name)
      					at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6)
      					at System.Net.Dns.GetHostEntry(String hostNameOrAddress)
      					at MySql.Data.Common.MyNetworkStream.CreateStream(MySqlConnectionStringBuilder settings, Boolean unix)
      					at MySql.Data.Common.StreamCreator.GetStream(MySqlConnectionStringBuilder settings)
      					at MySql.Data.MySqlClient.NativeDriver.Open()"
      				}
      			}
      		}
      	}
      }
      2024-03-06 10:29:21,074 [44] ERROR Toems_Service.Workflows.ComServerFreeSpace Com server returned null for status. Check your com server URL!
      

      The problem was that in toec-api\web.config I had pasted incorrectly and had connectionString="server=server=localhost; [...], this kind of error is hard for my eyes to pick up on.

      There was also an interim error where an entire html page was dumped in the logs saying the com server's credentials were not authorized to connect from that host, I'll need to go in HeidiSQL and add a GRANT when the next server is coming up.

      Tangent on that, for MariaDB, do you recommend sticking with the root account for all servers, or setting different credentials for each server?

      posted in Support
      T
      Tyler
    • RE: Having multiple servers

      I matched the permissions on C:\toems_local_storage, no change, is there somewhere in IIS I have to configure permissions as well?

      posted in Support
      T
      Tyler