Ok, then you don't need the workaround for GH-2526.

I'll recommend that you run with debug and ssh into the instance and read
the audit log and see why ssh is failing.

On 10 October 2016 at 14:02, <[email protected]> wrote:

>
> Which OpenStack release are you using?
>>
>
> OpenStack Kilo.
>
>
>>
>> On 10 October 2016 at 13:03, <[email protected]> wrote:
>>
>>> Hi Rickard,
>>>
>>> thanks for such a quick response. Answers inline.
>>>
>>> Do you have any of:
>>>>
>>>> Couldn't parse SSH key, trying work around for [GH-2526]
>>>> Couldn't find OpenSSL, aborting work around.
>>>> OpenSSL failed with error:
>>>> Successfully converted BER encoded SSH key to DER encoding.
>>>>
>>>> In your packer log (PACKER_LOG=1) ?
>>>>
>>>>
>>> No, I have never seen any of these.
>>>
>>>
>>>
>>>> Does both
>>>>
>>>>> ssh Admin@<IP adress>
>>>>
>>>> and
>>>>
>>>>> ssh -i os_openstack.pem Admin@<IP address>
>>>>
>>>> Work?
>>>>
>>>
>>> Yes, both work.
>>>
>>>
>>>>
>>>> Could you attach (pastebin/gist) your full log?
>>>>
>>>>
>>> Here is the full log: http://pastebin.com/E91DRTgT
>>>
>>> Thanks,
>>> Jiri
>>>
>>>
>>>>
>>>>
>>>> On 10 October 2016 at 12:17, <[email protected]> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I'm having following problem. I want to create a Windows image in
>>>>> OpenStack, which has already installed Cygwin, which is configured to
>>>>> accept SSH connection. If I try to manually create the machine in
>>>>> OpenStack, I can successfully connect to it via SSH (ssh Admin@<IP
>>>>> address>). The Windows user is "Admin".
>>>>>
>>>>> Now I want to automate it with Packer, hence I create a very simple
>>>>> JSON:
>>>>>
>>>>> {
>>>>>     "builders": [
>>>>>    {
>>>>>        "type": "openstack",
>>>>>        "identity_endpoint": <url>,
>>>>>        "source_image": "1284b45f-d164-43ab-9b4a-6024497b1b3f",
>>>>>        "ssh_username": "Admin",
>>>>>        "image_name": "Windows-packer-test"
>>>>>        "flavor": "m4.xlarge",
>>>>>        "floating_ip_pool": "10.8.172.0/22",
>>>>>        "insecure": "true"
>>>>>    }
>>>>>     ],
>>>>>     "provisioners": [
>>>>>    {
>>>>>        "type": "ansible",
>>>>>        "playbook_file": "../ansible/playbooks/images/windows-image.yaml",
>>>>>        "groups": ["packer"]
>>>>>    }    ]
>>>>> }
>>>>>
>>>>>
>>>>> The Ansible playbook does simple ECHO into file.
>>>>>
>>>>> However, the SSH handshake always fails during the "openstack: Waiting
>>>>> for SSH to become available...", even though that when I run with -debug,
>>>>> after creation of the image and associating floating IP, I can manually
>>>>> connect to the machine via SSH, either with ssh Admin@<IP adress> or
>>>>> ssh -i os_openstack.pem Admin@<IP address>. The relevant part of
>>>>> output with PACKER_LOG=1 is here: http://pastebin.com/hRCtQe81
>>>>>
>>>>> I don't see, why Packer would make any difference between my SSH
>>>>> connection and his, but I have to be missing something obvious, probably
>>>>> something with SSH keys, but I understand that Packer generated temporary
>>>>> keys, hence I do not have to specify any.
>>>>>
>>>>> The above Packer JSON works fine if I use it to create RHEL image
>>>>> (only with difference that the ssh_username is "root"). I also tried to 
>>>>> use
>>>>> WinRM communicator, i.e. specified communicator to WinRM, correct 
>>>>> username,
>>>>> corrent winrm port and it succeeds. The trouble is that connecting via
>>>>> WinRM ends up "jumping" onto newly created machine into PowerShell, which
>>>>> is something I don't want to do (the image should be then used for testing
>>>>> of a project and the testing on Windows machines is done via Cygwin, hence
>>>>> I need to set up the Cygwin environment).
>>>>>
>>>>> Do you have any idea what I'm missing?
>>>>> Thanks,
>>>>> Jiri
>>>>>
>>>>> --
>>>>> 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/111ce419-35ec-
>>>>> 4025-8430-6071c0740ffc%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/packer-tool/111ce419-35ec-4025-8430-6071c0740ffc%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/ms
>>> gid/packer-tool/71db03fa-0247-4f86-9bca-277950a88ddc%40googlegroups.com
>>> <https://groups.google.com/d/msgid/packer-tool/71db03fa-0247-4f86-9bca-277950a88ddc%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/60189de3-2a20-4672-9919-6e94aa6e46ea%40googlegroups.com
> <https://groups.google.com/d/msgid/packer-tool/60189de3-2a20-4672-9919-6e94aa6e46ea%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/CALz9Rt94_FhKDCGs4rure6cXNskxubCVyCg4gf-r6oAxATDq%2Bw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to