Home > vagrant > Vagrant – Setting up an Ubuntu box on Mac OS X

Vagrant – Setting up an Ubuntu box on Mac OS X

Problem:
Needed to have an Ubuntu Box on Mac OS X Yosemite.

Solution:
Vagrant + Ubuntu + Virtual Box

$ vagrant init ubuntu/trusty64

$ vagrant up --provider virtualbox

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/trusty64' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 22 => 2222 (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: 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.10
    default: VirtualBox Version: 5.0
==> default: Mounting shared folders...
    default: /vagrant => /Users/rodnee/local_trusty
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.


$ vagrant ssh

Welcome to Ubuntu 14.04.3 LTS (GNU/Linux 3.13.0-62-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

  System information as of Fri Aug 21 09:36:29 UTC 2015

  System load:  0.16              Processes:           92
  Usage of /:   2.9% of 39.34GB   Users logged in:     0
  Memory usage: 18%               IP address for eth0: 10.0.2.15
  Swap usage:   0%

  Graph this data and manage this system at:
    https://landscape.canonical.com/

  Get cloud support with Ubuntu Advantage Cloud Guest:
    http://www.ubuntu.com/business/services/cloud


Last login: Fri Aug 21 09:04:39 2015 from 10.0.2.2
-bash: warning: setlocale: LC_ALL: cannot change locale (en.US): No such file or directory

vagrant@vagrant-ubuntu-trusty-64:~$ exit
logout
Connection to 127.0.0.1 closed.

$ vagrant halt

==> default: Attempting graceful shutdown of VM...

Other commands:
1. To view the boxes that you have on your machine.


$ vagrant box list
ubuntu/trusty64     (virtualbox, 20150817.0.0)
ubuntu64box         (vmware_fusion, 0)

$ vagrant box remove ubuntu64box --provider vmware_fusion
Removing box 'ubuntu64box' (v0) with provider 'vmware_fusion'...

Assumptions:
1. You have VirtualBox installed on your machine.
2. You have Vagrant installed on your machine.

Source:
https://atlas.hashicorp.com/boxes/search?provider=virtualbox
Creating Development Environments with Vagrant by Michael Peacock

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: