Vagrant Cheat Sheet — OEL 8 Quick Reference
Complete Vagrant command and configuration reference for OEL 8 with VirtualBox and Parallels. Bookmark this page for fast access to commands you need daily.
VM Lifecycle
BASH — Lifecycle
vagrant up # Start VM
vagrant up --provider=virtualbox # Start with VirtualBox
vagrant up --provider=parallels # Start with Parallels
vagrant up --no-parallel # Start sequentially
vagrant halt # Stop gracefully
vagrant halt --force # Force stop
vagrant reload # Restart
vagrant reload --provision # Restart + re-provision
vagrant destroy # Delete VM
vagrant destroy --force # Delete without prompt
vagrant status # VM status
vagrant global-status --prune # All VMs on machine
SSH
BASH — SSH
vagrant ssh # SSH into VM
vagrant ssh machinename # SSH into named machine
vagrant ssh -c "sudo systemctl status mysqld" # Run command
vagrant ssh-config # Show SSH config
Box Commands
BASH — Boxes
vagrant box list # List boxes
vagrant box add generic/oracle8 # Add from Vagrant Cloud
vagrant box add mybox /path/to.box # Add local box (VirtualBox)
vagrant box add metadata.json # Add via metadata (Parallels!)
vagrant box remove mybox # Remove box
vagrant box update # Update all boxes
vagrant box outdated # Check for updates
vagrant box prune # Remove old versions
Snapshots
BASH — Snapshots
vagrant snapshot save NAME # Save named snapshot
vagrant snapshot save VM NAME # Save for specific machine
vagrant snapshot restore NAME # Restore snapshot
vagrant snapshot list # List snapshots
vagrant snapshot delete NAME # Delete snapshot
vagrant snapshot push # Push to stack
vagrant snapshot pop # Pop from stack
Plugins
BASH — Plugins
vagrant plugin list # List installed plugins
vagrant plugin install vagrant-parallels # Parallels provider
vagrant plugin install vagrant-vbguest # VirtualBox Guest Additions
vagrant plugin install vagrant-disksize # Disk resize
vagrant plugin update # Update all plugins
vagrant plugin uninstall NAME # Remove plugin
Essential Vagrantfile Snippets
Ruby — Vagrantfile Snippets
# OEL 8 base
config.vm.box = "generic/oracle8"
config.vm.hostname = "oel8-lab"
# Networks
config.vm.network "private_network", ip: "192.168.56.10"
config.vm.network "forwarded_port", guest: 3306, host: 13306
# VirtualBox provider
config.vm.provider "virtualbox" do |vb|
vb.name = "OEL8-Lab"
vb.memory = 4096
vb.cpus = 2
end
# Parallels provider
config.vm.provider "parallels" do |prl|
prl.name = "OEL8-Lab"
prl.memory = 4096
prl.cpus = 2
prl.update_guest_tools = false
end
# Shell provisioner
config.vm.provision "shell", inline: "dnf install -y mysql-community-server"
config.vm.provision "shell", path: "scripts/setup.sh"
config.vm.provision "shell", run: "always", inline: "echo VM ready"
# Synced folder
config.vm.synced_folder "./sql", "/home/vagrant/sql"
Parallels Box Packaging
BASH — Parallels Box Packaging
# CORRECT way to package Parallels VM as Vagrant box:
# 1. Create metadata.json (inside box)
echo "{\"provider\": \"parallels\"}" > metadata.json
# 2. Create Vagrantfile (inside box)
echo "Vagrant.configure('2') do |c|; end" > Vagrantfile
# 3. Package with .pvm folder
tar -czf myoel8.box metadata.json Vagrantfile OEL8-Base.pvm/
# 4. Create box-metadata.json (outside box, for vagrant box add)
cat > box-meta.json << EOF
{
"name": "oraclelinux8-parallels",
"versions": [{"version":"1.0.0","providers":[{"name":"parallels","url":"file:///path/to/myoel8.box"}]}]
}
EOF
# 5. Add to Vagrant
vagrant box add box-meta.json
# NEVER do this for Parallels:
# vagrant box add name file.box ← fails!
Page Index
| # | Page | Topic |
|---|---|---|
| 1 | Introduction | What is Vagrant, architecture, concepts |
| 2 | Install — VirtualBox | macOS, Windows, OEL/RHEL 8 |
| 3 | Install — Parallels | macOS, plugin, provider config |
| 4 | CLI Commands | Complete command reference |
| 5 | Vagrantfile | Full config deep dive |
| 6 | OEL 8 Box Setup | Public boxes, custom box build |
| 7 | First VM — VirtualBox | Step-by-step first VM |
| 8 | Networking | NAT, private, public, multi-network |
| 9 | Synced Folders | VirtualBox, NFS, rsync |
| 10 | Multi-Machine | Multiple VMs, database cluster setup |
| 11 | Shell Provisioning | MySQL install scripts |
| 12 | Ansible Provisioning | Playbooks, inventory, multi-machine |
| 13 | Snapshots | Named, push/pop, database workflows |
| 14 | Resource Tuning | CPU, RAM, disk, network performance |
| 15 | First VM — Parallels | macOS Parallels step-by-step |
| 16 | Parallels Box Packaging | CORRECT way to package .pvm as .box |
| 17 | Parallels Networking | Port forward, private, public networks |
| 18 | Parallels Multi-Machine | Full lab with Parallels |
| 19 | Parallels Synced Folders | Parallels Tools shared folders |
| 20 | Parallels Snapshots | Snapshots, prlctl commands |
| 21 | MySQL 8 Lab | Complete MySQL 8 on OEL 8 |
| 22 | Replication Lab | Master + 2 Replicas automated |
| 23 | ProxySQL Full Stack | ProxySQL + MySQL Master + Replicas |
| 24 | Troubleshooting | Common issues and fixes |
| 25 | Cheat Sheet | This page — complete reference |