Skip to main content

Clone your workstation environment to an isolated VM with selective apps, paths and services

Project description

CloneBox ๐Ÿ“ฆ

img.png

โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘     ____  _                    ____                   โ•‘
โ•‘    / ___|| |  ___   _ __   ___|  _ \  ___ __  __      โ•‘
โ•‘   | |    | | / _ \ | '_ \ / _ \ |_) |/ _ \\ \/ /      โ•‘
โ•‘   | |___ | || (_) || | | |  __/  _ <| (_) |>  <       โ•‘
โ•‘    \____||_| \___/ |_| |_|\___|_| \_\\___//_/\_\      โ•‘
โ•‘                                                       โ•‘
โ•‘      Clone your workstation to an isolated VM         โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

Clone your workstation environment to an isolated VM with selective apps, paths and services.

CloneBox lets you create isolated virtual machines with only the applications, directories and services you need - using bind mounts instead of full disk cloning. Perfect for development, testing, or creating reproducible environments.

Features

  • ๐ŸŽฏ Selective cloning - Choose exactly which paths, services and apps to include
  • ๐Ÿ” Auto-detection - Automatically detects running services, applications, and project directories
  • ๐Ÿ”— Bind mounts - Share directories with the VM without copying data
  • โ˜๏ธ Cloud-init - Automatic package installation and service setup
  • ๐Ÿ–ฅ๏ธ GUI support - SPICE graphics with virt-viewer integration
  • โšก Fast creation - No full disk cloning, VMs are ready in seconds
  • ๐Ÿ“ฅ Auto-download - Automatically downloads and caches Ubuntu cloud images (stored in ~/Downloads)
  • ๐Ÿ“Š Health monitoring - Built-in health checks for packages, services, and mounts
  • ๐Ÿ”„ VM migration - Export/import VMs with data between workstations
  • ๐Ÿงช Configuration testing - Validate VM settings and functionality
  • ๐Ÿ“ App data sync - Include browser profiles, IDE settings, and app configs

CloneBox to narzฤ™dzie CLI do szybkiego klonowania aktualnego ล›rodowiska workstation do izolowanej maszyny wirtualnej (VM). Zamiast peล‚nego kopiowania dysku, uลผywa bind mounts (udostฤ™pnianie katalogรณw na ลผywo) i cloud-init do selektywnego przeniesienia tylko potrzebnych elementรณw: uruchomionych usล‚ug (Docker, PostgreSQL, nginx), aplikacji, ล›cieลผek projektรณw i konfiguracji. Automatycznie pobiera obrazy Ubuntu, instaluje pakiety i uruchamia VM z SPICE GUI. Idealne dla deweloperรณw na Linuxie โ€“ VM powstaje w minuty, bez duplikowania danych.

Kluczowe komendy:

  • clonebox โ€“ interaktywny wizard (detect + create + start)
  • clonebox detect โ€“ skanuje usล‚ugi/apps/ล›cieลผki
  • clonebox clone . --user --run โ€“ szybki klon bieลผฤ…cego katalogu z uลผytkownikiem i autostartem

Dlaczego wirtualne klony workstation majฤ… sens?

Problem: Developerzy/Vibecoderzy nie izolujฤ… ล›rodowisk dev/test (np. dla AI agentรณw), bo rฤ™czne odtwarzanie setupu to bรณl โ€“ godziny na instalacjฤ™ apps, usล‚ug, configรณw, dotfiles. Przechodzenie z fizycznego PC na VM wymagaล‚oby peล‚nego rebuilda, co blokuje workflow.

Rozwiฤ…zanie CloneBox: Automatycznie skanuje i klonuje stan "tu i teraz" (usล‚ugi z ps, dockery z docker ps, projekty z git/.env). VM dziedziczy ล›rodowisko bez kopiowania caล‚ego ล›mietnika โ€“ tylko wybrane bind mounty.

