Skip to content

Instantly share code, notes, and snippets.

@hectorcanto
Last active August 29, 2015 14:25
Show Gist options
  • Save hectorcanto/14d34d59f23da84ce1fd to your computer and use it in GitHub Desktop.
Save hectorcanto/14d34d59f23da84ce1fd to your computer and use it in GitHub Desktop.
A sample of Vagrantfile in construction
Copy iso file /usr/share/virtualbox/VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAdditions.iso
mount: /dev/loop0 is write-protected, mounting read-only
Installing Virtualbox Guest Additions 4.3.30 - guest version is
Verifying archive integrity... All good.
Uncompressing VirtualBox 4.3.30 Guest Additions for Linux............
VirtualBox Guest Additions installer
Please install the bzip2 utility.
Copying additional installer modules ...
./install.sh: line 344: bzip2: command not found
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
./install.sh: line 357: bzip2: command not found
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
An error occurred during installation of VirtualBox Guest Additions 4.3.30. Some functionality may not work as intended.
In most cases it is OK that the "Window System drivers" installation failed.
==> default: Checking for guest additions in VM...
default: No guest additions were detected on the base box for this VM! Guest
default: additions are required for forwarded ports, shared folders, host only
default: networking, and more. If SSH fails on this machine, please install
default: the guest additions and repackage the box to continue.
default:
default: This is not an error message; everything may continue to work properly,
default: in which case you may ignore this message.
==> default: Configuring and enabling network interfaces...
==> default: Installing rsync to the VM...
==> default: Rsyncing folder: /home/hcantv/Envs/vagrants/silly/ => /home/vagrant/sync
==> default: Installing NFS client...
==> default: Exporting NFS shared folders...
==> default: Preparing to edit /etc/exports. Administrator privileges will be required...
nfsd running
==> default: Mounting NFS shared folders...
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "official/centos7"
config.vm.box_url = "https://atlas.hashicorp.com/centos/boxes/7/versions/1505.01/providers/virtualbox.box"
# NETWORK
config.vm.network "private_network", ip: "192.168.56.102"
# Explictly set IP
config.vm.network "forwarded_port", guest: 80, host: 8080
# SYNCED FOLDERS
config.vm.synced_folder ".", "/vagrant", nfs: true
config.vm.synced_folder "../../dockers/nginx", "/vagrant/dockers/nginx/", nfs:true
end
@hectorcanto
Copy link
Author

Vagrantfile:14 is necessary not only for NFS (instead of RSync) but also because the default synced folder is ".", "sync". So far I couldn't disable it not find any solution online. In theory ".", "/vagrant" type:rsync should be the default synced folder (see the docs!)

@hectorcanto
Copy link
Author

The prompt captured is after dependency installation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment