FYI @Rickard my folder structure is as follows:
packer.json
http
autoinst.xml
scripts
Hope this helps.
On Monday, 24 September 2018 11:14:06 UTC+1, dean warren wrote:
> Thanks for the reply @Rickard.
>
> Yes I do mean the '*http_directory*'. Forgive me as I am a noob to
> packer...
>
> So when I run packer build on my packer file (as provided but without the '
> *vboxmanage*' section) I get the error in SLES installation stating:
> '*Cannot find URL 'http://10.0.2.2:8353/autoinst.xml
> <http://10.0.2.2:8353/autoinst.xml>' via protocol HTTP(S)*'
>
> I assumed this was because of the IP address, i.e. my host is on a
> 192.168... address for example?
> Thus I added the '*vboxmange*' section as shown to attempt to change the
> NIC to *bridged* so it will be on the correct (same) network of the host.
> I assumed the URL could not be found because of the IP address?
>
> Do you think my assumptions are potentially wrong? Can you see other
> reasons?
>
>
>
> On Monday, 24 September 2018 10:55:44 UTC+1, Rickard von Essen wrote:
>
>> I need the HTTPIP to be that of the host machine. By default Vbox
>>> configures the NIC as a NAT, so I get a 10.0... IP address. Thus I need to
>>> change to a Bridged NIC so I can utilise my http folder to get the autoyast
>>> file.
>>
>>
>> I'm not sure I understood correctly, but if by "http folder" you mean the
>> directory you configured with "http_directory" you should *not* change
>> from NAT. It will work out of the box.
>>
>> If you switch to bridge ssh will not work.
>>
>> If you remove the vboxmanage section what is the problem then?
>>
>> // Rickard
>>
>> On Mon, 24 Sep 2018 at 10:08, dean warren <[email protected]> wrote:
>>
>>> I am trying to pack for SLES 11 and Virtualbox.
>>>
>>> e.g.
>>>
>>> "builders": [
>>> {
>>> "type": "virtualbox-iso",
>>> "guest_os_type": "OpenSUSE_64",
>>> "iso_url":
>>> "file:///Users/warren_d/packer/iso/sles11sp1/SLES-11-SP1-x86_64-DVD1.iso",
>>> "iso_checksum":
>>> "D2E10420F3689FAA49A004B60FB396B7",
>>> "iso_checksum_type": "md5",
>>> "ssh_username": "vagrant",
>>> "ssh_password": "vagrant",
>>> "shutdown_command": "echo 'packer' | sudo -S
>>> shutdown -P now",
>>> "http_directory": "http",
>>> "boot_wait": "10s",
>>> "boot_command": [
>>> "<esc><enter><wait>",
>>> " linux <wait>",
>>> " lang=en_US autoyast=http://{{ .HTTPIP
>>> }}:{{ .HTTPPort }}/autoinst.xml<wait>",
>>> " textmode=1<wait>",
>>> "<enter><wait>"
>>> ],
>>> "vboxmanage": [
>>> [
>>> "modifyvm",
>>> "{{ .Name }}",
>>> "--nic1",
>>> "bridged"
>>> ]
>>> ]
>>> }
>>> ],
>>>
>>> I need the HTTPIP to be that of the host machine. By default Vbox
>>> configures the NIC as a NAT, so I get a 10.0... IP address. Thus I need to
>>> change to a Bridged NIC so I can utilise my http folder to get the autoyast
>>> file.
>>>
>>> However vbox reports no NIC (as per subject). Is this a packer specific
>>> problem (as Vbox seems to work fine outside of Packer)? How to I fix/work
>>> around this?
>>>
>>> Thanks in advance
>>>
>>> --
>>> 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/81b9062c-3ac9-4dec-9699-ec1aa4536feb%40googlegroups.com
>>>
>>> <https://groups.google.com/d/msgid/packer-tool/81b9062c-3ac9-4dec-9699-ec1aa4536feb%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
--
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/af62bfb5-817e-4cf3-a863-63d41b2df1fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.