Re: [packer] virtualbox-iso: Timeout waiting for SSH

2017-06-22 Thread Gabo Kete
You might probably be overcomplicating the approach by using packer for 
what you are after.. I carefully looked at your scripts and what you are 
after, and instead of using Packer, which you can use this for many other 
powerful things, I'd recommend to run your application in a container.. you 
create a Dockerfile to achieve your approach and manage it within the 
container

and you can still manage the container through packer 

https://www.packer.io/docs/builders/docker.html

On Wednesday, June 21, 2017 at 10:04:28 PM UTC+12, Ritwik Pandav wrote:
>
> Thanks for the suggestion!
>
> I tried running it with a server iso, and got the same result.
>
> Please check the log output and the new json file.
>
> Is there a simpler way of doing this? I just need a basic OS which can run 
> a python application with some dependent libraries.
>
> Thanks in advance!
>
> Ritwik
>
> On Tue, Jun 20, 2017 at 7:15 PM, Alvaro Miranda Aguilera  > wrote:
>
>> Hello
>>
>> Is good to start with an existing project that works, and do small 
>> changes.
>>
>> Did you copy this and was using server image?
>>
>> desktop iso doesn't have all the required configuration to perform a 
>> silent install.
>>
>> You should be able to set headless = false and see where its failing.
>>
>> My advice: get a server image installed, and just add the ubuntu-desktop 
>> package that will enable the graphical part.
>>
>> More info for this I would assume will be available on canonical/ubuntu
>> ie:
>> https://packages.ubuntu.com/xenial/ubuntu-desktop
>>
>> Alvaro.
>>
>> On Tue, Jun 20, 2017 at 11:50 AM, Ritwik Pandav > > wrote:
>>
>>> Hi,
>>>
>>> I'm running packer version 1.0.0 and am getting the following output:
>>>
>>> virtualbox-iso output will be in this color.
>>>
>>> ==> virtualbox-iso: Cannot find "Default Guest Additions ISO" in 
>>> vboxmanage output (or it is empty)
>>> ==> virtualbox-iso: Downloading or copying Guest additions checksums
>>> virtualbox-iso: Downloading or copying: 
>>> http://download.virtualbox.org/virtualbox/5.0.40/SHA256SUMS
>>> ==> virtualbox-iso: Downloading or copying Guest additions
>>> virtualbox-iso: Downloading or copying: 
>>> http://download.virtualbox.org/virtualbox/5.0.40/VBoxGuestAdditions_5.0.40.iso
>>> ==> virtualbox-iso: Downloading or copying ISO
>>> virtualbox-iso: Downloading or copying: 
>>> file:///root/twix/devops_packer/ubuntu-16.04.1-desktop-amd64.iso
>>> ==> virtualbox-iso: Starting HTTP server on port 8192
>>> ==> virtualbox-iso: Creating virtual machine...
>>> ==> virtualbox-iso: Creating hard drive...
>>> ==> virtualbox-iso: Creating forwarded port mapping for communicator 
>>> (SSH, WinRM, etc) (host port 4365)
>>> ==> virtualbox-iso: Executing custom VBoxManage commands...
>>> virtualbox-iso: Executing: modifyvm ubuntu-16.04.1-desktop-amd64 
>>> --memory 1024
>>> virtualbox-iso: Executing: modifyvm ubuntu-16.04.1-desktop-amd64 
>>> --cpus 1
>>> ==> virtualbox-iso: Starting the virtual machine...
>>> virtualbox-iso: The VM will be run headless, without a GUI. If you 
>>> want to
>>> virtualbox-iso: view the screen of the VM, connect via VRDP without 
>>> a password to
>>> virtualbox-iso: rdp://127.0.0.1:5911
>>> ==> virtualbox-iso: Waiting 15s for boot...
>>> ==> virtualbox-iso: Typing the boot command...
>>> ==> virtualbox-iso: Waiting for SSH to become available...
>>> ==> virtualbox-iso: Timeout waiting for SSH.
>>> ==> virtualbox-iso: Unregistering and deleting virtual machine...
>>> ==> virtualbox-iso: Deleting output directory...
>>> Build 'virtualbox-iso' errored: Timeout waiting for SSH.
>>>
>>> ==> Some builds didn't complete successfully and had errors:
>>> --> virtualbox-iso: Timeout waiting for SSH.
>>>
>>> ==> Builds finished but no artifacts were created.
>>>
>>>
>>> I'm attaching all concerned files (except for the Ubunutu ISo 
>>> "ubuntu-16.04.1-desktop-amd64.iso"). 
>>>
>>> Any help with this would be appreciated.
>>>
>>> Thanks,
>>> Ritwik
>>>
>>> -- 
>>> 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 packer-tool...@googlegroups.com .
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/packer-tool/9727a97d-ba3f-4483-89ee-d972b8ecedb7%40googlegroups.com
>>>  
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> -- 
>> Alvaro
>>
>> -- 
>> This mailing list

Re: [packer] virtualbox-iso: Timeout waiting for SSH

2017-06-21 Thread Rickard von Essen
Start with something that works. For example https://github.com/chef/bento
and adapt it to your needs in small steps.

On Jun 21, 2017 12:04, "Ritwik Pandav"  wrote:

> Thanks for the suggestion!
>
> I tried running it with a server iso, and got the same result.
>
> Please check the log output and the new json file.
>
> Is there a simpler way of doing this? I just need a basic OS which can run
> a python application with some dependent libraries.
>
> Thanks in advance!
>
> Ritwik
>
> On Tue, Jun 20, 2017 at 7:15 PM, Alvaro Miranda Aguilera <
> kiki...@gmail.com> wrote:
>
>> Hello
>>
>> Is good to start with an existing project that works, and do small
>> changes.
>>
>> Did you copy this and was using server image?
>>
>> desktop iso doesn't have all the required configuration to perform a
>> silent install.
>>
>> You should be able to set headless = false and see where its failing.
>>
>> My advice: get a server image installed, and just add the ubuntu-desktop
>> package that will enable the graphical part.
>>
>> More info for this I would assume will be available on canonical/ubuntu
>> ie:
>> https://packages.ubuntu.com/xenial/ubuntu-desktop
>>
>> Alvaro.
>>
>> On Tue, Jun 20, 2017 at 11:50 AM, Ritwik Pandav 
>> wrote:
>>
>>> Hi,
>>>
>>> I'm running packer version 1.0.0 and am getting the following output:
>>>
>>> virtualbox-iso output will be in this color.
>>>
>>> ==> virtualbox-iso: Cannot find "Default Guest Additions ISO" in
>>> vboxmanage output (or it is empty)
>>> ==> virtualbox-iso: Downloading or copying Guest additions checksums
>>> virtualbox-iso: Downloading or copying:
>>> http://download.virtualbox.org/virtualbox/5.0.40/SHA256SUMS
>>> ==> virtualbox-iso: Downloading or copying Guest additions
>>> virtualbox-iso: Downloading or copying:
>>> http://download.virtualbox.org/virtualbox/5.0.40/VBoxGuestAd
>>> ditions_5.0.40.iso
>>> ==> virtualbox-iso: Downloading or copying ISO
>>> virtualbox-iso: Downloading or copying:
>>> file:///root/twix/devops_packer/ubuntu-16.04.1-desktop-amd64.iso
>>> ==> virtualbox-iso: Starting HTTP server on port 8192
>>> ==> virtualbox-iso: Creating virtual machine...
>>> ==> virtualbox-iso: Creating hard drive...
>>> ==> virtualbox-iso: Creating forwarded port mapping for communicator
>>> (SSH, WinRM, etc) (host port 4365)
>>> ==> virtualbox-iso: Executing custom VBoxManage commands...
>>> virtualbox-iso: Executing: modifyvm ubuntu-16.04.1-desktop-amd64
>>> --memory 1024
>>> virtualbox-iso: Executing: modifyvm ubuntu-16.04.1-desktop-amd64
>>> --cpus 1
>>> ==> virtualbox-iso: Starting the virtual machine...
>>> virtualbox-iso: The VM will be run headless, without a GUI. If you
>>> want to
>>> virtualbox-iso: view the screen of the VM, connect via VRDP without
>>> a password to
>>> virtualbox-iso: rdp://127.0.0.1:5911
>>> ==> virtualbox-iso: Waiting 15s for boot...
>>> ==> virtualbox-iso: Typing the boot command...
>>> ==> virtualbox-iso: Waiting for SSH to become available...
>>> ==> virtualbox-iso: Timeout waiting for SSH.
>>> ==> virtualbox-iso: Unregistering and deleting virtual machine...
>>> ==> virtualbox-iso: Deleting output directory...
>>> Build 'virtualbox-iso' errored: Timeout waiting for SSH.
>>>
>>> ==> Some builds didn't complete successfully and had errors:
>>> --> virtualbox-iso: Timeout waiting for SSH.
>>>
>>> ==> Builds finished but no artifacts were created.
>>>
>>>
>>> I'm attaching all concerned files (except for the Ubunutu ISo
>>> "ubuntu-16.04.1-desktop-amd64.iso").
>>>
>>> Any help with this would be appreciated.
>>>
>>> Thanks,
>>> Ritwik
>>>
>>> --
>>> 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 packer-tool+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>> gid/packer-tool/9727a97d-ba3f-4483-89ee-d972b8ecedb7%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> 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 a topic in the
>> 

Re: [packer] virtualbox-iso: Timeout waiting for SSH

2017-06-20 Thread Alvaro Miranda Aguilera
Hello

Is good to start with an existing project that works, and do small changes.

Did you copy this and was using server image?

desktop iso doesn't have all the required configuration to perform a silent
install.

You should be able to set headless = false and see where its failing.

My advice: get a server image installed, and just add the ubuntu-desktop
package that will enable the graphical part.

More info for this I would assume will be available on canonical/ubuntu
ie:
https://packages.ubuntu.com/xenial/ubuntu-desktop

Alvaro.

On Tue, Jun 20, 2017 at 11:50 AM, Ritwik Pandav 
wrote:

> Hi,
>
> I'm running packer version 1.0.0 and am getting the following output:
>
> virtualbox-iso output will be in this color.
>
> ==> virtualbox-iso: Cannot find "Default Guest Additions ISO" in
> vboxmanage output (or it is empty)
> ==> virtualbox-iso: Downloading or copying Guest additions checksums
> virtualbox-iso: Downloading or copying: http://download.virtualbox.
> org/virtualbox/5.0.40/SHA256SUMS
> ==> virtualbox-iso: Downloading or copying Guest additions
> virtualbox-iso: Downloading or copying: http://download.virtualbox.
> org/virtualbox/5.0.40/VBoxGuestAdditions_5.0.40.iso
> ==> virtualbox-iso: Downloading or copying ISO
> virtualbox-iso: Downloading or copying: file:///root/twix/devops_
> packer/ubuntu-16.04.1-desktop-amd64.iso
> ==> virtualbox-iso: Starting HTTP server on port 8192
> ==> virtualbox-iso: Creating virtual machine...
> ==> virtualbox-iso: Creating hard drive...
> ==> virtualbox-iso: Creating forwarded port mapping for communicator (SSH,
> WinRM, etc) (host port 4365)
> ==> virtualbox-iso: Executing custom VBoxManage commands...
> virtualbox-iso: Executing: modifyvm ubuntu-16.04.1-desktop-amd64
> --memory 1024
> virtualbox-iso: Executing: modifyvm ubuntu-16.04.1-desktop-amd64
> --cpus 1
> ==> virtualbox-iso: Starting the virtual machine...
> virtualbox-iso: The VM will be run headless, without a GUI. If you
> want to
> virtualbox-iso: view the screen of the VM, connect via VRDP without a
> password to
> virtualbox-iso: rdp://127.0.0.1:5911
> ==> virtualbox-iso: Waiting 15s for boot...
> ==> virtualbox-iso: Typing the boot command...
> ==> virtualbox-iso: Waiting for SSH to become available...
> ==> virtualbox-iso: Timeout waiting for SSH.
> ==> virtualbox-iso: Unregistering and deleting virtual machine...
> ==> virtualbox-iso: Deleting output directory...
> Build 'virtualbox-iso' errored: Timeout waiting for SSH.
>
> ==> Some builds didn't complete successfully and had errors:
> --> virtualbox-iso: Timeout waiting for SSH.
>
> ==> Builds finished but no artifacts were created.
>
>
> I'm attaching all concerned files (except for the Ubunutu ISo
> "ubuntu-16.04.1-desktop-amd64.iso").
>
> Any help with this would be appreciated.
>
> Thanks,
> Ritwik
>
> --
> 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 packer-tool+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/packer-tool/9727a97d-ba3f-4483-89ee-d972b8ecedb7%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
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 packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/CAHqq0ezE%2BTLafQOyEtWOfJtg9skspmi1Ng-NN8kK-uRq4cO-iQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [packer] virtualbox-iso: Timeout waiting for SSH.

2016-10-13 Thread Alvaro Miranda Aguilera
hello

for the shell part is how you are running the scripts.

packer will copy the file and run it

but you have this:

{
  "type": "shell",
  "script": "scripts/vm_deploy.sh",
  "execute_command": "echo '{{user `ssh_pass`}}' | {{ .Vars }}
sudo -E -S sh '{{ .Path }}'"
},


