chef / bento

Packer templates for building minimal Vagrant baseboxes for multiple platforms
Apache License 2.0
4.24k stars 1.12k forks source link

fix typo in README #1554

Closed Blaimi closed 5 months ago

Blaimi commented 7 months ago

Description

Related Issue

Types of changes

Checklist:

Blaimi commented 7 months ago

Yay, it passed :-). But after fixing the update-problems with the updated image, I had another problem:

==> qemu.vm: Provisioning with powershell script: ./packer_templates/scripts/windows/provision.ps1
2024/02/28 23:51:36 packer-provisioner-powershell plugin: Opening ./packer_templates/scripts/windows/provision.ps1 for reading
2024/02/28 23:51:36 packer-provisioner-powershell plugin: Uploading env vars to c:/Windows/Temp/packer-ps-env-vars-65dfb8f8-a442-dc9c-27a4-338b1f432dd4.ps1
2024/02/28 23:51:36 packer-provisioner-powershell plugin: [INFO] 163 bytes written for 'uploadData'
2024/02/28 23:51:36 [INFO] 163 bytes written for 'uploadData'
2024/02/28 23:51:36 packer-plugin-qemu_v1.0.10_x5.0_linux_amd64 plugin: 2024/02/28 23:51:36 Uploading file to 'c:/Windows/Temp/packer-ps-env-vars-65dfb8f8-a442-dc9c-27a4-338b1f432dd4.ps1'
2024/02/28 23:51:39 packer-provisioner-powershell plugin: Building elevated command wrapper for: powershell -executionpolicy bypass "& { if (Test-Path variable:global:ProgressPreference){set-variable -name variable:global:ProgressPreference -value 'SilentlyContinue'};. c:/Windows/Temp/packer-ps-env-vars-65dfb8f8-a442-dc9c-27a4-338b1f432dd4.ps1; &'c:/Windows/Temp/script-65dfb8f8-4160-819b-fa3b-d29f7fb37369.ps1'; exit $LastExitCode }"
2024/02/28 23:51:39 packer-provisioner-powershell plugin: Command [powershell -executionpolicy bypass "& { if (Test-Path variable:global:ProgressPreference){set-variable -name variable:global:ProgressPreference -value 'SilentlyContinue'};. c:/Windows/Temp/packer-ps-env-vars-65dfb8f8-a442-dc9c-27a4-338b1f432dd4.ps1; &'c:/Windows/Temp/script-65dfb8f8-4160-819b-fa3b-d29f7fb37369.ps1'; exit $LastExitCode }" > %SYSTEMROOT%/Temp/packer-65dfb8fb-750b-53dc-bf92-0115920e051c.out 2>&1] converted to [powershell -executionpolicy bypass "& { if (Test-Path variable:global:ProgressPreference){set-variable -name variable:global:ProgressPreference -value 'SilentlyContinue'};. c:/Windows/Temp/packer-ps-env-vars-65dfb8f8-a442-dc9c-27a4-338b1f432dd4.ps1; &'c:/Windows/Temp/script-65dfb8f8-4160-819b-fa3b-d29f7fb37369.ps1'; exit $LastExitCode }" > %SYSTEMROOT%/Temp/packer-65dfb8fb-750b-53dc-bf92-0115920e051c.out 2>&1] for use in XML string
2024/02/28 23:51:39 packer-provisioner-powershell plugin: Uploading elevated shell wrapper for command [powershell -executionpolicy bypass "& { if (Test-Path variable:global:ProgressPreference){set-variable -name variable:global:ProgressPreference -value 'SilentlyContinue'};. c:/Windows/Temp/packer-ps-env-vars-65dfb8f8-a442-dc9c-27a4-338b1f432dd4.ps1; &'c:/Windows/Temp/script-65dfb8f8-4160-819b-fa3b-d29f7fb37369.ps1'; exit $LastExitCode }" > %SYSTEMROOT%/Temp/packer-65dfb8fb-750b-53dc-bf92-0115920e051c.out 2>&1] to [C:/Windows/Temp/packer-elevated-shell-65dfb8fb-d256-f02f-7a8a-d196ead42e57.ps1]
2024/02/28 23:51:39 packer-provisioner-powershell plugin: [INFO] 3499 bytes written for 'uploadData'
2024/02/28 23:51:39 [INFO] 3499 bytes written for 'uploadData'
2024/02/28 23:51:39 packer-plugin-qemu_v1.0.10_x5.0_linux_amd64 plugin: 2024/02/28 23:51:39 Uploading file to 'C:/Windows/Temp/packer-elevated-shell-65dfb8fb-d256-f02f-7a8a-d196ead42e57.ps1'
2024/02/28 23:51:41 packer-provisioner-powershell plugin: [INFO] 6359 bytes written for 'uploadData'
2024/02/28 23:51:41 [INFO] 6359 bytes written for 'uploadData'
2024/02/28 23:51:41 packer-plugin-qemu_v1.0.10_x5.0_linux_amd64 plugin: 2024/02/28 23:51:41 Uploading file to 'c:/Windows/Temp/script-65dfb8f8-4160-819b-fa3b-d29f7fb37369.ps1'
2024/02/28 23:51:44 packer-plugin-qemu_v1.0.10_x5.0_linux_amd64 plugin: 2024/02/28 23:51:44 [INFO] starting remote command: powershell -executionpolicy bypass -file "C:/Windows/Temp/packer-elevated-shell-65dfb8fb-d256-f02f-7a8a-d196ead42e57.ps1"
    qemu.vm:
    qemu.vm: ERROR: The property 'Vendor' cannot be found on this object. Verify that the property exists.
    qemu.vm: ERROR: at <ScriptBlock>, C:\Windows\Temp\script-65dfb8f8-4160-819b-fa3b-d29f7fb37369.ps1: line 60
    qemu.vm: ERROR: at <ScriptBlock>, <No file>: line 1
    qemu.vm: ERROR: at <ScriptBlock>, <No file>: line 1
    qemu.vm: ERROR EXCEPTION: System.Management.Automation.PropertyNotFoundException: The property 'Vendor' cannot be found on this object. Verify that the property exists.
    qemu.vm: ERROR EXCEPTION:    at CallSite.Target(Closure , CallSite , Object )
    qemu.vm: ERROR EXCEPTION:    at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0)
    qemu.vm: ERROR EXCEPTION:    at System.Management.Automation.Interpreter.DynamicInstruction`2.Run(InterpretedFrame frame)
    qemu.vm: ERROR EXCEPTION:    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
    qemu.vm:
    qemu.vm: Sleeping for 60m to give you time to look around the virtual machine before self-destruction...

I fixed this by simply deleting the if/else construct in provision.ps1 but that's not a solution. Manually executing Get-CimInstance -ClassName Win32_ComputerSystemProduct -Property Vendor responds with an empty result as well as wmic path win32_computersystemproduct which return No instance(s) available :/

There are also multiple errors like WARN Failed to remove appx: Removal failed. Please contact your software vendor. triggered by remove-apps.ps1. I don't know if this is related to the 23H2 image.

And BTW: Since we have qcow2 as block-storage, wiping the harddrive should be able by trimming in optimize.ps1 within milliseconds ;-)

sonarcloud[bot] commented 6 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Stromweld commented 6 months ago

@Blaimi I think this is worth pushing as is, and a new PR can be opened once the other issues are figured out. Just click the ready for review button if you'd like me to merge it.