CentOS and Ubuntu VirtualBox builds waiting interminably for SSH

612 views
Skip to first unread message

Grilinctus

unread,
Jun 18, 2016, 6:00:47 AM6/18/16
to Packer
Hiya,

I’m running Packer v0.10.1 within Ubuntu Wily (inside a VirtualBox box set up via Vagrant to include Ansible, Docker, and VirtualBox) on Windows 7 64-bit.  So far I’ve tried to build both Ubuntu and CentOS.  Both refused to progress past ‘Waiting for SSH to become available...’ (I let them wait for up to two hours before interrupting them).  Here’s the output using boxcutter/ubuntu:

vagrant@vagrant-ubuntu-wily-64:/build/boxcutter-ubuntu$ packer build -var-file=ubuntu1604.json --only=virtualbox-iso ubuntu.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: file:///Volumes/Storage/software/ubuntu/ubuntu-16.04-server-amd64.iso
    virtualbox-iso: Error downloading: open /Volumes/Storage/software/ubuntu/ubuntu-16.04-server-amd64.iso: no such file or directory
    virtualbox-iso: Downloading or copying: http://releases.ubuntu.com/16.04/ubuntu-16.04-server-amd64.iso
==> virtualbox-iso: Creating floppy disk...
    virtualbox-iso: Copying: http/preseed.cfg
==> virtualbox-iso: Creating virtual machine...
==> virtualbox-iso: Creating hard drive...
==> virtualbox-iso: Attaching floppy disk...
==> virtualbox-iso: Creating forwarded port mapping for communicator (SSH, WinRM, etc) (host port 2516)
==> virtualbox-iso: Executing custom VBoxManage commands...
    virtualbox-iso: Executing: modifyvm ubuntu1604 --memory 512
    virtualbox-iso: Executing: modifyvm ubuntu1604 --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: 127.0.0.1:5917
==> virtualbox-iso: Waiting 10s for boot...
==> virtualbox-iso: Typing the boot command...
==> virtualbox-iso: Waiting for SSH to become available...

# in another terminal, with a long pause before output:
vagrant@vagrant-ubuntu-wily-64:~$ ssh -p 2516 127.0.0.1
ssh_exchange_identification: read: Connection reset by peer


vagrant@vagrant-ubuntu-wily-64:~/packer-centos-7$ packer build centos71.json
virtualbox-iso output will be in this color.
Warnings for build 'virtualbox-iso':
* A checksum type of 'none' was specified. Since ISO files are so big,
a checksum is highly recommended.
==> 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: file:///build/environment/CentOS-7-x86_64-Minimal-1511.iso
==> virtualbox-iso: Starting HTTP server on port 8716
==> virtualbox-iso: Creating virtual machine...
==> virtualbox-iso: Creating hard drive...
==> virtualbox-iso: Creating forwarded port mapping for communicator (SSH, WinRM, etc) (host port 3545)
==> virtualbox-iso: Executing custom VBoxManage commands...
    virtualbox-iso: Executing: modifyvm CentOS 7.1 Vagrant --memory 512
    virtualbox-iso: Executing: modifyvm CentOS 7.1 Vagrant --usb off
    virtualbox-iso: Executing: modifyvm CentOS 7.1 Vagrant --audio none
==> 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: 127.0.0.1:5997
==> virtualbox-iso: Waiting 10s for boot...
==> virtualbox-iso: Typing the boot command...
==> virtualbox-iso: Waiting for SSH to become available... 
 
# …waits interminably…

And finally, using geerlingguy’s packer-ubuntu-1404, I encountered a different problem:

vagrant@vagrant-ubuntu-wily-64:~/packer-ubuntu-1404$ packer build --only=virtualbox-iso ubuntu1404.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: file:///build/environment/ubuntu-14.04.1-server-amd64.iso
==> virtualbox-iso: Starting HTTP server on port 8579
==> virtualbox-iso: Creating virtual machine...
==> virtualbox-iso: Creating hard drive...
==> virtualbox-iso: Creating forwarded port mapping for communicator (SSH, WinRM, etc) (host port 3834)
==> virtualbox-iso: Executing custom VBoxManage commands...
    virtualbox-iso: Executing: modifyvm packer-ubuntu-14.04-amd64 --memory 512
    virtualbox-iso: Executing: modifyvm packer-ubuntu-14.04-amd64 --cpus 2
    virtualbox-iso: Executing: modifyvm packer-ubuntu-14.04-amd64 --nic1 nat
