This guide walks you through setting up an air-gapped LLM environment using LM Studio inside a VirtualBox VM running Ubuntu, from scratch.
- VirtualBox
- Ubuntu ISO (22.04 LTS recommended)
- LM Studio AppImage
- A GGUF model from Hugging Face (e.g. Mistral 7B Instruct)
- 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)
- Boot the VM with the Ubuntu ISO mounted
- Install Ubuntu Desktop normally
On the host:
-
Download:
LM Studio.AppImage
- A
.gguf
model (e.g.TheBloke/Mistral-7B-Instruct-v0.1-GGUF/q4_K_M.gguf
)
-
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).
Inside the VM:
chmod +x LM\ Studio.AppImage
./LM\ Studio.AppImage