so it will do sh 


i will say make the user to be able to sudo without password


and use a more simple scripts line, like


{
  "type": "shell",
  "script": "scripts/vm_deploy.sh"
},


vm_deploy.sh


#!/usr/bin/env bash

echo "hello from the VM!!!"

id

sudo id


Alvaro.



On Thu, Oct 13, 2016 at 8:06 PM, Nick S  wrote:

> Couple updates...
>
> 1) Removing the 3 ssh parameters seemed to fix the issue. They were:
>
>   "ssh_disable_agent": true,
>   "ssh_host": "localhost",
>   "ssh_port": "2022",
>
> 2) The shell script section cannot execute scripts in bash, despite the
> #!/bin/bash header. I've implemented a work-around to make this
> shell-friendly.
> 3) The VirtualBox job exports as an ovf, I need this to be a single file
> ova export. Will open separate ticket.
>
> Thanks for the assist!
>
>
> On Tuesday, October 11, 2016 at 6:54:25 AM UTC-4, Alvaro Miranda Aguilera
> wrote:
>>
>> Hello
>>
>> You are giving fixed ports in the template:
>>
>>   "ssh_host": "localhost",
>>   "ssh_port": "2022",
>>
>> That is not needed.
>>
>> That is usually used when packer won't find the ports, but in Virtualbox
>> and VMWare packer does it for you.
>>
>> ie. have a look at this template:
>> https://github.com/cbednarski/packer-ubuntu/blob/master/1404
>> -dev.json#L56-L97
>>
>> Packer will scan the IP from Vbox/vmware for dhcp and forward a port to
>> the VM on port 22
>> then use that port automatically
>>
>> Alvaro
>>
>> On Tue, Oct 11, 2016 at 2:04 AM, Nick S  wrote:
>>
>>> I'm trying to create a VirtualBox OVA off a Ubuntu Trusty ISO. I've ran
>>> through debug mode and I'm presently set up to run with the GUI enabled, at
>>> which point, and I see an issue with the mechanism around finding SSH
>>> available. Since this is VirtualBox running NAT, I've set up port
>>> forwarding and configured the SSH agent in the server.json to seek it off
>>> the forwarded port. Shortly before it does time out, there's a window
>>> roughly 5 minutes in duration where I can successfully execute a "ssh -p
>>> 2022 localhost" from another terminal.
>>>
>>> The only theory I have is that somehow the SSH_Available checker is not
>>> using the SSH settings in the JSON. I've attached the preseed.cfg and the
>>> server.json for review. Thanks in advance!
>>>
>>> [root@centos-test ubuntu_64]# packr build server.json
>>> virtualbox-iso output will be in this color.
>>>
>>> ==> virtualbox-iso: Downloading or copying Guest additions
>>> virtualbox-iso: Downloading or copying: file:
>>> ///usr/share/virtualbox/VBoxGuestAdditions.iso
>>> ==> virtualbox-iso: Downloading or copying ISO
>>> virtualbox-iso: Downloading or copying: http://
>>> releases.ubuntu.com/14.04/ubuntu-14.04.4-server-amd64.iso
>>> ==> virtualbox-iso: Starting HTTP server on port 9001
>>> ==> virtualbox-iso: Creating virtual machine...
>>> ==> virtualbox-iso: Creating hard drive...
>>> ==> virtualbox-iso: Creating forwarded port mapping for communicator (
>>> SSH, WinRM, etc) (host port 2555)
>>> ==> virtualbox-iso: Executing custom VBoxManage commands...
>>> virtualbox-iso: Executing: modifyvm server.local --memory 1536
>>> virtualbox-iso: Executing: modifyvm server.local --cpus 1
>>> virtualbox-iso: Executing: modifyvm server.local --natpf1 guest_ssh,
>>> tcp,,2022,,22
>>> virtualbox-iso: Executing: modifyvm server.local --natpf1 postgres,
>>> tcp,,5432,,5432
>>> virtualbox-iso: Executing: modifyvm server.local --natpf1
>>> tomcat_http,tcp,,8080,,8080
>>> virtualbox-iso: Executing: modifyvm server.local --natpf1
>>> tomcat_https,tcp,,8443,,8443
>>> ==> virtualbox-iso: Starting the virtual machine...
>>> ==> virtualbox-iso: Waiting 20s for boot...
>>> ==> virtualbox-iso: Typing the boot command...
>>> ==> virtualbox-iso: Waiting for SSH to become available...
>>> ==> virtualbox-iso: Timeout waiting for SSH.
>>> ==> virtualbox-iso: Unregistering and deleting virtual machine...
>>> ==> virtualbox-iso: Deleting output directory...
>>> Build 'virtualbox-iso' errored: Timeout waiting for SSH.
>>>
>>> ==> Some builds didn't complete successfully and had errors:
>>> --> virtualbox-iso: Timeout waiting for SSH.
>>>
>>> ==> Builds finished but no artifacts were created.
>>>
>>>
>>> --
>>> 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

Re: [packer] virtualbox-iso: Timeout waiting for SSH.

2016-10-13 Thread Nick S
Couple updates...

1) Removing the 3 ssh parameters seemed to fix the issue. They were:

  "ssh_disable_agent": true,
  "ssh_host": "localhost",
  "ssh_port": "2022",

2) The shell script section cannot execute scripts in bash, despite the 
#!/bin/bash header. I've implemented a work-around to make this 
shell-friendly.
3) The VirtualBox job exports as an ovf, I need this to be a single file 
ova export. Will open separate ticket.

Thanks for the assist!


On Tuesday, October 11, 2016 at 6:54:25 AM UTC-4, Alvaro Miranda Aguilera 
wrote:
>
> Hello
>
> You are giving fixed ports in the template:
>
>   "ssh_host": "localhost",
>   "ssh_port": "2022",
>
> That is not needed.
>
> That is usually used when packer won't find the ports, but in Virtualbox 
> and VMWare packer does it for you.
>
> ie. have a look at this template:
>
> https://github.com/cbednarski/packer-ubuntu/blob/master/1404-dev.json#L56-L97
>
> Packer will scan the IP from Vbox/vmware for dhcp and forward a port to 
> the VM on port 22
> then use that port automatically
>
> Alvaro
>
> On Tue, Oct 11, 2016 at 2:04 AM, Nick S  > wrote:
>
>> I'm trying to create a VirtualBox OVA off a Ubuntu Trusty ISO. I've ran 
>> through debug mode and I'm presently set up to run with the GUI enabled, at 
>> which point, and I see an issue with the mechanism around finding SSH 
>> available. Since this is VirtualBox running NAT, I've set up port 
>> forwarding and configured the SSH agent in the server.json to seek it off 
>> the forwarded port. Shortly before it does time out, there's a window 
>> roughly 5 minutes in duration where I can successfully execute a "ssh -p 
>> 2022 localhost" from another terminal.
>>
>> The only theory I have is that somehow the SSH_Available checker is not 
>> using the SSH settings in the JSON. I've attached the preseed.cfg and the 
>> server.json for review. Thanks in advance!
>>
>> [root@centos-test ubuntu_64]# packr build server.json
>> virtualbox-iso output will be in this color.
>>
>> ==> virtualbox-iso: Downloading or copying Guest additions
>> virtualbox-iso: Downloading or copying: file:
>> ///usr/share/virtualbox/VBoxGuestAdditions.iso
>> ==> virtualbox-iso: Downloading or copying ISO
>> virtualbox-iso: Downloading or copying: http://
>> releases.ubuntu.com/14.04/ubuntu-14.04.4-server-amd64.iso
>> ==> virtualbox-iso: Starting HTTP server on port 9001
>> ==> virtualbox-iso: Creating virtual machine...
>> ==> virtualbox-iso: Creating hard drive...
>> ==> virtualbox-iso: Creating forwarded port mapping for communicator (SSH
>> , WinRM, etc) (host port 2555)
>> ==> virtualbox-iso: Executing custom VBoxManage commands...
>> virtualbox-iso: Executing: modifyvm server.local --memory 1536
>> virtualbox-iso: Executing: modifyvm server.local --cpus 1
>> virtualbox-iso: Executing: modifyvm server.local --natpf1 guest_ssh,
>> tcp,,2022,,22
>> virtualbox-iso: Executing: modifyvm server.local --natpf1 postgres,
>> tcp,,5432,,5432
>> virtualbox-iso: Executing: modifyvm server.local --natpf1 tomcat_http
>> ,tcp,,8080,,8080
>> virtualbox-iso: Executing: modifyvm server.local --natpf1 
>> tomcat_https,tcp,,8443,,8443
>> ==> virtualbox-iso: Starting the virtual machine...
>> ==> virtualbox-iso: Waiting 20s for boot...
>> ==> virtualbox-iso: Typing the boot command...
>> ==> virtualbox-iso: Waiting for SSH to become available...
>> ==> virtualbox-iso: Timeout waiting for SSH.
>> ==> virtualbox-iso: Unregistering and deleting virtual machine...
>> ==> virtualbox-iso: Deleting output directory...
>> Build 'virtualbox-iso' errored: Timeout waiting for SSH.
>>
>> ==> Some builds didn't complete successfully and had errors:
>> --> virtualbox-iso: Timeout waiting for SSH.
>>
>> ==> Builds finished but no artifacts were created.
>>
>>
>> -- 
>> 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 packer-tool...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/packer-tool/d22f3ed9-697e-4f76-bed5-93579c9daed9%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> 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 l

Re: [packer] virtualbox-iso: Timeout waiting for SSH.

2016-10-11 Thread Alvaro Miranda Aguilera
Hello

You are giving fixed ports in the template:

  "ssh_host": "localhost",
  "ssh_port": "2022",

That is not needed.

That is usually used when packer won't find the ports, but in Virtualbox
and VMWare packer does it for you.

ie. have a look at this template:
https://github.com/cbednarski/packer-ubuntu/blob/master/1404-dev.json#L56-L97

Packer will scan the IP from Vbox/vmware for dhcp and forward a port to the
VM on port 22
then use that port automatically

Alvaro

On Tue, Oct 11, 2016 at 2:04 AM, Nick S  wrote:

> I'm trying to create a VirtualBox OVA off a Ubuntu Trusty ISO. I've ran
> through debug mode and I'm presently set up to run with the GUI enabled, at
> which point, and I see an issue with the mechanism around finding SSH
> available. Since this is VirtualBox running NAT, I've set up port
> forwarding and configured the SSH agent in the server.json to seek it off
> the forwarded port. Shortly before it does time out, there's a window
> roughly 5 minutes in duration where I can successfully execute a "ssh -p
> 2022 localhost" from another terminal.
>
> The only theory I have is that somehow the SSH_Available checker is not
> using the SSH settings in the JSON. I've attached the preseed.cfg and the
> server.json for review. Thanks in advance!
>
> [root@centos-test ubuntu_64]# packr build server.json
> virtualbox-iso output will be in this color.
>
> ==> virtualbox-iso: Downloading or copying Guest additions
> virtualbox-iso: Downloading or copying: file:///usr/share/virtualbox/
> VBoxGuestAdditions.iso
> ==> virtualbox-iso: Downloading or copying ISO
> virtualbox-iso: Downloading or copying: http://releases.ubuntu.com/14.
> 04/ubuntu-14.04.4-server-amd64.iso
> ==> virtualbox-iso: Starting HTTP server on port 9001
> ==> virtualbox-iso: Creating virtual machine...
> ==> virtualbox-iso: Creating hard drive...
> ==> virtualbox-iso: Creating forwarded port mapping for communicator (SSH,
> WinRM, etc) (host port 2555)
> ==> virtualbox-iso: Executing custom VBoxManage commands...
> virtualbox-iso: Executing: modifyvm server.local --memory 1536
> virtualbox-iso: Executing: modifyvm server.local --cpus 1
> virtualbox-iso: Executing: modifyvm server.local --natpf1 guest_ssh,
> tcp,,2022,,22
> virtualbox-iso: Executing: modifyvm server.local --natpf1 postgres,tcp
> ,,5432,,5432
> virtualbox-iso: Executing: modifyvm server.local --natpf1 tomcat_http,
> tcp,,8080,,8080
> virtualbox-iso: Executing: modifyvm server.local --natpf1 tomcat_https
> ,tcp,,8443,,8443
> ==> virtualbox-iso: Starting the virtual machine...
> ==> virtualbox-iso: Waiting 20s for boot...
> ==> virtualbox-iso: Typing the boot command...
> ==> virtualbox-iso: Waiting for SSH to become available...
> ==> virtualbox-iso: Timeout waiting for SSH.
> ==> virtualbox-iso: Unregistering and deleting virtual machine...
> ==> virtualbox-iso: Deleting output directory...
> Build 'virtualbox-iso' errored: Timeout waiting for SSH.
>
> ==> Some builds didn't complete successfully and had errors:
> --> virtualbox-iso: Timeout waiting for SSH.
>
> ==> Builds finished but no artifacts were created.
>
>
> --
> 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 packer-tool+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/packer-tool/d22f3ed9-697e-4f76-bed5-93579c9daed9%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
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 packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/CAHqq0exni4bygy5oNLJmNs3VQ33RirN7u8moEnN7Vqywx%3DkC0w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.