Beside Alvaro's explanation, here're a few tips from me:

1. Since packer is very eager to remove the failed build output, you need 
some way to investigate what's going on *during the build*. Thus try 
launching packer with *"-debug"* flag! It pauses the build after every 
step, giving you infinite time to see what's going on in the VM.
2. Once the build is paused, press "Ctrl+Alt+F1" or similar in VM console 
to switch to another console, and check if you can access the http server 
from there. 
3. If you can't access the http server from there, then there can be 
multiple reasons. 
  3.1 Check *virtualbox logs* to see if there was an error with NAT.
  3.2. Check if firewall blocked it.
  3.3. Check *packer log* to see if the http server started successfully.

On Friday, August 26, 2016 at 9:01:49 AM UTC+2, Alvaro Miranda Aguilera 
wrote:
>
> Hello,
>
> Packer can open a http server and serve a directory from there.
>
> ie:
>
> {
> "type": "virtualbox-iso",
> "boot_command": [
> .. 
>
> preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ",
> .. 
> ],
> .. 
> "http_directory": "http",
> .. 
> },
>
>
> Here you can see the directory http/ will be on a web server
>
> and then the intaller will read a response file from http://{{ .HTTPIP 
> }}:{{ .HTTPPort }}/preseed.cfg
> Thanks
> Alvaro.
>
>
> On Thu, Aug 25, 2016 at 8:31 PM, Chen Xi <[email protected] <javascript:>
> > wrote:
>
>> Hi Alvaro,
>>
>> I am seeing the same issue. My question is do we need to build a http 
>> server on local machine running packer.
>>
>> Thanks,
>> Xi
>>
>> On Friday, August 5, 2016 at 12:55:40 PM UTC-4, Alvaro Miranda Aguilera 
>> wrote:
>>>
>>> Hello.
>>>
>>> already did.
>>>
>>> I suggest perform the tutorial and learn from the process.
>>>
>>> The repo used in the tutorial works.
>>>
>>> Alvaro.
>>>
>>> On Fri, Aug 5, 2016 at 6:53 PM, Samirkanta Lenka <[email protected]> 
>>> wrote:
>>>
>>>> Hello Alvaro,
>>>>
>>>> Thanks for your quick reply-
>>>> Here is my requirements-
>>>>
>>>> Wants to create an ubuntu image using Packer, where Shell Scripts as 
>>>> the provisioners and being built for Virtual Box. 
>>>>
>>>> Can you please help me on this.
>>>>
>>>> -- 
>>>> 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/7de8f059-e943-49ed-b93f-4bf59ca9178c%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/packer-tool/7de8f059-e943-49ed-b93f-4bf59ca9178c%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>>>
>>> -- 
>>> Alvaro
>>> (+31)103400555
>>>
>> -- 
>> 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] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/packer-tool/c7974cf6-5a70-4a9d-a0d9-40fe7a2ade15%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/packer-tool/c7974cf6-5a70-4a9d-a0d9-40fe7a2ade15%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Alvaro
> (+31)103400555
>

-- 
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/33d2e587-f65e-4fb7-83a2-fe830f0fd519%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to