# Vagrant box should be provided with sudo installed



## ddacunha (Apr 5, 2016)

Hello,
Vagrant expects sudo to be install in order to bring up default box without error.


```
==> default: Configuring network adapters within the VM...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

sed -i '' -e '/^#VAGRANT-BEGIN/,/^#VAGRANT-END/ d' /etc/rc.conf

Stdout from the command:



Stderr from the command:

sudo: Command not found.
```

Could you please consider installing sudo when creating the Vagrant box?


----------



## SirDice (Apr 5, 2016)

It should be there.


----------



## ddacunha (Apr 5, 2016)

That is not the case on the latest: freebsd/FreeBSD-11.0-CURRENT (vmware_desktop, 2016.03.08)


----------



## SirDice (Apr 5, 2016)

Topics about unsupported FreeBSD versions


----------



## ddacunha (Apr 5, 2016)

Noted, I will move the conversation to the mailing list. Thanks.


----------



## jhgorse (Aug 3, 2016)

ddacunha I searched the mailing list archives and I did not see anything. Let me know your status.

FWIW, I think I have found the box maker's workspace: https://github.com/brd/packer-freebsd
And I had filed a ticket. I'll start building a box to see if I can get @brd a patch.


----------



## SirDice (Aug 3, 2016)

Please note that release(7) has an option to build Vagrant images, it was added some time ago. I'm quite sure it builds an image with sudo(8). They're the same images as the official ones: https://atlas.hashicorp.com/FreeBSD/


----------



## jhgorse (Aug 3, 2016)

This issue has been fixed in BETA3 (freebsd/FreeBSD-11.0-BETA3). Cheers.


----------



## skushch (Oct 26, 2016)

i have this issue on all official vagrant boxes

```
➜  freebds  vagrant up --provider virtualbox
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'freebsd/FreeBSD-10.2-STABLE' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Loading metadata for box 'freebsd/FreeBSD-10.2-STABLE'
    default: URL: https://atlas.hashicorp.com/freebsd/FreeBSD-10.2-STABLE
==> default: Adding box 'freebsd/FreeBSD-10.2-STABLE' (v2016.01.13) for provider: virtualbox
    default: Downloading: https://atlas.hashicorp.com/freebsd/boxes/FreeBSD-10.2-STABLE/versions/2016.01.13/providers/virtualbox.box
==> default: Box download is resuming from prior download progress
==> default: Successfully added box 'freebsd/FreeBSD-10.2-STABLE' (v2016.01.13) for 'virtualbox'!
==> default: Importing base box 'freebsd/FreeBSD-10.2-STABLE'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'freebsd/FreeBSD-10.2-STABLE' is up to date...
==> default: Setting the name of the VM: freebds_default_1477477319021_73374
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default:
    default: Vagrant insecure key detected. Vagrant will automatically replace
    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...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
    default: The guest additions on this VM do not match the installed version of
    default: VirtualBox! In most cases this is fine, but in rare cases it can
    default: prevent things such as shared folders from working properly. If you see
    default: shared folder errors, please make sure the guest additions within the
    default: virtual machine match the version of VirtualBox you have installed on
    default: your host and reload your VM.
    default:
    default: Guest Additions Version: 4.3.34
    default: VirtualBox Version: 5.0
==> default: Configuring and enabling network interfaces...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

ifconfig -a | grep -o ^[0-9a-z]* | grep -v '^lo'

Stdout from the command:



Stderr from the command:

sudo: Command not found.
```


----------

