I have seen a lot of people with the same issue when trying to build a 
windows image with Packer. I have yet to find an answer on how to resolve. 
I have tried several things which have not resolved the issue. 

Does anyone have ideas on how to resolve this issue? The VM gets created in 
vCenter fine.  I can do a web console after the VM comes up and show that 
WinRM is installed and available. My assumption is that it has to do with 
Authentication. I even tried upping the timeout to 30 minutes but that does 
not help.


Tried these WinRM settings as well...HELP!

# Required for WinRM firewall rules
$profile = Get-NetConnectionProfile
Set-NetConnectionProfile -Name $profile.Name -NetworkCategory Private
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False


# Enable WinRM service
winrm quickconfig -quiet
winrm set winrm/config/service '@{AllowUnencrypted="true"}'
winrm set winrm/config/service/auth '@{Basic="true"}'
winrm set winrm/config/client 
'@{TrustedHosts="192.168.1.100,192.168.1.123"}'

Sharing my files (Attached)

==> vsphere-iso: Mount ISO images...
==> vsphere-iso: Creating floppy disk...
    vsphere-iso: Copying files flatly from floppy_files
    vsphere-iso: Copying file: setup/autounattend.xml
    vsphere-iso: Copying file: setup/setup.ps1
    vsphere-iso: Copying file: setup/vmtools.cmd
    vsphere-iso: Done copying files from floppy_files
    vsphere-iso: Collecting paths from floppy_dirs
    vsphere-iso: Resulting paths from floppy_dirs : []
    vsphere-iso: Done copying paths from floppy_dirs
==> vsphere-iso: Uploading created floppy image
==> vsphere-iso: Adding generated Floppy...
==> vsphere-iso: Set boot order temporary...
==> vsphere-iso: Power on VM...
==> vsphere-iso: Waiting for IP...
==> vsphere-iso: IP address: 172.16.100.104
==> vsphere-iso: Using winrm communicator to connect: 172.16.100.104
==> vsphere-iso: Waiting for WinRM to become available...
==> vsphere-iso: Timeout waiting for WinRM.
==> vsphere-iso: Clear boot order...
==> vsphere-iso: Power off VM...
==> vsphere-iso: Deleting Floppy image ...
==> vsphere-iso: Destroying VM...
Build 'vsphere-iso' errored: Timeout waiting for WinRM.

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/13e62b4d-b0d8-4c72-9e6b-54f1ee8983b7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Attachment: setup.ps1
Description: Binary data

Attachment: vars.json
Description: application/json

Attachment: autounattend.xml
Description: XML document

Attachment: windows-server-2016.json
Description: application/json

Reply via email to