Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu 12.04.5 reaches timeout after "Done typing" #1110

Open
jimsrc opened this issue Mar 13, 2018 · 3 comments
Open

Ubuntu 12.04.5 reaches timeout after "Done typing" #1110

jimsrc opened this issue Mar 13, 2018 · 3 comments

Comments

@jimsrc
Copy link

jimsrc commented Mar 13, 2018

I'm trying to build && export a box for Ubuntu 12.04.5.
I have the .iso and I have built a VM by hand though the graphical UI of VirtualBox several times before.
I'm a new user of veewee, but I think I understand how to use it.


First try:

These are my steps:

bundle exec veewee vbox define 'ubu_12045_v4' 'ubuntu-12.04.2-desktop-amd64'
bundle exec veewee vbox build --force --nogui 'ubu_12045_v4'

At this point, the output looks normal but it times out after the "Done typing." message. The full output is below at (*1).
I execute the "export" anyway as:

bundle exec veewee vbox export 'ubu_12045_v4'

but it waits forever:

$ bundle exec veewee vbox export 'ubu12.04.5_v4'
Vagrant requires the box to be shutdown, before it can export
Sudo also needs to work for user vagrant
Performing a clean shutdown now.
Waiting for ssh login on 127.0.0.1 with user vagrant to sshd on port => 7222 to work, timeout=10000 sec
.......................................................................................................................................................................................................................................................................................................................................................................................

Of course, I edited the :iso_file in the definition.rb so it matches my .iso filename.


Second try:

I was wondering why the "ssh login" waited forever, so I executed ifconfig in my host to check if any vbox* interface was present: there was not.
So I figured maybe some network configuration was missing.
By looking at other VMs I already have, I tried to catch their network settings into my definition.rb file.
So I executed again the vbox define (with another definition name), and then added some parameters in the definition.rb file:

  :virtualbox => {
      :vm_options => [
          'pae' => 'off',
          'nic2' => 'hostonly',
          'hostonlyadapter2' => 'vboxnet0'
      ]}

While the vbox build was executing, I saw the vbox* interface in my host, by I couldn't login with ssh yet (using 22 and 7222 port number).
The full output of the vbox build is below in (*2).

Thanks in advance!!


Full output (*1):

$ bundle exec veewee vbox build 'ubu12.04.5'
Downloading vbox guest additions iso v 5.2.8 - http://download.virtualbox.org/virtualbox/5.2.8/VBoxGuestAdditions_5.2.8.iso
Checking if isofile VBoxGuestAdditions_5.2.8.iso already exists.
Full path: /home/jim/my_projects/veewee/iso/VBoxGuestAdditions_5.2.8.iso
Moving /tmp/open-uri20180310-22171-13v4gdr to /home/jim/my_projects/veewee/iso/VBoxGuestAdditions_5.2.8.iso3MB   2.9MB/s ETA:   0:00:00
Building Box ubu12.04.5 with Definition ubu12.04.5:
- debug : false
- cwd : /home/jim/my_projects/veewee
- force : false
- nogui : false
- auto : false
- checksum : false
- redirectconsole : false
- postinstall_include : []
- postinstall_exclude : []
- skip_to_postinstall : false

The isofile ubuntu-12.04.5-desktop-amd64.iso already exists.
Creating vm ubu12.04.5 : 2048M - 1 CPU - Ubuntu_64
Creating new harddrive of size 10140, format VDI, variant Standard
Attaching disk: /home/jim/VirtualBox VMs/ubu12.04.5/ubu12.04.51.vdi
Mounting cdrom: /home/jim/my_projects/veewee/iso/ubuntu-12.04.5-desktop-amd64.iso
Mounting guest additions: /home/jim/my_projects/veewee/iso/VBoxGuestAdditions_5.2.8.iso
Finding unused TCP port in range: 7222 - 7262
Selected TCP port 7222
Finding unused TCP port in range: 7222 - 7262
Selected TCP port 7222
Waiting 4 seconds for the machine to boot
Finding unused TCP port in range: 7122 - 7199
Selected TCP port 7122

Typing:[1]: <Esc><Esc><Enter>
Starting a webserver 10.0.2.2:7122, check your firewall if nothing happens
Typing:[2]: /install/vmlinuz noapic preseed/url=http://10.0.2.2:7122/preseed.cfg
# ... stacktrace thing...

Full output (*2):

$ bundle exec veewee vbox build --force --nogui 'ubu_12045_v4'
Downloading vbox guest additions iso v 5.2.8 - http://download.virtualbox.org/virtualbox/5.2.8/VBoxGuestAdditions_5.2.8.iso
Checking if isofile VBoxGuestAdditions_5.2.8.iso already exists.
Full path: /home/jim/my_projects/veewee/iso/VBoxGuestAdditions_5.2.8.iso

The isofile VBoxGuestAdditions_5.2.8.iso already exists.
Building Box ubu_12045_v4 with Definition ubu_12045_v4:
- debug : false
- cwd : /home/jim/my_projects/veewee
- force : true
- nogui : true
- auto : false
- checksum : false
- redirectconsole : false
- postinstall_include : []
- postinstall_exclude : []
- skip_to_postinstall : false

The isofile ubuntu-12.04.5-desktop-amd64.iso already exists.
Creating vm ubu_12045_v4 : 2048M - 1 CPU - Ubuntu_64
Setting VM Flag nic2 to hostonly
Setting VM Flag hostonlyadapter2 to vboxnet0
Creating new harddrive of size 10140, format VDI, variant Standard
Attaching disk: /home/jim/VirtualBox VMs/ubu_12045_v4/ubu_12045_v41.vdi
Mounting cdrom: /home/jim/my_projects/veewee/iso/ubuntu-12.04.5-desktop-amd64.iso
Mounting guest additions: /home/jim/my_projects/veewee/iso/VBoxGuestAdditions_5.2.8.iso
Finding unused TCP port in range: 7222 - 7262
Selected TCP port 7222
Finding unused TCP port in range: 7222 - 7262
Selected TCP port 7222
Waiting 4 seconds for the machine to boot
Finding unused TCP port in range: 7122 - 7199
Selected TCP port 7122

Typing:[1]: <Esc><Esc><Enter>
Starting a webserver 10.0.2.2:7122, check your firewall if nothing happens
Typing:[2]: /install/vmlinuz noapic preseed/url=http://10.0.2.2:7122/preseed.cfg
Typing:[3]: debian-installer=en_US auto locale=en_US kbd-chooser/method=us
Typing:[4]: hostname=ubu_12045_v4
Typing:[5]: fb=false debconf/frontend=noninteractive
Typing:[6]: keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA keyboard-configuration/variant=USA console-setup/ask_detect=false
Typing:[7]: initrd=/install/initrd.gz -- <Enter>
Done typing.

Stopping webserver
/home/jim/my_projects/veewee/lib/veewee/provider/core/helper/web.rb:16:in `wait_for_http_request': File "/home/jim/my_projects/veewee/definitions/ubu_12045_v4/preseed.cfg" was not requested as "/preseed.cfg" in 300 seconds, are you using firewall blocking connections to port: 7122? (RuntimeError)
        from /home/jim/my_projects/veewee/lib/veewee/provider/core/box/build.rb:242:in `block in handle_kickstart'
        from /home/jim/my_projects/veewee/lib/veewee/provider/core/box/build.rb:241:in `each'
        from /home/jim/my_projects/veewee/lib/veewee/provider/core/box/build.rb:241:in `each_with_index'
        from /home/jim/my_projects/veewee/lib/veewee/provider/core/box/build.rb:241:in `handle_kickstart'
        from /home/jim/my_projects/veewee/lib/veewee/provider/core/box/build.rb:82:in `kickstart'
        from /home/jim/my_projects/veewee/lib/veewee/provider/core/box/build.rb:113:in `build'
        from /home/jim/my_projects/veewee/lib/veewee/provider/virtualbox/box/build.rb:10:in `build'
        from /home/jim/my_projects/veewee/lib/veewee/command/vbox.rb:22:in `build'
        from /home/jim/.rvm/gems/ruby-2.2.1@veewee/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
        from /home/jim/.rvm/gems/ruby-2.2.1@veewee/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
        from /home/jim/.rvm/gems/ruby-2.2.1@veewee/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
        from /home/jim/.rvm/gems/ruby-2.2.1@veewee/gems/thor-0.20.0/lib/thor/invocation.rb:115:in `invoke'
        from /home/jim/.rvm/gems/ruby-2.2.1@veewee/gems/thor-0.20.0/lib/thor.rb:238:in `block in subcommand'
        from /home/jim/.rvm/gems/ruby-2.2.1@veewee/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
        from /home/jim/.rvm/gems/ruby-2.2.1@veewee/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
        from /home/jim/.rvm/gems/ruby-2.2.1@veewee/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
        from /home/jim/.rvm/gems/ruby-2.2.1@veewee/gems/thor-0.20.0/lib/thor/base.rb:466:in `start'
        from /home/jim/my_projects/veewee/bin/veewee:24:in `<top (required)>'
        from /home/jim/.rvm/gems/ruby-2.2.1@veewee/bin/veewee:23:in `load'
        from /home/jim/.rvm/gems/ruby-2.2.1@veewee/bin/veewee:23:in `<main>'
        from /home/jim/.rvm/gems/ruby-2.2.1@veewee/bin/ruby_executable_hooks:15:in `eval'
        from /home/jim/.rvm/gems/ruby-2.2.1@veewee/bin/ruby_executable_hooks:15:in `<main>'
@FunTimeCoding
Copy link
Collaborator

If you doubleclick the VM from the VirtualBox window, you can open the GUI. What does the screen say while it's waiting for a request of preseed.cfg?

@jimsrc
Copy link
Author

jimsrc commented Jul 10, 2018

so I just reproduced the above, and then checked the GUI right after the "Done typing." message, and I get this:

veewee__done_typing

It stays that way even after the stacktrace output.

@jimsrc
Copy link
Author

jimsrc commented Jul 14, 2018

Hi again,
So after I shutdown the VM above, I start it again to see if anything was configured anyway.
After I start it in graphical mode, I get the installation window, like the OS never got installed in the above procedure.

Is it possible that the boot_cmd_sequence is missing something? (my keyboard layout is spanish, can it be an issue?). This is my boot_cmd_sequence in the definition.rb:

:boot_cmd_sequence => [
'<Esc><Esc><Enter>',
'/install/vmlinuz noapic preseed/url=http://%IP%:%PORT%/preseed.cfg ',
'debian-installer=en_US auto locale=en_US kbd-chooser/method=us ',
'hostname=%NAME% ',
'fb=false debconf/frontend=noninteractive ',
'keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA keyboard-configuration/variant=USA console-setup/ask_detect=false ',
'initrd=/install/initrd.gz -- <Enter>'
],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants