From owner-freebsd-bugs@freebsd.org Sat May 23 22:08:30 2020 Return-Path: Delivered-To: freebsd-bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 26E372DF89C for ; Sat, 23 May 2020 22:08:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 49TyDG0GMvz3WnT for ; Sat, 23 May 2020 22:08:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 074FE2DF723; Sat, 23 May 2020 22:08:30 +0000 (UTC) Delivered-To: bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0709F2DF355 for ; Sat, 23 May 2020 22:08:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49TyDF6SK8z3Wt8 for ; Sat, 23 May 2020 22:08:29 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D922D16A47 for ; Sat, 23 May 2020 22:08:29 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 04NM8TNu016590 for ; Sat, 23 May 2020 22:08:29 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 04NM8TN4016589 for bugs@FreeBSD.org; Sat, 23 May 2020 22:08:29 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 245051] Vagrant image for 12.1 can't start shell Date: Sat, 23 May 2020 22:08:28 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: misc X-Bugzilla-Version: 12.1-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: jmg@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status bug_severity cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2020 22:08:30 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D245051 John-Mark Gurney changed: What |Removed |Added ---------------------------------------------------------------------------- Status|New |Open Severity|Affects Only Me |Affects Some People CC| |jmg@FreeBSD.org --- Comment #1 from John-Mark Gurney --- I have been able to reproduce this. This affects the following versions of FreeBSD 11.3-R, 11.x-STABLE, 12.1-R, 13.0-CURRENT and likely effects all im= ages produced. I have sent an email to re@ about this, but have not received a reply about this. Here is the email: There is an issue where vagrant defaults to using bash to see if a VM is running. We do not install bash by default, and so that results in the following experience: nmac,ttys006,~/f114b,505$vagrant init freebsd/FreeBSD-11.4-BETA2 A `Vagrantfile` has been placed in this directory. You are now ready to `vagrant up` your first virtual environment! Please read the comments in the Vagrantfile as well as documentation on `vagrantup.com` for more information on using Vagrant. nmac,ttys006,~/f114b,506$vagrant up Bringing machine 'default' up with 'virtualbox' provider... =3D=3D> default: Box 'freebsd/FreeBSD-11.4-BETA2' could not be found. Attem= pting to find and install... default: Box Provider: virtualbox default: Box Version: >=3D 0 =3D=3D> default: Loading metadata for box 'freebsd/FreeBSD-11.4-BETA2' default: URL: https://vagrantcloud.com/freebsd/FreeBSD-11.4-BETA2 =3D=3D> default: Adding box 'freebsd/FreeBSD-11.4-BETA2' (v2020.05.15) for provider: virtualbox default: Downloading: https://vagrantcloud.com/freebsd/boxes/FreeBSD-11.4-BETA2/versions/2020.05.= 15/providers/virtualbox.box default: Download redirected to host: vagrantcloud-files-production.s3.amazonaws.com =3D=3D> default: Successfully added box 'freebsd/FreeBSD-11.4-BETA2' (v2020= .05.15) for 'virtualbox'! =3D=3D> default: Importing base box 'freebsd/FreeBSD-11.4-BETA2'... =3D=3D> default: Generating MAC address for NAT networking... =3D=3D> default: Checking if box 'freebsd/FreeBSD-11.4-BETA2' version '2020= .05.15' is up to date... =3D=3D> default: Setting the name of the VM: f114b_default_1590096819756_45= 273 =3D=3D> default: Fixed port collision for 22 =3D> 2222. Now on port 2201. =3D=3D> default: Clearing any previously set network interfaces... =3D=3D> default: Preparing network interfaces based on configuration... default: Adapter 1: nat =3D=3D> default: Forwarding ports... default: 22 (guest) =3D> 2201 (host) (adapter 1) =3D=3D> default: Booting VM... =3D=3D> default: Waiting for machine to boot. This may take a few minutes... default: SSH address: 127.0.0.1:2201 default: SSH username: vagrant default: SSH auth method: private key default: Warning: Remote connection disconnect. Retrying... default: Warning: Connection reset. Retrying... default: Warning: Remote connection disconnect. Retrying... default: Warning: Connection reset. Retrying... default: Warning: Connection reset. Retrying... default: Warning: Remote connection disconnect. Retrying... The configured shell (config.ssh.shell) is invalid and unable to properly execute commands. The most common cause for this is using a shell that is unavailable on the system. Please verify you're using the full path to the shell and that the shell is executable by the SSH user. it also causes other things to happen. I filed a bug w/ vagrant, and they refused to fix it on their side of things (like doing the correct posix way of using sh): https://github.com/hashicorp/vagrant/issues/11532 I have finally attempted the fix of providing a default Vagrantfile in the box with a shell set of sh, and this fixed the error. The file contents were just: Vagrant.configure("2") do |config| config.ssh.shell =3D "/bin/sh" end and the only requirements was that the file be located in the same directory: nmac,ttys006,~/f114b,545$tar -tzf shellfix.box Vagrantfile box.ovf metadata.json vagrant.vmdk Otherwise everything else was the same. and with that fix applied: =3D=3D> default: Waiting for machine to boot. This may take a few minutes... default: SSH address: 127.0.0.1:2201 default: SSH username: vagrant default: SSH auth method: private key default: Warning: Remote connection disconnect. Retrying... default: Warning: Connection reset. Retrying... default: Warning: Remote connection disconnect. Retrying... default: Warning: Connection reset. Retrying... default: Warning: Remote connection disconnect. Retrying... default: Warning: Connection reset. Retrying... default: Warning: Remote connection disconnect. Retrying... default: Warning: Connection reset. Retrying... default: default: Vagrant insecure key detected. Vagrant will automatically repl= ace default: this with a newly generated keypair for better security. default: default: Inserting generated public key within guest... default: Removing insecure key from the guest if it's present... default: Key inserted! Disconnecting and reconnecting using new SSH key= ... =3D=3D> default: Machine booted and ready! =3D=3D> default: Checking for guest additions in VM... default: The guest additions on this VM do not match the installed vers= ion of default: VirtualBox! In most cases this is fine, but in rare cases it c= an default: prevent things such as shared folders from working properly. If you see default: shared folder errors, please make sure the guest additions wit= hin the default: virtual machine match the version of VirtualBox you have insta= lled on default: your host and reload your VM. default: default: Guest Additions Version: 5.2.34 default: VirtualBox Version: 6.0 =3D=3D> default: Mounting shared folders... default: /vagrant =3D> /Users/jmg/f114b Vagrant is not able to mount VirtualBox shared folders on BSD-based guests. BSD-based guests do not support the VirtualBox filesystem at this time. To change the type of the default synced folder, specify the type as rsync or nfs: config.vm.synced_folder ".", "/vagrant", type: "nfs" # or "rsync" Alternatively, if you do not need to mount the default synced folder, you can also disable it entirely: config.vm.synced_folder ".", "/vagrant", disabled: true You can read more about Vagrant's synced folder types and the various configuration options on the Vagrant website. This is not a bug in Vagrant. I have not dug into why it cannot mount /vagrant, but I do have some work on getting this working on 13.0-CURRENT. I do not have a good way to run through the release process to generate a patch that would work, but I'm more than willing to test any box that is created.. They can either be pushed to the vagrant cloud, or provide me w/ a url, or even a location on the freebsd cluster that I scp down, and I will quickly confirm if the fix works. This affects all releases, not just 11.x, but 12.x and the 13.0 snapshots as well. --=20 You are receiving this mail because: You are the assignee for the bug.=