Vagrant OEL 8 DevOps · VirtualBox · Parallels · Plugins

VagrantEssential Plugins for Database Labs

Essential Vagrant plugins for database work on OEL 8 — disk resizing, Guest Additions, Parallels provider, hostmanager, reload and environment variables.

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.

BASH — Plugin Management
# 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.

BASH — Install
# Install
vagrant plugin install vagrant-disksize
Ruby — vagrant-disksize
# Vagrantfile usage
Vagrant.configure("2") do |config|
  config.vm.box = "generic/oracle8"

  # Resize disk to 100GB
  config.disksize.size = "100GB"
end
BASH — Apply Resize in VM
# 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.

BASH — Install
# Install
vagrant plugin install vagrant-vbguest
Ruby — 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.

BASH — vagrant-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.

BASH — Install
# Install
vagrant plugin install vagrant-hostmanager
Ruby — 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.

BASH — Install
# Install
vagrant plugin install vagrant-reload
Ruby — 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.

BASH — Install
# Install
vagrant plugin install vagrant-env
BASH — .env File
# 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
Ruby — vagrant-env
# 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
PluginPurposeEssential for
vagrant-disksizeResize VM diskOracle, large databases
vagrant-vbguestAuto Guest AdditionsVirtualBox shared folders
vagrant-parallelsParallels providermacOS with Parallels
vagrant-hostmanagerAuto /etc/hostsMulti-machine hostname resolution
vagrant-reloadReboot mid-provisionKernel params, SELinux changes
vagrant-envLoad .env variablesSecrets and config management