Yeh, totally forgot that, it was added since the performance of WinRM
upload is really poor.

So in your powershell script there should be a PACKER_HTTP_ADDR env var
that you can use to access the http_dir from within the guest.

On 22 June 2017 at 12:02, Alvaro Miranda Aguilera <[email protected]> wrote:

> spoke too fast:
>
> documentation: https://www.packer.io/docs/provisioners/
> powershell.html#packer_http_addr
>
> On Thu, Jun 22, 2017 at 11:54 AM, Alvaro Miranda Aguilera <
> [email protected]> wrote:
>
>> Hi
>>
>> i seems in 1.0.1 a new variable was added.
>>
>> PACKER_HTTP_ADDR
>>
>> Seems documentation is pending, but its explained here:
>> https://github.com/hashicorp/packer/issues/4409
>>
>> So that goes aligned with what Rickard said.
>>
>> I am sorry that I can't help you with Poweshell example :(
>>
>> Alvaro.
>>
>>
>> On Thu, Jun 22, 2017 at 11:30 AM, Woopa <[email protected]> wrote:
>>
>>> What does that concretly mean Rickard? That we cannot use the HTTP
>>> server for provisiong tasks (in other words, I cannot bring my packages
>>> with that method on my node?)
>>>
>>> @Alvaro: Thanks for the hints.
>>>
>>> I actually tried using a HTTP_directory but I couldnt reach it (I was
>>> expecting to be able to browse directly to it via internet explorer using
>>> the IP and the port that are specified in the output:
>>>
>>>  ==> hyperv-iso: Creating temporary directory...
>>> ==> hyperv-iso: Downloading or copying ISO
>>>     hyperv-iso: Downloading or copying: file:///C:/Users/taavast3/Down
>>> loads/en_windows_server_2012_r2_with_update_x64_dvd_6052708%
>>> 20%281%29.iso
>>> ==> hyperv-iso: Creating floppy disk...
>>>     hyperv-iso: Copying files flatly from floppy_files
>>>     hyperv-iso: Copying file: answer_files/2012_r2/Autounattend.xml
>>>     hyperv-iso: Copying file: scripts/config_winrm.ps1
>>>     hyperv-iso: Copying file: scripts/config_remotedesktop.ps1
>>>     hyperv-iso: Copying file: scripts/config_tattoo.ps1
>>>     hyperv-iso: Copying file: scripts/LaunchScripts.ps1
>>>     hyperv-iso: Copying file: scripts/start.ps1
>>>     hyperv-iso: Copying file: scripts/ALL-IMP-PowershellUpgr
>>> ade/__Inputs/Additional-Commands.psm1
>>>     hyperv-iso: Copying file: scripts/ALL-IMP-PowershellUpgr
>>> ade/ALL-IMP-PowershellUpgrade.ps1
>>>     hyperv-iso: Copying file: scripts/ALL-IMP-PowershellUpgr
>>> ade/sources/Win8.1AndWK12R2-KB3191564-x64.msu
>>>     hyperv-iso: Copying file: scripts/ALL-IMP-PowershellUpgr
>>> ade/sources/NDP462-KB3151800-x86-x64-AllOS-ENU.exe
>>>     hyperv-iso: Done copying files from floppy_files
>>>     hyperv-iso: Collecting paths from floppy_dirs
>>>     hyperv-iso: Resulting paths from floppy_dirs : []
>>>     hyperv-iso: Done copying paths from floppy_dirs
>>> ==> hyperv-iso: Starting HTTP server on port *8172*
>>> ==> hyperv-iso: Creating switch 'packer-hyperv-iso' if required...
>>> ==> hyperv-iso:     switch 'packer-hyperv-iso' already exists. Will not
>>> delete on cleanup...
>>> ==> hyperv-iso: Creating virtual machine...
>>> ==> hyperv-iso: Enabling Integration Service...
>>> ==> hyperv-iso: Setting boot drive to os dvd drive
>>> C:/Users/taavast3/Downloads/en_windows_server_2012_r2_with_update_x64_dvd_6052708
>>> (1).iso ...
>>> ==> hyperv-iso: Mounting os dvd drive C:/Users/taavast3/Downloads/en
>>> _windows_server_2012_r2_with_update_x64_dvd_6052708 (1).iso ...
>>> ==> hyperv-iso: Mounting floppy drive...
>>> ==> hyperv-iso: Skipping mounting Integration Services Setup Disk...
>>> ==> hyperv-iso: Mounting secondary DVD images...
>>> ==> hyperv-iso: Configuring vlan...
>>> ==> hyperv-iso: Starting the virtual machine...
>>> ==> hyperv-iso: Waiting 10s for boot...
>>> ==> hyperv-iso: Host IP for the HyperV machine: *169.254.127.211*
>>> ==> hyperv-iso: Typing the boot command...
>>> ==> hyperv-iso: Waiting for WinRM to become available...
>>>
>>> I tried to connect (from my node) to http://169.254.127.211:8172
>>> I was expecting to see the list of files that were in the HTTP_Directory.
>>>
>>> I didn't try to use a direct URL to the file as Alvaro mentioned (I am
>>> currently redeploying, and i'll try as soon as possible
>>>
>>> Concerning the ISO, I have create an ISO as mentionned here
>>> https://www.packer.io/docs/builders/hyperv-iso.html#iso_urls and added
>>> that iso in my configuration file undere the property
>>> "Secondary_iso_images".
>>> "secondary_iso_images": "Windows2012R2/Repository.iso"
>>>
>>> The next question I have is how can I know on which drive letter this
>>> ISO file while be mounted?
>>> Also, more generaly, how can I access packer variables in my powershell
>>> session? Do I have to specify in the "variables" : [] section? And how do I
>>> read the values with powershell afterwards?
>>> $env:MyPackerVariable ?
>>>
>>> An example would be great!
>>>
>>>
>>>>> --
>>>>> Alvaro
>>>>>
>>>>> --
>>>>> 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/CAHqq0exEXk8nT
>>>>> bgAexyN6i3k2sB4eMxZuBqJQprAMVcfETOoUw%40mail.gmail.com
>>>>> <https://groups.google.com/d/msgid/packer-tool/CAHqq0exEXk8nTbgAexyN6i3k2sB4eMxZuBqJQprAMVcfETOoUw%40mail.gmail.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/ms
>>> gid/packer-tool/ef203d59-63e5-4b16-bb7a-0f6fd88e3031%40googlegroups.com
>>> <https://groups.google.com/d/msgid/packer-tool/ef203d59-63e5-4b16-bb7a-0f6fd88e3031%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> Alvaro
>>
>>
>
>
> --
> Alvaro
>
> --
> 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/CAHqq0ex1SLMgWfc9u4MCKQDGAVuCj6b7%3Dt3G24cc8YB%3D0KOt4w%
> 40mail.gmail.com
> <https://groups.google.com/d/msgid/packer-tool/CAHqq0ex1SLMgWfc9u4MCKQDGAVuCj6b7%3Dt3G24cc8YB%3D0KOt4w%40mail.gmail.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/CALz9Rt_TpXYjwH0Pp4b5V7JMBK%2B%2BhP2nWJTHZqftdY20Q73PjA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to