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

PowerShell provisioner error on Windows 10 and 11 #875

Closed
tenthirtyam opened this issue Apr 13, 2024 Discussed in #858 · 1 comment · Fixed by #879
Closed

PowerShell provisioner error on Windows 10 and 11 #875

tenthirtyam opened this issue Apr 13, 2024 Discussed in #858 · 1 comment · Fixed by #879
Assignees
Labels
Milestone

Comments

@tenthirtyam
Copy link
Contributor

Discussed in #858

Originally posted by shaneholloman March 21, 2024
I have managed to build every linux distro and every Windows Server variant.
However I can not build the Windows 10 and 11 desktops.

My ENV

  shadmin @ kea ❯ ~ uname -a
Linux kea 6.5.0-26-generic #26~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Mar 12 10:22:43 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
  shadmin @ kea ❯ ~ powershell --version
PowerShell 7.4.1
  shadmin @ kea ❯ ~ packer --version
Packer v1.10.2
  shadmin @ kea ❯ ~ terraform --version
Terraform v1.7.5
on linux_amd64
  shadmin @ kea ❯ ~ ansible --version
ansible [core 2.16.4]
  config file = None
  configured module search path = ['/home/shadmin/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/shadmin/.local/lib/python3.10/site-packages/ansible
  ansible collection location = /home/shadmin/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/shadmin/.local/bin/ansible
  python version = 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] (/usr/bin/python3)
  jinja version = 3.1.3
  libyaml = True
  shadmin @ kea ❯ ~ 

I am immediately blocked with this message:

CONFIRM: Build a Windows 10 - Professional Only Template for VMware vSphere?

Continue? (y/n)
y
Building a Windows 10 - Professional Only Template for VMware vSphere...
Initializing HashiCorp Packer and required plugins...
Starting the build....
packer build -force -on-error=ask 
Error: Failed preparing provisioner-block "powershell" ""

  on /home/<sensitive>/Dropbox/shane/git/it/vsphere-packer/builds/windows/desktop/10/windows.pkr.hcl line 283:
  (source code not available)

1 error(s) occurred:

* Either a script file or inline script must be specified.

The error points to this block

...
  provisioner "powershell" {
    elevated_user     = var.build_username
    elevated_password = var.build_password
    inline            = var.inline
  }
...

Which is not used for the server variants of windows builds. Just for win 10 and 11.

I have to admit my ignorance here, I don't know how to fix this.
Theres no docs describing, this issue, or if it's not an issue, no docs showing how to run these differently from the other 25 or so succesful builds

Maybe it isn't broken to begin with?

It would be nice to work out why the server variants build without issue, where as the win 10 and 11 desktops dont because of this difference.

Again sorry for my ignorance : )

@tenthirtyam tenthirtyam added the type/bug Bug label Apr 13, 2024
@tenthirtyam tenthirtyam self-assigned this Apr 13, 2024
@tenthirtyam tenthirtyam added this to the v0.19.1 milestone Apr 13, 2024
@tenthirtyam tenthirtyam added the size/xs X-Small label Apr 13, 2024
Copy link

I'm going to lock this issue because it has been closed for 30 days. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
1 participant