Korzyล›ci w twoim kontekล›cie (embedded/distributed systems, AI automation):

  • Sandbox dla eksperymentรณw: Testuj AI agenty, edge computing (RPi/ESP32 symulacje) czy Camel/ERP integracje w izolacji, bez psucia hosta.
  • Reprodukcja workstation: Na firmowym PC masz setup z domu (Python/Rust/Go envs, Docker compose, Postgres dev DB) โ€“ klonujesz i pracujesz identycznie.
  • Szybkoล›ฤ‡ > dotfiles: Dotfiles odtwarzajฤ… configi, ale nie ล‚apiฤ… runtime stanu (uruchomione serwery, otwarte projekty). CloneBox to "snapshot na sterydach".
  • Bezpieczeล„stwo/cost-optymalizacja: Izolacja od plikรณw hosta (tylko mounts), zero downtime, tanie w zasobach (libvirt/QEMU). Dla SME: szybki onboarding dev env bez migracji fizycznej.
  • AI-friendly: Agenci LLMs (jak te z twoich hobby) mogฤ… dziaล‚aฤ‡ w VM z peล‚nym kontekstem, bez ryzyka "zasmiecania" main PC.

Przykล‚ad: Masz uruchomiony Kubernetes Podman z twoim home labem + projekt automotive leasing. clonebox clone ~/projects --run โ†’ VM gotowa w 30s, z tymi samymi serwisami, ale izolowana. Lepsze niลผ Docker (brak GUI/full OS) czy peล‚na migracja.

Dlaczego ludzie tego nie robiฤ…? Brak automatyzacji โ€“ nikt nie chce rฤ™cznie rebuildowaฤ‡.

  • CloneBox rozwiฤ…zuje to jednym poleceniem. Super match dla twoich interesรณw (distributed infra, AI tools, business automation).

Installation

Quick Setup (Recommended)

Run the setup script to automatically install dependencies and configure the environment:

# Clone the repository
git clone https://github.com/wronai/clonebox.git
cd clonebox

# Run the setup script
./setup.sh

The setup script will:

  • Install all required packages (QEMU, libvirt, Python, etc.)
  • Add your user to the necessary groups
  • Configure libvirt networks
  • Install clonebox in development mode

Manual Installation

Prerequisites

# Install libvirt and QEMU/KVM
sudo apt install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virt-manager virt-viewer

# Enable and start libvirtd
sudo systemctl enable --now libvirtd

# Add user to libvirt group
sudo usermod -aG libvirt $USER
newgrp libvirt

# Install genisoimage for cloud-init
sudo apt install genisoimage

Install CloneBox

# From source
git clone https://github.com/wronai/clonebox.git
cd clonebox
pip install -e .

# Or directly
pip install clonebox

lub

# Aktywuj venv
source .venv/bin/activate

# Interaktywny tryb (wizard)
clonebox

# Lub poszczegรณlne komendy
clonebox detect              # Pokaลผ wykryte usล‚ugi/apps/ล›cieลผki
clonebox list                # Lista VM
clonebox create --config ... # Utwรณrz VM z JSON config
clonebox start <name>        # Uruchom VM
clonebox stop <name>         # Zatrzymaj VM
clonebox delete <name>       # Usuล„ VM

Quick Start

Interactive Mode (Recommended)

Simply run clonebox to start the interactive wizard:

clonebox
clonebox clone . --user --run --replace --base-image ~/ubuntu-22.04-cloud.qcow2

The wizard will:

  1. Detect running services (Docker, PostgreSQL, nginx, etc.)
  2. Detect running applications and their working directories
  3. Detect project directories and config files
  4. Let you select what to include in the VM
  5. Create and optionally start the VM

Command Line

# Create VM with specific config
clonebox create --name my-dev-vm --config '{
  "paths": {
    "/home/user/projects": "/mnt/projects",
    "/home/user/.config": "/mnt/config"
  },
  "packages": ["python3", "nodejs", "docker.io"],
  "services": ["docker"]
}' --ram 4096 --vcpus 4 --start

# List VMs
clonebox list

# Start/Stop VM
clonebox start my-dev-vm
clonebox stop my-dev-vm

# Delete VM
clonebox delete my-dev-vm

# Detect system state (useful for scripting)
clonebox detect --json

Usage Examples

Basic Workflow

# 1. Clone current directory with auto-detection
clonebox clone . --user

# 2. Review generated config
cat .clonebox.yaml

# 3. Create and start VM
clonebox start . --user --viewer

# 4. Check VM status
clonebox status . --user

# 5. Open VM window later
clonebox open . --user

# 6. Stop VM when done
clonebox stop . --user

Development Environment with Browser Profiles

# Clone with app data (browser profiles, IDE settings)
clonebox clone . --user --run

# VM will have:
# - All your project directories
# - Browser profiles (Chrome, Firefox) with bookmarks and passwords
# - IDE settings (PyCharm, VSCode)
# - Docker containers and services

# Access in VM:
ls ~/.config/google-chrome  # Chrome profile
ls ~/.mozilla/firefox       # Firefox profile
ls ~/.config/JetBrains      # PyCharm settings

Testing VM Configuration

# Quick test - basic checks
clonebox test . --user --quick

# Full test with verbose output
clonebox test . --user --verbose

# Test output shows:
# โœ… VM is defined in libvirt
# โœ… VM is running
# โœ… VM has network access (IP: 192.168.122.89)
# โœ… Cloud-init completed
# โœ… All mount points accessible
# โœ… Health check triggered

VM Health Monitoring

# Check overall status
clonebox status . --user

# Output:
# ๐Ÿ“Š Checking VM status: clone-clonebox
# โœ… VM State: running
# โœ… VM has network access
# โ˜๏ธ Cloud-init: Still running (packages installing)
# ๐Ÿฅ Health Check Status... โณ Health check not yet run

# Trigger health check
clonebox status . --user --health

# View detailed health report in VM:
# cat /var/log/clonebox-health.log

Export/Import Workflow

# On workstation A - Export VM with all data
clonebox export . --user --include-data -o my-dev-env.tar.gz

# Transfer file to workstation B, then import
clonebox import my-dev-env.tar.gz --user

# Start VM on new workstation
clonebox start . --user
clonebox open . --user

# VM includes:
# - Complete disk image
# - All browser profiles and settings
# - Project files
# - Docker images and containers

Troubleshooting Common Issues

# If mounts are empty after reboot:
clonebox status . --user  # Check VM status
# Then in VM:
sudo mount -a              # Remount all fstab entries

# If browser profiles don't sync:
rm .clonebox.yaml
clonebox clone . --user --run --replace

# If GUI doesn't open:
clonebox open . --user     # Easiest way
# or:
virt-viewer --connect qemu:///session clone-clonebox

# Check VM details:
clonebox list              # List all VMs
virsh --connect qemu:///session dominfo clone-clonebox

Legacy Examples (Manual Config)

These examples use the older create command with manual JSON config. For most users, the clone command with auto-detection is easier.

Python Development Environment

clonebox create --name python-dev --config '{
  "paths": {
    "/home/user/my-python-project": "/workspace",
    "/home/user/.pyenv": "/root/.pyenv"
  },
  "packages": ["python3", "python3-pip", "python3-venv", "build-essential"],
  "services": []
}' --ram 2048 --start

Docker Development

clonebox create --name docker-dev --config '{
  "paths": {
    "/home/user/docker-projects": "/projects",
    "/var/run/docker.sock": "/var/run/docker.sock"
  },
  "packages": ["docker.io", "docker-compose"],
  "services": ["docker"]
}' --ram 4096 --start

Full Stack (Node.js + PostgreSQL)

clonebox create --name fullstack --config '{
  "paths": {
    "/home/user/my-app": "/app",
    "/home/user/pgdata": "/var/lib/postgresql/data"
  },
  "packages": ["nodejs", "npm", "postgresql"],
  "services": ["postgresql"]
}' --ram 4096 --vcpus 4 --start

Inside the VM

After the VM boots, shared directories are automatically mounted via fstab entries. You can check their status:

# Check mount status
mount | grep 9p

# View health check report
cat /var/log/clonebox-health.log

# Re-run health check manually
clonebox-health

# Check cloud-init status
sudo cloud-init status

# Manual mount (if needed)
sudo mkdir -p /mnt/projects
sudo mount -t 9p -o trans=virtio,version=9p2000.L,nofail mount0 /mnt/projects

Health Check System

CloneBox includes automated health checks that verify:

  • Package installation (apt/snap)
  • Service status
  • Mount points accessibility
  • GUI readiness

Health check logs are saved to /var/log/clonebox-health.log with a summary in /var/log/clonebox-health-status.

Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                     HOST SYSTEM                        โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚ /home/user/  โ”‚  โ”‚  /var/www/   โ”‚  โ”‚   Docker     โ”‚  โ”‚
โ”‚  โ”‚  projects/   โ”‚  โ”‚    html/     โ”‚  โ”‚   Socket     โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ”‚         โ”‚                 โ”‚                 โ”‚          โ”‚
โ”‚         โ”‚    9p/virtio    โ”‚                 โ”‚          โ”‚
โ”‚         โ”‚   bind mounts   โ”‚                 โ”‚          โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚               CloneBox VM                        โ”‚  โ”‚
โ”‚  โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”‚  โ”‚
โ”‚  โ”‚  โ”‚ /mnt/proj  โ”‚ โ”‚ /mnt/www   โ”‚ โ”‚ /var/run/  โ”‚    โ”‚  โ”‚
โ”‚  โ”‚  โ”‚            โ”‚ โ”‚            โ”‚ โ”‚ docker.sockโ”‚    โ”‚  โ”‚
โ”‚  โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ”‚  โ”‚
โ”‚  โ”‚                                                  โ”‚  โ”‚
โ”‚  โ”‚  cloud-init installed packages & services        โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Quick Clone (Recommended)

The fastest way to clone your current working directory:

# Clone current directory - generates .clonebox.yaml and asks to create VM
# Base OS image is automatically downloaded to ~/Downloads on first run
clonebox clone .

# Clone specific path
clonebox clone ~/projects/my-app

# Clone with custom name and auto-start
clonebox clone ~/projects/my-app --name my-dev-vm --run

# Clone and edit config before creating
clonebox clone . --edit

# Replace existing VM (stops, deletes, and recreates)
clonebox clone . --replace

# Use custom base image instead of auto-download
clonebox clone . --base-image ~/ubuntu-22.04-cloud.qcow2

# User session mode (no root required)
clonebox clone . --user

Later, start the VM from any directory with .clonebox.yaml:

# Start VM from config in current directory
clonebox start .

# Start VM from specific path
clonebox start ~/projects/my-app

Export YAML Config

# Export detected state as YAML (with deduplication)
clonebox detect --yaml --dedupe

# Save to file
clonebox detect --yaml --dedupe -o my-config.yaml

Base Images

CloneBox automatically downloads a bootable Ubuntu cloud image on first run:

# Auto-download (default) - downloads Ubuntu 22.04 to ~/Downloads on first run
clonebox clone .

# Use custom base image
clonebox clone . --base-image ~/my-custom-image.qcow2

# Manual download (optional - clonebox does this automatically)
wget -O ~/Downloads/clonebox-ubuntu-jammy-amd64.qcow2 \
  https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img

Base image behavior:

  • If no --base-image is specified, Ubuntu 22.04 cloud image is auto-downloaded
  • Downloaded images are cached in ~/Downloads/clonebox-ubuntu-jammy-amd64.qcow2
  • Subsequent VMs reuse the cached image (no re-download)
  • Each VM gets its own disk using the base image as a backing file (copy-on-write)

VM Login Credentials

VM credentials are managed through .env file for security:

Setup:

  1. Copy .env.example to .env:

    cp .env.example .env
    
  2. Edit .env and set your password:

    # .env file
    VM_PASSWORD=your_secure_password
    VM_USERNAME=ubuntu
    
  3. The .clonebox.yaml file references the password from .env:

    vm:
      username: ubuntu
      password: ${VM_PASSWORD}  # Loaded from .env
    

Default credentials (if .env not configured):

  • Username: ubuntu
  • Password: ubuntu

Security notes:

  • .env is automatically gitignored (never committed)
  • Username is stored in YAML (not sensitive)
  • Password is stored in .env (sensitive, not committed)
  • Change password after first login: passwd
  • User has passwordless sudo access

User Session & Networking

CloneBox supports creating VMs in user session (no root required) with automatic network fallback:

# Create VM in user session (uses ~/.local/share/libvirt/images)
clonebox clone . --user

# Explicitly use user-mode networking (slirp) - works without libvirt network
clonebox clone . --user --network user

# Force libvirt default network (may fail in user session)
clonebox clone . --network default

# Auto mode (default): tries libvirt network, falls back to user-mode if unavailable
clonebox clone . --network auto

Network modes:

  • auto (default): Uses libvirt default network if available, otherwise falls back to user-mode (slirp)
  • default: Forces use of libvirt default network
  • user: Uses user-mode networking (slirp) - no bridge setup required

Commands Reference

Command Description
clonebox Interactive VM creation wizard
clonebox clone <path> Generate .clonebox.yaml from path + running processes
clonebox clone . --run Clone and immediately start VM
clonebox clone . --edit Clone, edit config, then create
clonebox clone . --replace Replace existing VM (stop, delete, recreate)
clonebox clone . --user Clone in user session (no root)
clonebox clone . --base-image <path> Use custom base image
clonebox clone . --network user Use user-mode networking (slirp)
clonebox clone . --network auto Auto-detect network mode (default)
clonebox start . Start VM from .clonebox.yaml in current dir
clonebox start . --viewer Start VM and open GUI window
clonebox start <name> Start existing VM by name
clonebox stop <name> Stop a VM (graceful shutdown)
clonebox stop -f <name> Force stop a VM
clonebox delete <name> Delete VM and storage
clonebox list List all VMs
clonebox detect Show detected services/apps/paths
clonebox detect --yaml Output as YAML config
clonebox detect --yaml --dedupe YAML with duplicates removed
clonebox detect --json Output as JSON
clonebox status . --user Check VM health, cloud-init status, and IP address
clonebox test . --user Test VM configuration and validate all settings
clonebox export . --user Export VM for migration to another workstation
clonebox export . --user --include-data Export VM with browser profiles and configs
clonebox import archive.tar.gz --user Import VM from export archive
clonebox open . --user Open GUI viewer for VM (same as virt-viewer)
virt-viewer --connect qemu:///session <vm> Open GUI for running VM
virsh --connect qemu:///session console <vm> Open text console (Ctrl+] to exit)

Requirements

  • Linux with KVM support (/dev/kvm)
  • libvirt daemon running
  • Python 3.8+
  • User in libvirt group

Troubleshooting

Network Issues

If you encounter "Network not found" or "network 'default' is not active" errors:

# Option 1: Use user-mode networking (no setup required)
clonebox clone . --user --network user

# Option 2: Run the network fix script
./fix-network.sh

# Or manually fix:
virsh --connect qemu:///session net-destroy default 2>/dev/null
virsh --connect qemu:///session net-undefine default 2>/dev/null
virsh --connect qemu:///session net-define /tmp/default-network.xml
virsh --connect qemu:///session net-start default

Permission Issues

If you get permission errors:

# Ensure user is in libvirt and kvm groups
sudo usermod -aG libvirt $USER
sudo usermod -aG kvm $USER

# Log out and log back in for groups to take effect

VM Already Exists

If you get "VM already exists" error:

# Option 1: Use --replace flag to automatically replace it
clonebox clone . --replace

# Option 2: Delete manually first
clonebox delete <vm-name>

# Option 3: Use virsh directly
virsh --connect qemu:///session destroy <vm-name>
virsh --connect qemu:///session undefine <vm-name>

# Option 4: Start the existing VM instead
clonebox start <vm-name>

virt-viewer not found

If GUI doesn't open:

# Install virt-viewer
sudo apt install virt-viewer

# Then connect manually
virt-viewer --connect qemu:///session <vm-name>

Browser Profiles Not Syncing

If browser profiles or app data aren't available:

  1. Regenerate config with app data:

    rm .clonebox.yaml
    clonebox clone . --user --run --replace
    
  2. Check mount permissions in VM:

    # Verify mounts are accessible
    ls -la ~/.config/google-chrome
    ls -la ~/.mozilla/firefox
    

Mount Points Empty After Reboot

If shared directories appear empty after VM restart:

  1. Check fstab entries:

    cat /etc/fstab | grep 9p
    
  2. Mount manually:

    sudo mount -a
    
  3. Verify access mode:

    • VMs created with accessmode="mapped" allow any user to access mounts
    • Older VMs used accessmode="passthrough" which preserves host UIDs

Advanced Usage

VM Migration Between Workstations

Export your complete VM environment:

# Export VM with all data
clonebox export . --user --include-data -o my-dev-env.tar.gz

# Transfer to new workstation, then import
clonebox import my-dev-env.tar.gz --user
clonebox start . --user

Testing VM Configuration

Validate your VM setup:

# Quick test (basic checks)
clonebox test . --user --quick

# Full test (includes health checks)
clonebox test . --user --verbose

Monitoring VM Health

Check VM status from workstation:

# Check VM state, IP, cloud-init, and health
clonebox status . --user

# Trigger health check in VM
clonebox status . --user --health

Reopening VM Window

If you close the VM window, you can reopen it:

# Open GUI viewer (easiest)
clonebox open . --user

# Start VM and open GUI (if VM is stopped)
clonebox start . --user --viewer

# Open GUI for running VM
virt-viewer --connect qemu:///session clone-clonebox

# List VMs to get the correct name
clonebox list

# Text console (no GUI)
virsh --connect qemu:///session console clone-clonebox
# Press Ctrl + ] to exit console

License

MIT License - see LICENSE file.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clonebox-0.1.10.tar.gz (56.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clonebox-0.1.10-py3-none-any.whl (45.1 kB view details)

Uploaded Python 3

File details

Details for the file clonebox-0.1.10.tar.gz.

File metadata

  • Download URL: clonebox-0.1.10.tar.gz
  • Upload date:
  • Size: 56.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for clonebox-0.1.10.tar.gz
Algorithm Hash digest
SHA256 9cc37bfdf40fde2872328f2feb2bf87a483ab016e5f3374fa25493958943176b
MD5 06147bf7933b33b844010e8dc1aca6eb
BLAKE2b-256 83948df7f1a194006ea7e0aaa28a5cdb1c63413e8f27c54bee99426f030cc60b

See more details on using hashes here.

File details

Details for the file clonebox-0.1.10-py3-none-any.whl.

File metadata

  • Download URL: clonebox-0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 45.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for clonebox-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 6366b20fb099c44a413e64bba5e71f4fd4671b10fee99254d6e0e821cef6dc80
MD5 84a799b6cc75e9bd4dce29513d797f8d
BLAKE2b-256 e412f8f2e53cd04d9114292b40c3b81a4b2892fa604bfc9b12d364c97d9ad8b4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page