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

windows-startup-script-url: Message: Either the Name or Index parameter is required #2206

Open
kudrew opened this issue Jul 7, 2023 · 2 comments
Assignees

Comments

@kudrew
Copy link

kudrew commented Jul 7, 2023

I'm following the steps here: https://cloud.google.com/compute/docs/images/creating-custom-windows-byol-images#building

and my cloud build steps are failing because I'm not passing in $edition.

But it's able to print it out in the line before: https://github.com/GoogleCloudPlatform/compute-image-tools/blob/master/daisy_workflows/image_build/windows/bootstrap_install.ps1#L203

Here is here my cloud build fails

023/07/07 18:05:13 GCEMetadataScripts: windows-startup-script-url: Formatting UEFI install disk complete.
2023/07/07 18:05:13 GCEMetadataScripts: windows-startup-script-url: Retrieved metadata for key edition with value Windows10Enterprise.
2023/07/07 18:05:13 GCEMetadataScripts: windows-startup-script-url: Applying Windows10Enterprise wim image to install disk.
2023/07/07 18:05:15 GCEMetadataScripts: windows-startup-script-url: ISO mounted as E
2023/07/07 18:05:16 GCEMetadataScripts: windows-startup-script-url: Exception caught in script:
2023/07/07 18:05:16 GCEMetadataScripts: windows-startup-script-url: At C:\Windows\TEMP\metadata-scripts3214937362\windows-startup-script-url.ps1:204 char:3
2023/07/07 18:05:16 GCEMetadataScripts: windows-startup-script-url: +   Expand-WindowsImage -ImagePath $(Get-Wim) -Name $edition -ApplyPath ...
2023/07/07 18:05:16 GCEMetadataScripts: windows-startup-script-url: +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2023/07/07 18:05:16 GCEMetadataScripts: windows-startup-script-url: Message: Either the Name or Index parameter is required
2023/07/07 18:05:16 GCEMetadataScripts: windows-startup-script-url: Windows build failed.
2023/07/07 18:05:16 GCEMetadataScripts: windows-startup-script-url exit status 1
2023/07/07 18:05:16 GCEMetadataScripts: Finished running startup scripts.
2023/07/07 18:05:26 GCEMetadataScripts: Starting shutdown scripts (version 20230403.00).
2023/07/07 18:05:26 GCEMetadataScripts: No shutdown scripts to run.
2023-07-07T18:2023/07/07 18:05:26 GCEGuestAgent: GCE Agent Stopped
@rezaatthalesgroup
Copy link

Check this line :

Your logs show the edition value is Windows10Enterprise . This must be your workflow (.json) file problem.

The edition's value shall match one of the supported editions in the iso file (Check `source\install.wim[1].xml)

@bkatyl
Copy link
Contributor

bkatyl commented Jul 12, 2023

The error is coming from the output of Expand-WindowsImage, which is it's way of saying the provided Name or Index didn't match what it found on the ISO.

So as @rezaatthalesgroup is spot on that your edition string is likely incorrect.

List images that are contained in a WIM or VHD file has information on how to get the image names in a wim.

Get-WindowsImage can also be used to list the images. Get-WindowsImage -ImagePath "c:\imagestore\install.wim"

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

4 participants