==> 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: 127.0.0.1:5935
==> virtualbox-iso: Error starting VM: VBoxManage error:
==> virtualbox-iso: Unregistering and deleting virtual machine...
==> virtualbox-iso: Deleting output directory...
Build 'virtualbox-iso' errored: Error starting VM: VBoxManage error:
==> Some builds didn't complete successfully and had errors:
--> virtualbox-iso: Error starting VM: VBoxManage error:
==> Builds finished but no artifacts were created.

I guess there’s a problem with my setup, but I have no clue what.  I’ve edited all of the JSON templates to enable headless builds, otherwise consistently I get the same VBoxManage error as in the last example (but earlier, of course).  Any help would be greatly appreciated—Packer is an awesome concept and I’m champing at the bit to learn to use it so I can put it to work.

Thanks,
Grilinctus

Alvaro Miranda Aguilera

unread,
Jun 18, 2016, 2:10:49 PM6/18/16
to packe...@googlegroups.com
Hello
Can you share in a github project your files ?

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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/2d5d1687-359a-45c3-8ce3-b39d079ab5bc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Aankhen

unread,
Jun 19, 2016, 11:25:41 AM6/19/16
to packe...@googlegroups.com
Hi Alvaro,

Thanks for the quick reply, and my apologies for not responding earlier.

On Sat, Jun 18, 2016 at 11:40 PM, Alvaro Miranda Aguilera <kik...@gmail.com> wrote:
Can you share in a github project your files ?

I’ve created a repository at:


With instructions on how to run it. (You just need a working Vagrant install.) In this setup, neither of the geerlingguy repos even gets to the SSH phase.

Thanks,
Aankhen

Alvaro Miranda Aguilera

unread,
Jun 19, 2016, 4:04:33 PM6/19/16
to packe...@googlegroups.com
Hello,

For the ubuntu boxes, can you try these:

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...@googlegroups.com.

Aankhen

unread,
Jun 19, 2016, 4:34:46 PM6/19/16
to packe...@googlegroups.com
Hi Alvaro,

On Mon, Jun 20, 2016 at 1:34 AM, Alvaro Miranda Aguilera <kik...@gmail.com> wrote:

For the ubuntu boxes, can you try these:

Same issue with VBoxManage:

vagrant@vagrant-ubuntu-wily-64:/sync/packer-ubuntu$ make
rm -rf output-*
rm -rf *.box
packer validate 1604-min.json
Template validated successfully.
packer build 1604-min.json
vbox output will be in this color.
vmware output will be in this color.
Build 'vmware' errored: Failed creating VMware driver: Unable to initialize any driver for this platform. The errors
from each driver are shown below. Please fix at least one driver
to continue:
* exec: "vmware": executable file not found in $PATH
* exec: "vmware": executable file not found in $PATH
* exec: "vmplayer": executable file not found in $PATH
* exec: "vmplayer": executable file not found in $PATH
==> vbox: Downloading or copying Guest additions
    vbox: Downloading or copying: file:///usr/share/virtualbox/VBoxGuestAdditions.iso
==> vbox: Downloading or copying ISO
    vbox: Downloading or copying: http://releases.ubuntu.com/16.04/ubuntu-16.04-server-amd64.iso
==> vbox: Starting HTTP server on port 8460
==> vbox: Creating virtual machine...
==> vbox: Creating hard drive...
==> vbox: Creating forwarded port mapping for communicator (SSH, WinRM, etc) (host port 2791)
==> vbox: Executing custom VBoxManage commands...
    vbox: Executing: modifyvm ubuntu-1604-vbox --memory 1024
    vbox: Executing: modifyvm ubuntu-1604-vbox --cpus 2
==> vbox: Starting the virtual machine...
    vbox: The VM will be run headless, without a GUI. If you want to
    vbox: view the screen of the VM, connect via VRDP without a password to
    vbox: 127.0.0.1:5997
==> vbox: Error starting VM: VBoxManage error:
==> vbox: Unregistering and deleting virtual machine...
==> vbox: Deleting output directory...
Build 'vbox' errored: Error starting VM: VBoxManage error:

==> Some builds didn't complete successfully and had errors:
--> vmware: Failed creating VMware driver: Unable to initialize any driver for this platform. The errors
from each driver are shown below. Please fix at least one driver
to continue:
* exec: "vmware": executable file not found in $PATH
* exec: "vmware": executable file not found in $PATH
* exec: "vmplayer": executable file not found in $PATH
* exec: "vmplayer": executable file not found in $PATH
--> vbox: Error starting VM: VBoxManage error:

==> Builds finished but no artifacts were created.
Makefile:7: recipe for target 'build' failed
make: *** [build] Error 1

Thanks,
Grilinctus 
Reply all
Reply to author
Forward
0 new messages