Skip to content

Practice Moodle in VirtualBox

Complete Step-by-Step Guide to Run Moodle Preconfigured Virtual Machine

This guide lets you run a ready-made Moodle instance using either VirtualBox (Windows/Linux/macOS Intel/AMD)** or (macOS Apple Silicon M1/M2/M3). It includes automated setup scripts that start the virtual machine and open Moodle automatically at:

http://moodle:9000

⚙️ Part 1 — For Intel Users (Windows) VirtualBox

1. Download Required Files

📦 From Google Drive:

Make sure both files are saved in the same folder (e.g., Downloads\Moodle_VM).


2. Install VirtualBox

  1. Visit https://www.virtualbox.org.
  2. Download and install VirtualBox (default settings are fine).

3. Prepare Windows System

Before running the script, temporarily disable security features that may block VM imports or local web services.

🛡️ Disable Windows Defender Protections

  1. Open Windows Security → Virus & threat protection.
  2. Click Manage settings.
  3. Turn OFF:

  4. Real-time protection

  5. Dev Drive protection
  6. If you use third-party antivirus (e.g., Avast, McAfee), pause real-time protection temporarily.

image

⚠️ Re-enable protections once Moodle setup is complete.


4. Run the Setup Script

  1. Right-click the downloaded .bat file → Run as Administrator.
  2. The script will automatically:

  3. Add the 127.0.0.1 moodle entry to your Windows hosts file

  4. Import the .ova file automatically into VirtualBox
  5. Start the Moodle virtual machine
  6. Wait until the web server is ready
  7. Launch Moodle in your browser at: 👉 http://moodle:9000

5. Login to Moodle

  • Username: moodle
  • Password: Mdl@1234

6. Troubleshooting (Windows)

🔹 “VBoxManage.exe not found”

Check your PATH variable:

  1. Open System Properties → Advanced → Environment Variables.
  2. In System Variables, find Path.
  3. Click Edit → New → add:

C:\Program Files\Oracle\VirtualBox\ 4. Click OK, then rerun the bat file.

🔹 Network Access

Ensure your VirtualBox network adapter is set to NAT (default). If Moodle doesn’t load, restart the VM.


⚙️ Part 2 — For Intel Users (Mac) VirtualBox

1. Download Required Files

📦 From Google Drive:

Save both files in the same folder (e.g., Downloads/Moodle_VM).


2. Install VirtualBox

  1. Visit https://www.virtualbox.org.
  2. Download and install VirtualBox for macOS Intel.
  3. After installation:

  4. Open System Settings → Privacy & Security

  5. If macOS blocks VirtualBox, click Allow

3. Run the .sh File to Start VM and Browser

  1. Open Terminal.
  2. Drag the .sh file into the Terminal window.
  3. Press Enter.

The script will automatically:

  • Import the OVA file
  • Start the Virtual Machine
  • Launch Moodle in your default browser at: 👉 http://moodle:9000

💡 If you see “permission denied”, run:

bash chmod +x autopart-moodle.sh

and retry.


4. Access Moodle

Open your browser (if not already open) and visit: 👉 http://moodle:9000

Login Details

  • Username: moodle
  • Password: Mdl@1234

⚙️ Part 3 — Setup Guide for Mac (Apple Silicon / Silver Processor)

1. Download Required Files

📦 From Google Drive:

Save both files in the same folder (e.g., Downloads/Moodle_VM).


2. Install VirtualBox

Download and install the Apple Silicon (ARM64) Apple Silicon hosts: 👉 https://www.virtualbox.org/wiki/

After installation:

  • Open System Settings → Privacy & Security
  • If macOS blocks VirtualBox, click Allow

3. Run the .sh File to Start VM and Browser

  1. Open Terminal
  2. Drag the .sh file into the Terminal window
  3. Press Enter

The script will automatically:

  • Import the OVA file
  • Start the Virtual Machine
  • Launch your browser at 👉 http://moodle:9000

💡 If you see “permission denied”, run:

bash chmod +x autopart-moodle.sh

and retry.


4. Access Moodle

Once the VM is running:

  • Open your browser (if not already open)
  • Visit http://moodle:9000
  • Username: moodle
  • Password: Mdl@1234

⚙️ Troubleshooting

Issue Possible Fix
Browser doesn’t open Manually visit http://moodle:9000
VM won’t start Ensure VirtualBox is installed correctly
Path error (Windows) Check System Path variables
macOS blocks file Go to System Settings → Privacy & Security → Allow
“Permission denied” in Terminal Run chmod +x autopart-moodle.sh and retry
Moodle doesn’t load Restart the VM or check network adapter (use NAT)