Vagrant OEL 8 DevOps · VirtualBox · Parallels · Troubleshooting

VagrantTroubleshooting OEL 8 Issues

Fix the most common Vagrant issues with VirtualBox and Parallels — SSH timeout, Parallels box add errors, network problems, disk full and provisioner failures.

This page covers the most common Vagrant issues with VirtualBox and Parallels providers on OEL 8, with clear diagnostic steps and fixes.

BASH — SSH Hang Fix
# Symptom: VM starts but Vagrant waits forever for SSH
# default: Warning: Connection timeout. Retrying...

# Diagnostic steps:
# 1. Check VM actually started
vagrant global-status

# 2. Try connecting manually
vagrant ssh-config
ssh -i .vagrant/machines/default/virtualbox/private_key vagrant@127.0.0.1 -p 2222

# Common fixes:
# Fix A: Wrong network adapter — add to Vagrantfile:
config.vm.provider "virtualbox" do |vb|
  vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
end

# Fix B: Disable GUI then try
config.vm.provider "virtualbox" do |vb|
  vb.gui = false
end

# Fix C: Increase SSH timeout
config.vm.boot_timeout = 600
BASH — Parallels Box Fix
# Symptom:
# vagrant box add oraclelinux_custom oraclelinux.box
# Error: The box doesn't match the provider

# Fix: Use metadata JSON method (see Page 16 for full guide)
cat > box-metadata.json << EOF
{
  "name": "oraclelinux8-parallels",
  "versions": [{
    "version": "1.0.0",
    "providers": [{
      "name": "parallels",
      "url": "file:///absolute/path/to/oraclelinux8.box"
    }]
  }]
}
EOF

# Use the metadata JSON to add the box
vagrant box add box-metadata.json

# Never use:
vagrant box add myname myfile.box   # ← This fails for Parallels!
BASH — Network Fix
# Symptom: Cannot ping 192.168.56.x from host

# On macOS — VirtualBox host-only adapter may need to be created:
VBoxManage hostonlyif create
VBoxManage hostonlyif ipconfig vboxnet0 --ip 192.168.56.1

# On OEL 8 host — check firewall
sudo firewall-cmd --zone=public --add-rich-rule="rule family=ipv4 source address=192.168.56.0/24 accept" --permanent
sudo firewall-cmd --reload

# In Vagrantfile — try explicit adapter name
config.vm.network "private_network",
  ip: "192.168.56.10",
  name: "vboxnet0"   # VirtualBox

# For Parallels — check host-only network exists
prlsrvctl net list
BASH — Disk Full Fix
# Symptom: No space left on device inside OEL 8 VM

# Check disk inside VM
df -h
lsblk

# Expand disk — first resize via VirtualBox (VM must be off)
vagrant halt
VBoxManage modifymedium disk /path/to/vm.vmdk --resize 51200  # 50GB

# Start VM again
vagrant up
vagrant ssh

# Resize partition and filesystem inside VM
sudo growpart /dev/sda 3
sudo pvresize /dev/sda3
sudo lvextend -l +100%FREE /dev/ol/root
sudo xfs_growfs /

df -h   # Verify new size
BASH — Provisioner Fix
# Symptom: provisioner script fails during vagrant up

# Re-run provisioner without restarting VM
vagrant provision

# Run specific provisioner
vagrant provision --provision-with shell

# Debug — add set -x to shell script for verbose output
#!/bin/bash
set -ex   # e=exit on error, x=print each command

# Check provisioner logs
vagrant up 2>&1 | tee vagrant.log
grep -i "error\|fail" vagrant.log
BASH — Plugin Fix
# Symptom: Provider not found or plugin errors

# Reinstall plugin
vagrant plugin uninstall vagrant-parallels
vagrant plugin install vagrant-parallels

# Check plugin version
vagrant plugin list

# Update plugin
vagrant plugin update vagrant-parallels

# Check Parallels is Pro/Business edition
# Standard edition does NOT support Vagrant provider

# Set PATH for prlctl
export PATH=$PATH:/usr/local/bin
which prlctl
SymptomLikely CauseFix
SSH timeout on vagrant upNetwork/Guest Additions issueAdd natdnshostresolver1=on, increase boot_timeout
Parallels box add failsMissing metadata.jsonUse metadata JSON method (Page 16)
Private network unreachableHost-only adapter not configuredCreate VBoxManage hostonlyif or check prlsrvctl net
Disk full in VMDefault box size too smallUse vagrant-disksize plugin or VBoxManage resize
Provisioner failsScript error or network issueAdd set -ex, run vagrant provision, check logs
vagrant plugin errorPlugin version mismatchvagrant plugin update or reinstall
VM starts but MySQL not runningProvisioner failed silentlyvagrant ssh; check journalctl -u mysqld
Port forwarding not workingPort conflict on hostUse auto_correct:true or different host port
BASH — Debug Commands
# Verbose vagrant up output
vagrant up --debug 2>&1 | tee vagrant-debug.log

# Check VM state
vagrant global-status --prune

# Check VirtualBox VM details
VBoxManage showvminfo "OEL8-Lab"

# Check Parallels VM details
prlctl list --all
prlctl status "OEL8-Lab"

# Check SSH config
vagrant ssh-config

# Test SSH manually
ssh -vvv -i .vagrant/machines/default/virtualbox/private_key   -p 2222 vagrant@127.0.0.1

# Inside VM — check services
systemctl status mysqld
journalctl -u mysqld -n 50
journalctl -xe