mwrock / packer-templates

Templates for creating vagrant boxes
Other
535 stars 250 forks source link

vagrant box is not connectable out-of-the-box #86

Open chanond-w opened 7 years ago

chanond-w commented 7 years ago

I was following this post without using chef (I was using VirtualBox) and it seems like it was not as straight forward as you have posted. I had to add more powershell script steps to make it connectable with ansible by using the following script

netsh advfirewall firewall add rule name="WinRM-HTTP" dir=in localport=5985 protocol=TCP action=allow netsh advfirewall firewall add rule name="WinRM-HTTPS" dir=in localport=5986 protocol=TCP action=allow $c = New-SelfSignedCertificate -DnsName "192.168.253.253" -CertStoreLocation cert:\LocalMachine\My winrm create winrm/config/Listener?Address=*+Transport=HTTPS "@{Hostname="192.168.253.253";CertificateThumbprint="$($c.ThumbPrint)"}" netsh advfirewall firewall add rule name="WinRM-HTTPS" dir=in localport=5986 protocol=TCP action=allow iwr https://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/ConfigureRemotingForAnsible.ps1 -UseBasicParsing | iex

chanond-w commented 7 years ago

Should be fixed by #24