Skip to content

Instantly share code, notes, and snippets.

@thataustin
Created July 22, 2025 18:18
Show Gist options
  • Save thataustin/3be41606470642e9a6473460b1f1389d to your computer and use it in GitHub Desktop.
Save thataustin/3be41606470642e9a6473460b1f1389d to your computer and use it in GitHub Desktop.
Run a Local LLM in a VirtualBox VM using LM Studio (Ubuntu Guest, Windows Host)

🧠 Run a Local LLM in a VirtualBox VM using LM Studio (Ubuntu Guest, Windows Host)

This guide walks you through setting up an air-gapped LLM environment using LM Studio inside a VirtualBox VM running Ubuntu, from scratch.


πŸ“¦ Prerequisites

On your Windows Host:


🧰 Step-by-Step Setup

1. Create the Virtual Machine

  • Open VirtualBox β†’ New
  • OS Type: Linux, Version: Ubuntu (64-bit)
  • Memory: 8GB+ (recommended)
  • Disk: 30GB+ dynamically allocated
  • Before booting, go to Settings β†’ Network and disable all network adapters (to air-gap it)

2. Install Ubuntu

  • Boot the VM with the Ubuntu ISO mounted
  • Install Ubuntu Desktop normally

πŸ“ 3. Transfer Files into the VM

On the host:

  1. Download:

    • LM Studio.AppImage
    • A .gguf model (e.g. TheBloke/Mistral-7B-Instruct-v0.1-GGUF/q4_K_M.gguf)
  2. In VirtualBox VM Settings:

    • Devices β†’ Drag and Drop β†’ Bidirectional
    • Drag the .AppImage and .gguf into the Ubuntu VM’s Desktop

πŸ’‘ Tip: Alternatively, use a VirtualBox shared folder (disable afterward for strict isolation).


πŸš€ 4. Run LM Studio in Ubuntu VM

Inside the VM:

chmod +x LM\ Studio.AppImage
./LM\ Studio.AppImage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment