Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: New-WinUserLanguageList bug #1640

Open
dadlMilestone opened this issue May 6, 2024 · 1 comment
Open

[Bug]: New-WinUserLanguageList bug #1640

dadlMilestone opened this issue May 6, 2024 · 1 comment

Comments

@dadlMilestone
Copy link

Description

When running script.ps1 I get the error message New-WinUserLanguageList: Cannot marshal 'parameter #1': Invalid managed/unmanaged type combination. and a little while later I receive a message Get-LWHypervVM: No virtual machine DC found as it was not able to create that VM.

Here is the entire terminal output, although I don't think there is too much that jumps out other than those error messages:

PS C:\Users\Administrator\Documents\TestLab> . 'C:\Users\Administrator\Documents\TestLabTC1\script.ps1'
12:59:19|00:00:00|00:00:00.000| Initialization
12:59:20|00:00:00|00:00:00.604| - Host operating system version: 'Microsoft Windows Server 2022 Standard, 10.0.20348.0'
12:59:20|00:00:00|00:00:00.619| - Creating new lab definition with name 'TestLab'
12:59:20|00:00:00|00:00:00.656| - Location of lab definition files will be 'C:\ProgramData\AutomatedLab/Labs/TestLab'
12:59:21|00:00:02|00:00:02.048| - Location of LabSources folder is 'D:\LabSources'                                      
12:59:21|00:00:02|00:00:00.000| - Auto-adding ISO files
12:59:24|00:00:05|00:00:02.918|   - Added 'D:\LabSources\ISOs\SERVER_EVAL_x64FRE_en-us.iso'
12:59:24|00:00:05|00:00:02.950|   - Done
12:59:29|00:00:10|00:00:00.000| - Adding Hyper-V machine definition 'DC'          (Roles: RootDC)
12:59:32|00:00:13|00:00:02.794|   - Done
12:59:32|00:00:13|00:00:00.000| - Adding Hyper-V machine definition 'mgmt'
12:59:33|00:00:13|00:00:00.396|   - Done
12:59:33|00:00:13|00:00:00.000| - Adding Hyper-V machine definition 'rec'
12:59:33|00:00:14|00:00:00.493|   - Done
12:59:33|00:00:14|00:00:00.000| - Adding Hyper-V machine definition 'workstation'
12:59:34|00:00:14|00:00:00.561|   - Done
PS C:\Users\Administrator\Documents\TestLab>
13:00:17|00:00:57|00:00:43.488| Estimated (additional) local drive space needed for all machines: 8 GB
13:00:23|00:01:04|00:00:49.714| Location of Hyper-V machines will be 'D:\AutomatedLab-VMs'
13:00:24|00:01:05|00:00:50.659| Done
13:00:26|00:01:07|00:00:00.000| Validating lab definition
13:00:51|00:01:31|00:00:24.680| - Success
13:00:52|00:01:32|00:00:25.857| Lab 'TestLab' hosted on 'HyperV' imported with 4 machines
13:00:53|00:01:33|00:00:00.000| Creating virtual networks
13:00:53|00:01:33|00:00:00.000| - Creating Hyper-V virtual network 'LAN'
13:01:04|00:01:45|00:00:11.388|   - Done
13:01:04|00:01:45|00:00:00.000| - Creating Hyper-V virtual network 'Camera LAN'
13:01:08|00:01:48|00:00:03.551|   - Done
13:01:08|00:01:48|00:00:03.593| - Done
13:01:08|00:01:48|00:00:03.660| done
13:01:08|00:01:49|00:00:00.000| Creating base images
13:01:15|00:01:55|00:00:00.000| - Creating base image for operating system 'Windows Server 2022 Standard Evaluation (Desktop Experience)'.................
13:07:21|00:08:01|00:06:05.653|   - Finished creating base image
13:07:22|00:08:02|00:06:07.049| - Done
13:07:22|00:08:02|00:06:07.066| done
13:07:22|00:08:02|00:00:00.000| Creating Additional Disks
13:07:24|00:08:04|00:00:01.894| - Done
13:07:24|00:08:04|00:00:00.000| Creating VMs
13:07:24|00:08:05|00:00:00.510| - The hosts file has been added 6 records. Clean them up using 'Remove-Lab' or manually if needed
13:07:25|00:08:05|00:00:00.000| - Waiting for all machines to finish installing
13:07:25|00:08:05|00:00:00.000|   - Creating HyperV machine 'DC'New-WinUserLanguageList: Cannot marshal 'parameter #1': Invalid managed/unmanaged type combination.
Installing Root Domain Controllers
13:07:29|00:08:10|00:00:00.261|       - Machines with RootDC role to be installed: 'DC'
13:07:29|00:08:10|00:00:00.390|       - Waiting for machines to start upGet-LWHypervVM: No virtual machine DC found
..
Get-LWHypervVM: No virtual machine DC found
13:07:52|00:08:33|00:00:23.379|       - .........................................................................................................................
PS C:\Users\Administrator\Documents\TestLab> ^C

