Draft: This doc has not been tested yet. Instructions may need adjustment.
This doc covers Linux VM setup on an x86 Linux host for isolated development.
For other platforms, see:
- macOS Setup — for macOS VM on Mac host
- Windows x86 Setup — for Windows VM on x86 Windows host
When using AI-assisted tools like Claude Code, it's important to limit the "blast radius" of what the AI can access or modify. A VM provides hard boundaries:
- Containment: The AI can only see/modify files inside the VM — not your host machine, personal files, or other projects
- Scoped credentials: GitHub PATs and API keys are isolated to the VM and scoped to specific repos
- Easy reset: If something goes wrong, you can restore from a snapshot or rebuild the VM from scratch
- Reproducible environment: Every developer starts from the same clean slate
- Peace of mind: You can let the AI operate more freely without worrying about unintended side effects
This isn't about distrust — it's defense in depth. The same reason you don't run untested code as root.
On Apple Silicon, you can run x86 Windows via Parallels (paid license required), but for testing both Linux x86 and Windows x86 without ongoing costs, a dedicated x86 mini PC is simpler.
| Spec | Minimum | Recommended |
|---|---|---|
| CPU | Any modern x86_64 | Ryzen 5 / Intel i5 |
| RAM | 8GB | 16GB+ (for VMs) |
| Storage | 256GB SSD | 512GB+ SSD |
Any mini PC in the $150-350 range with these specs will work fine.
- Download Ubuntu 24.04 Desktop ISO: https://ubuntu.com/download/desktop
- Create bootable USB with Balena Etcher or
dd - Boot from USB, install Ubuntu
# Install QEMU/KVM and virt-manager
sudo apt update
sudo apt install -y qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virt-manager
# Add your user to libvirt group
sudo usermod -aG libvirt $USER
sudo usermod -aG kvm $USER
# Log out and back in for group changes to take effectsudo apt install -y openssh-server
sudo systemctl enable ssh
sudo systemctl start ssh
# Get IP address
ip addr show | grep inetDownload Ubuntu 24.04 Server or Desktop ISO for the guest VM.
- Open virt-manager (Virtual Machine Manager)
- File → New Virtual Machine
- Select "Local install media" → Browse to Ubuntu ISO
- Configure:
- Memory: 4GB minimum (8GB recommended)
- CPUs: 4 cores
- Storage: 64GB minimum
- Name it something like
vibium-dev - Finish and start installation
Standard Ubuntu install. Minimal/Server install is fine.
All commands below are run inside the VM.
Add to ~/.bashrc:
# Increase history
export HISTSIZE=1000000
export SAVEHIST=1000000
export HISTFILE=~/.bash_history# Update system
sudo apt update && sudo apt upgrade -y
# Install essentials
sudo apt install -y git curl wget build-essential openssh-serverwget https://go.dev/dl/go1.23.4.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.23.4.linux-amd64.tar.gz
rm go1.23.4.linux-amd64.tar.gz
echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bashrc
source ~/.bashrc
go versioncurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
source ~/.bashrc
nvm install --lts
node --version
npm --versionsudo apt install -y ripgrep jq
# GitHub CLI
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
sudo apt update
sudo apt install -y gh# Install via npm
npm install -g @anthropic-ai/claude-codegit config --global user.name "Your Name"
git config --global user.email "you@example.com"mkdir -p ~/Projects
cd ~/Projects
git clone https://github.com/VibiumDev/vibium.git
cd vibiumIn a browser:
- GitHub → Settings → Developer settings
- Personal access tokens → Fine-grained tokens
- Generate new token
Token settings:
- Token name:
linux-vm(or whatever identifies this VM) - Expiration: 7 days (or 30 if you prefer)
- Repository access: Only select repositories →
VibiumDev/vibium
Permissions:
- Contents: Read and write
- Everything else: No access
gh auth login
# Follow prompts, paste your PAT when promptedsudo systemctl enable ssh
sudo systemctl start ssh
# Get VM IP
ip addr show | grep inetssh yourusername@<vm-ip>- Install Zed: https://zed.dev or
curl -fsSL https://zed.dev/install.sh | sh - Open Zed
Ctrl+Shift+P→ "remote projects: Open Remote Project"- Enter:
yourusername@<vm-ip> - Navigate to
~/Projects/vibium
cd ~/Projects/vibium/clicker
go build -o bin/clicker ./cmd/clicker
./bin/clicker --version
./bin/clicker paths
./bin/clicker install
./bin/clicker launch-testTake VM snapshots before risky operations:
# On host, with VM shut down
virsh snapshot-create-as vibium-dev clean-slate "Fresh dev setup"
# List snapshots
virsh snapshot-list vibium-dev
# Restore snapshot
virsh snapshot-revert vibium-dev clean-slateOr use virt-manager GUI: right-click VM → Snapshots.