22.04 Vagrant Images Do Not Finish Initial Boot Due to SSH Timeout

Bug #1969664 reported by John Chittum
40
This bug affects 7 people
Affects Status Importance Assigned to Milestone
cloud-images
Triaged
High
Unassigned
livecd-rootfs (Ubuntu)
Fix Released
Undecided
Unassigned
Jammy
Confirmed
Undecided
Unassigned
Kinetic
Fix Released
Undecided
Unassigned

Bug Description

[ SRU TEMPLATE ]
[Impact]

 * 22.04 and 22.10 images will fail to boot on older versions of vagrant due to ssh key issues. this prevents users of 18.04 and 20.04 vagrant from the archives to use 22.04 images

 * Not making this change, 22.04 vagrant images will continue to be unbootble on vagrant < 2.2.16.

[Test Plan]

 * reproduce by

1. having vagrant < 2.2.16 installed on your system (such as having a 20.04 host and doing apt-get install vagrant)
2. vagrant init ubuntu/jammy64
3. vagrant up
4. observe the failure to connect

 * to test
1. ensure vagrant < 2.2.16 is installed
2. download a provided test box
3. vagrant box add <path/to/test/box> --name test-jammy64
4. vagrant init test-jammy64
5. vagrant up
6. observe image booting properly

[Where problems could occur]

 * It is possible that the new key is of a type not recognized on old enough systems (it uses ed25519 which has been supported for a while, but may not be supported on all systems). having wide community testing with many different hosts and versions of vagrant will be helpful

[ Original Bug ]
currently published 22.04 Vagrant images will fail to finish booting on systems running vagrant < 2.2.16. The upstream issue is described here:

https://github.com/hashicorp/vagrant/issues/11783

The fix in future vagrant versions is committed here:

https://github.com/hashicorp/vagrant/pull/12298

However, vagrant, as supplied as a package in the Ubuntu archive in Universe is not => 2.2.16 until Jammy. This means that host systems of 20.04, 18.04, and 16.04 using the universe packaged vagrant will be unable to start the Jammy image.

A workaround is stated in gh issue 11783: to provide our own newer key that matches the algorithms that the guest system expects, without needing the renegotiation fix put in place in vagrant.

John Chittum (jchittum)
Changed in cloud-images:
status: New → Triaged
importance: Undecided → High
Revision history for this message
John Chittum (jchittum) wrote :

a test image has been made and available at

https://people.canonical.com/~jchittum/vagrant-testing/

This image uses an ed25519 key created at build time, included in the `.box`, and referenced in the default image Vagrantfile. This image is meant to work on a wider number of vagrant versions, as supplied in Ubuntu universe

I tested this on Focal with Virtualbox 6.1 and vagrant 2.2.6, and it was able to complete the bootstrap SSH step.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in livecd-rootfs (Ubuntu):
status: New → Confirmed
Revision history for this message
Olaf Mandel (olafmandel) wrote :

Tried out the test image by adding the following lines to my Vagrantfile:

config.vm.box = "ubuntu/jammy64"
config.vm.box_url = "https://people.canonical.com/~jchittum/vagrant-testing/ubuntu-jammy-vagrant-TESTING-20220419.box"

This works for me on Debian Bullseye with virtualbox 6.1.32 and vagrant 2.2.14.

Revision history for this message
Erik Sommer (erik-sommer) wrote :

I can also confirm that the workaround works for me.

With Ubuntu 21.10, vagrant 2.2.14 and virtualbox 6.1.32_Ubuntu r149290.

Steve Langasek (vorlon)
summary: - 22.04 Vagrant Images Do Not Finish Initial Boot Due to SSH Timout
+ 22.04 Vagrant Images Do Not Finish Initial Boot Due to SSH Timeout
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package livecd-rootfs - 2.765

---------------
livecd-rootfs (2.765) kinetic; urgency=medium

  [ Michael Hudson-Doyle ]
  * auto/config: preserve germinate-output directory when removing config to
    speed up local iteration.
  * auto/config: Emit error message to stderr in _sanitize_passes.
  * Produce a tarball of artifacts for netbooting during live-server build.

  [ John Chittum ]
  * vagrant: use ed25519 insecure key (LP: #1969664)

 -- John Chittum <email address hidden> Thu, 26 May 2022 09:28:26 -0500

Changed in livecd-rootfs (Ubuntu Kinetic):
status: Confirmed → Fix Released
Revision history for this message
John Chittum (jchittum) wrote :

Kinetic Vagrant image is available at : https://app.vagrantup.com/ubuntu/boxes/kinetic64

for a fresh install quickly

vagrant init ubuntu/kinetic64
vagrant up

This image should work on all versions of Vagrant available in Ubuntu archives. I'll spin some VMs and do more testing, but community help is appreciated. Once a few versions of Vagrant and hosts are verified, we'll be able to do an SRU to Jammy

Testing
******************

Host: Ubuntu 22.04
Vagrant: 2.2.19
Virtualbox: 6.1
VBox Guest Additions: 6.0.0 r127566

successful boot and ssh. no errors

John Chittum (jchittum)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in livecd-rootfs (Ubuntu Jammy):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.