A previous issue mentioned that they had the same error, and they needed to "add en-US to their ISO" however they were using an en-GB ISO, and my ISO seems to already be en-US because it is named SERVER_EVAL_x64FRE_en-us.iso. Here is the link to that previous (closed) issue:

#1448

Here is a zip file with *.ps1 files needed to reproduce my environment:

automatedLabIssue_DADL.zip

Steps to reproduce the issue

I have included the code to reproduce the issue as a file attachment. To run the code, extract the zip into a folder, then execute "script.ps1".

The file that is not included is the ISO, which was downloaded from:

https://info.microsoft.com/ww-landing-windows-server-2022.html

The result of the command "Get-LabAvailableOperatingSystem" is:

OperatingSystemName                                            Idx Arch Version        PublishedDate        IsoPath
-------------------                                            --- ---- -------        -------------        -------
Windows Server 2022 Standard Evaluation                        1   x64  10.0.20348.587 3/2/2022 11:02:13 PM D:\LabSources\ISOs\SERVER_EVAL_x64FRE_en-us.iso
Windows Server 2022 Standard Evaluation (Desktop Experience)   2   x64  10.0.20348.587 3/2/2022 11:08:50 PM D:\LabSources\ISOs\SERVER_EVAL_x64FRE_en-us.iso
Windows Server 2022 Datacenter Evaluation                      3   x64  10.0.20348.587 3/2/2022 11:03:12 PM D:\LabSources\ISOs\SERVER_EVAL_x64FRE_en-us.iso
Windows Server 2022 Datacenter Evaluation (Desktop Experience) 4   x64  10.0.20348.587 3/2/2022 11:10:29 PM D:\LabSources\ISOs\SERVER_EVAL_x64FRE_en-us.iso

PowerShell Version

Name                           Value
----                           -----
PSVersion                      7.4.2
PSEdition                      Core
GitCommitId                    7.4.2
OS                             Microsoft Windows 10.0.20348
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

AutomatedLab Version

Name                      Version
----                      -------
AutomatedLab              5.51.0
AutomatedLab.Common       2.3.30
AutomatedLab.Recipe       5.51.0
AutomatedLab.Ships        5.51.0
AutomatedLabCore          5.51.0
AutomatedLabDefinition    5.51.0
AutomatedLabNotifications 5.51.0
AutomatedLabTest          5.51.0
AutomatedLabUnattended    5.51.0
AutomatedLabWorker        5.51.0
@dadlMilestone dadlMilestone changed the title [Bug]: [Bug]: New-WinUserLanguageList bug May 6, 2024
@dadlMilestone
Copy link
Author

Also, I was able to create this lab the first time I executed the script. Then, I was also able to recreate it by manually going through folders, cleaning up all references to the lab, and manually deleting the virtual switches. But now I can't get it to create without error, even doing those manual steps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant