Vagrant plugins extend its capabilities — disk resizing, automatic Guest Additions updates, DNS management, and more. This page covers the most useful plugins for database lab work on OEL 8 with VirtualBox and Parallels.
# Install a plugin
vagrant plugin install plugin-name
# Install specific version
vagrant plugin install vagrant-disksize --plugin-version 0.1.3
# List installed plugins
vagrant plugin list
# Update all plugins
vagrant plugin update
# Update specific plugin
vagrant plugin update vagrant-vbguest
# Uninstall plugin
vagrant plugin uninstall plugin-name
# Repair broken plugins
vagrant plugin repair
# Force reinstall
vagrant plugin expunge --reinstall
Resize the VM disk beyond the default box size. Essential for Oracle (50+ GB) and large database labs.
# Install
vagrant plugin install vagrant-disksize
# Vagrantfile usage
Vagrant.configure("2") do |config|
config.vm.box = "generic/oracle8"
# Resize disk to 100GB
config.disksize.size = "100GB"
end
# After vagrant up — apply inside VM (OEL 8 with LVM)
vagrant ssh
sudo growpart /dev/sda 3
sudo pvresize /dev/sda3
sudo lvextend -l +100%FREE /dev/ol/root
sudo xfs_growfs /
df -h
Automatically installs and updates VirtualBox Guest Additions to match your VirtualBox version. Fixes shared folder issues.
# Install
vagrant plugin install vagrant-vbguest
# Vagrantfile usage
Vagrant.configure("2") do |config|
config.vm.box = "generic/oracle8"
# Control Guest Additions behavior
config.vbguest.auto_update = false # Disable auto-update
config.vbguest.no_remote = true # Use local ISO only
config.vbguest.installer_options = "--nox11"
end
The official Parallels Desktop provider for Vagrant. Required for running Vagrant VMs on Parallels.
# Install
vagrant plugin install vagrant-parallels
# Verify
vagrant plugin list | grep parallels
# Set as default provider
export VAGRANT_DEFAULT_PROVIDER=parallels
Automatically manages /etc/hosts on host and guest machines. Great for multi-machine setups where VMs need to reach each other by hostname.
# Install
vagrant plugin install vagrant-hostmanager
# Vagrantfile usage
Vagrant.configure("2") do |config|
config.vm.box = "generic/oracle8"
config.hostmanager.enabled = true
config.hostmanager.manage_host = true # Update host /etc/hosts
config.hostmanager.manage_guest = true # Update VM /etc/hosts
config.hostmanager.ignore_private_ip = false
config.vm.define "master" do |node|
node.vm.hostname = "mysql-master"
node.vm.network "private_network", ip: "192.168.56.11"
end
config.vm.define "replica1" do |node|
node.vm.hostname = "mysql-replica1"
node.vm.network "private_network", ip: "192.168.56.12"
# Inside any VM: ping mysql-master (works!)
# Inside any VM: ping mysql-replica1 (works!)
end
end
Adds a reload provisioner — allows Vagrantfile to reboot the VM mid-provisioning. Useful when kernel parameters or SELinux changes require a reboot.
# Install
vagrant plugin install vagrant-reload
Vagrant.configure("2") do |config|
config.vm.box = "generic/oracle8"
# First provisioner — set kernel params requiring reboot
config.vm.provision "shell", inline: <<-SHELL
echo "vm.swappiness=10" >> /etc/sysctl.conf
sed -i "s/SELINUX=enforcing/SELINUX=disabled/" /etc/selinux/config
SHELL
# Reboot the VM
config.vm.provision :reload
# Continue provisioning after reboot
config.vm.provision "shell", inline: "echo Kernel settings applied after reboot"
end
Automatically loads environment variables from a .env file in your project directory.
# Install
vagrant plugin install vagrant-env
# Create .env file (add to .gitignore!)
cat > .env << EOF
DB_ROOT_PASSWORD=MySecret@123!
DB_MEMORY=4096
DB_CPUS=2
ORACLE_LICENSE=accept
EOF
echo ".env" >> .gitignore
# Vagrantfile reads .env automatically
Vagrant.configure("2") do |config|
config.env.enable # Load .env file
config.vm.provider "virtualbox" do |vb|
vb.memory = ENV["DB_MEMORY"] || "2048"
vb.cpus = (ENV["DB_CPUS"] || "2").to_i
end
config.vm.provision "shell",
env: { "ROOT_PASS" => ENV["DB_ROOT_PASSWORD"] },
inline: "echo Root pass is $ROOT_PASS"
end
| Plugin | Purpose | Essential for |
|---|---|---|
| vagrant-disksize | Resize VM disk | Oracle, large databases |
| vagrant-vbguest | Auto Guest Additions | VirtualBox shared folders |
| vagrant-parallels | Parallels provider | macOS with Parallels |
| vagrant-hostmanager | Auto /etc/hosts | Multi-machine hostname resolution |
| vagrant-reload | Reboot mid-provision | Kernel params, SELinux changes |
| vagrant-env | Load .env variables | Secrets and config management |