# -*- mode: ruby -*- # vi: set ft=ruby : VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.define "big-ip01.internal" do | v | v.vm.box = "/path/to/box/BIGIP-22.214.171.124.0.401.LTM_1SLOT-ide.box" config.vm.synced_folder ".", "/vagrant", disabled: true v.vm.network :forwarded_port, guest: 443, host: 10443 v.vm.provider :virtualbox do |p| p.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] p.customize ["modifyvm", :id, "--memory", 2048] p.customize ["modifyvm", :id, "--cpus", 2] p.customize ["modifyvm", :id, "--name", "big-ip01.internal"] p.customize ["modifyvm", :id, "--nic1", "nat"] p.customize ["modifyvm", :id, "--nictype1", "virtio"] p.customize ["modifyvm", :id, "--nic2", "hostonly"] p.customize ["modifyvm", :id, "--nictype2", "virtio"] p.customize ["modifyvm", :id, "--hostonlyadapter2", "vboxnet2"] end v.vm.provision "shell", inline:
" line, we tell Vagrant where to find out box we created.
" line, is important because BIG-IP did not have the Virtual box Guest Additions installed on it. You can't install them because the kernel headers do not exist on your VE. So there is not ability to mount a shared folder using Vagrant's build in commands. Since vagrant tries to do this by default, we simply turn that feature off for this box.
line we Vagrant to accept connections to the host on port 10443 and forward them to port 443 on the BIG-IP. This allows us to reach the web UI. Why port 10443? Well, I make the assumption here that most folks will not be running vagrant as root. As such, you are not going to be able to bind to ports less than 1024. So I just follow a simple convention and add 10,000 to any port I want to add. This gets you out of the range of most common services and you're allowed to bind to these ports as a normal user.
==> big-ip01.internal: Setting hostname... The following SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed! hostname Stdout from the command: Stderr from the command: logname: no login name Use the TMOS shell utility to make changes to the system configuration. For more information, see "tmsh help sys global-settings."
". This is important because BIG-IP doesn't
) that is provided by Virtualbox.
Vagrant provides convenience tools for this such as private_network, why not use those?
. If you did use the
command, the problem is that
, and all the other things are ready to go.
v.vm.provision "shell", inline: