disposable Ubuntu VM for agentic dev
Repo loadkpi/dev-vm, read from GitHub 1 min ago. loadkpi has not joined Take My Repo.
loadkpi/dev-vm is a public repo on GitHub by loadkpi. disposable Ubuntu VM for agentic dev. It declares no license on GitHub. Public does not mean open source: without a license, nobody is granted the right to reuse it. It is written mainly in Shell, has 0 stars and last changed on 2026-09-11. Nobody has reviewed it on Take My Repo yet, which says nothing about its quality. Read from GitHub on 2026-11-22.
In the maintainer's words. Shown from GitHub; Take My Repo does not keep a copy.
One host-side script that brings up a small, headless Ubuntu VM in VirtualBox, preinstalled with Node.js + Claude Code + Codex CLI — a clean sandbox to let agents develop in. Optimized for small disk.
.vdi grows only as you use it
(~3-4 GB real for a typical dev setup), even though the virtual size is 16 GB.VBoxManage)qemu-img — convert the cloud image to VDIcloud-localds, genisoimage, mkisofs, xorriso,
or hdiutil (built into macOS — nothing to install there)# Debian/Ubuntu host sudo apt install qemu-utils cloud-image-utils genisoimage # macOS host brew install qemu # VBoxManage comes with VirtualBox; # the seed ISO is built with built-in hdiutil
./provision-dev-vm.sh
Defaults: 4096 MB RAM, 2 vCPU, 16 GB thin disk, Ubuntu 24.04 (noble),
SSH on host port 2222. Override via env vars:
VM_NAME=agent-box RAM_MB=4096 DISK_GB=12 SSH_PORT=2222 ./provision-dev-vm.sh
| Var | Default | Meaning |
|---|---|---|
VM_NAME |
dev-vm | VirtualBox VM name |
RAM_MB |
4096 | RAM |
CPUS |
2 | vCPUs |
SWAP_GB |
4 | guest swapfile size (0 disables) |
DISK_GB |
16 | virtual disk size (thin; lower = leaner) |
UBUNTU_REL |
noble | Ubuntu release codename |
SSH_PORT |
2222 | host port forwarded to guest :22 |
VM_USER |
dev | login user |
PUBKEY |
auto | SSH public key to authorize |
The script downloads the cloud image, makes a thin VDI, builds a cloud-init
seed (creates the user, authorizes your SSH key, adds a SWAP_GB swapfile,
installs Node + the CLIs), then boots the VM headless.
The swapfile is an elastic buffer: on a small-RAM VM a memory-heavy build
(go build/go test, native modules, big linkers) can spike past physical RAM.
With no swap the kernel drops into direct-reclaim thrashing and the whole VM
appears to freeze (SSH stops responding) rather than failing cleanly — see
Troubleshooting. Swap lets the spike page out: the build gets slow, not fatal.
First boot runs cloud-init (~2-3 min). Then:
ssh -p 2222 dev@127.0.0.1 # key-based; console password is "dev" # inside the VM: claude # Claude Code — run /login once codex # Codex CLI — log in once
VBoxManage controlvm "dev-vm" acpipowerbutton # stop GRACEFULLY (preferred) VBoxManage controlvm "dev-vm" poweroff # hard stop — only if hung VBoxManage startvm "dev-vm" --type headless # start again VBoxManage unregistervm "dev-vm" --delete # destroy + reclaim disk
⚠ Always prefer
acpipowerbutton. A hardpoweroffmid-apt can corrupt the kernel/initrd and leave the VM unbootable at GRUB — see Troubleshooting.
Ran out of space (No space left on device, df shows / at 100%)? The thin
VDI can be enlarged in place — no rebuild. VirtualBox can't resize a disk
while the VM runs (the medium is locked), so it's a stop → resize → start cycle.
# on the HOST — VM must be off first VBoxManage controlvm dev-vm acpipowerbutton # graceful stop (never a bare poweroff) while VBoxManage list runningvms | grep -q dev-vm; do sleep 1; done # wait until stopped VBoxManage modifymedium disk ~/.local/share/dev-vm/dev-vm.vdi \ --resize 32768 # new VIRTUAL size in MB (32768 = 32 GB) VBoxManage startvm dev-vm --type headless
On the next boot cloud-init auto-grows the rootfs (its growpart + resizefs
modules run every boot), so the new space is usable with no extra steps. Verify
inside the guest:
ssh -p 2222 dev@127.0.0.1
df -h / # / should now show the larger sizeIf it didn't grow automatically, expand the partition + filesystem by hand — both are online-safe, no reboot needed:
sudo growpart /dev/sda 1 # /dev/sda = disk, 1 = partition; rootfs is last on # disk (after sda14/15/16), so it grows into the new space sudo resize2fs /dev/sda1 # stretch ext4 to fill the enlarged partition
--resize only grows a thin VDI with no snapshots (both true here); it
can't shrink, and the new size must exceed the current virtual size..vdi grows only as the guest actually writes,
up to the new virtual ceiling.VBoxManage sharedfolder add is a host-side command — run it on the
machine where VirtualBox itself is installed, not inside the guest. It works
whether the VM is powered off or already running; you don't need to reinstall
or recreate the VM.
# on the host VBoxManage sharedfolder add "dev-vm" \ --name shared \ --hostpath "/path/on/host" \ --automount
Inside the guest, mount it via /etc/fstab (one-time setup, already applied
on this VM):
echo "vboxsf" | sudo tee /etc/modules-load.d/vboxsf.conf # load vboxsf on boot sudo mkdir -p /mnt/shared echo "shared /mnt/shared vboxsf defaults,uid=1000,gid=1000 0 0" | sudo tee -a /etc/fstab sudo mount -a
Why /etc/fstab + the bare vboxsf kernel module, instead of relying on
--automount's usual /media/sf_* auto-mount: on this cloud image only the
vboxguest kernel module is present. The vboxsf filesystem module is also
in the kernel tree (no extra package needed — sudo modprobe vboxsf is
enough), but the full Guest Additions userland daemon
(virtualbox-guest-utils, which runs VBoxService and auto-mounts shares
under /media/sf_<name>) is not installed. Pulling it in just for automount
convenience would add several MB and go against this project's disk-frugal
design (see "Why it's disk-frugal" above). An /etc/fstab entry gets the same
result — the share mounted at boot — using only what's already on the image.
If you'd rather have the full automount experience, apt install virtualbox-guest-utils is the alternative; then a bare --automount on the
host is enough and no fstab entry is needed.
Temporary failure resolving 'archive.ubuntu.com'Symptom. The VM boots and SSH works, but cloud-init status --long reports
status: error on package_update_upgrade_install, and
/var/log/cloud-init-output.log is full of
E: Failed to fetch … Temporary failure resolving 'archive.ubuntu.com'.
Node.js and the CLIs are missing because runcmd could not reach
deb.nodesource.com either.
Cause. Two independent host-network facts, both outside the guest:
timedatectl says
System clock synchronized: no even though the NTP service is active.Confirm it — from the host:
ssh -p 2222 dev@127.0.0.1 'curl -sS -m 8 -o /dev/null -w "%{http_code}\n" http://1.1.1.1' # TCP out: 301 = fine ssh -p 2222 dev@127.0.0.1 'dig +short +time=3 @1.1.1.1 archive.ubuntu.com' # UDP DNS: times out ssh -p 2222 dev@127.0.0.1 'dig +tcp +short +time=3 @1.1.1.1 archive.ubuntu.com' # same over TCP: answers
TCP answers while UDP times out ⇒ it's the NAT stack, not the guest.
Fix. Current provision-dev-vm.sh handles both automatically: it sets
--natdnshostresolver1 on on the host side, and its bootcmd prefers IPv4 and
— only if plain resolution is actually broken — switches the guest to
DNS-over-TLS (tcp/853, which survives a UDP-dropping NAT). On a VM built before
that fix, apply it by hand and replay provisioning:
ssh -p 2222 dev@127.0.0.1 sudo mkdir -p /etc/systemd/resolved.conf.d printf '[Resolve]\nDNS=1.1.1.1#cloudflare-dns.com 1.0.0.1#cloudflare-dns.com\nDNSOverTLS=yes\n' \ | sudo tee /etc/systemd/resolved.conf.d/99-dns-over-tls.conf echo 'precedence ::ffff:0:0/96 100' | sudo tee -a /etc/gai.conf echo 'Acquire::ForceIPv4 "true";' | sudo tee /etc/apt/apt.conf.d/99force-ipv4 sudo systemctl restart systemd-resolved getent hosts archive.ubuntu.com && sudo apt-get update # should now work sudo cloud-init clean --logs && sudo reboot # replay provisioning
REMOTE HOST IDENTIFICATION HAS CHANGED! after a rebuildSymptom. ssh -p 2222 dev@127.0.0.1 refuses to connect with a big warning
banner and Offending ED25519 key in ~/.ssh/known_hosts:<N>.
Cause. Not an attack — a rebuilt VM generates a fresh SSH host key, but it
lives at the same [127.0.0.1]:2222 as the old one, so the pinned key no longer
matches.
Verify, then fix. Confirm the offered fingerprint really is the new VM's before trusting it (compare with the key read from inside the guest), then drop the stale entry:
# read the guest's own key over a session that ignores the pinned one, and check # it matches the fingerprint ssh just warned about ssh -p 2222 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no \ dev@127.0.0.1 'ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub' ssh-keygen -R '[127.0.0.1]:2222' # matches? drop it — keeps a known_hosts.old backup
go build, go test, native modules)Symptom. A build kicked off inside the VM makes it go unresponsive: an
existing SSH session stalls, new ssh connects but hangs before the shell,
even ps/find time out. nc -z 127.0.0.1 2222 still succeeds (that's just
VirtualBox's NAT proxy, not the guest).
Cause. Memory exhaustion. This is a small-RAM VM (default 4 GB), and a Go compile/link — especially of a large package, or alongside services like Docker/Postgres/MinIO — can use multiple GB. If swap is absent or too small, the kernel can't page the spike out; it goes into direct-reclaim thrashing and the box freezes instead of the build failing cleanly (often no OOM-kill is logged, which is why it hangs rather than dies).
Confirm it — from the host, look inside (works unless it's fully wedged):
ssh -p 2222 dev@127.0.0.1 'free -h; swapon --show' # available near 0? swap 0B? ssh -p 2222 dev@127.0.0.1 'ps -eo rss,comm --sort=-rss | head' # find the hog
available near zero with Swap: 0B is the signature.
Fix.
SWAP_GB automatically; older ones
may not). On / there's usually room:
sudo fallocate -l 4G /swapfile && sudo chmod 600 /swapfile sudo mkswap /swapfile && sudo swapon /swapfile echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab # persist
VBoxManage controlvm dev-vm acpipowerbutton while VBoxManage list runningvms | grep -q dev-vm; do sleep 1; done VBoxManage modifyvm dev-vm --memory 8192 VBoxManage startvm dev-vm --type headless
go build -p 1 ./...,
go test -p 1 -parallel 1 ./...; don't run Docker/Postgres/MinIO at the same
time if the build doesn't need them.Building on the vboxsf shared folder (
/mnt/shared) compounds this — it's slow for Go's many-small-file I/O, and a share that's near full risks write failures. Keep sources (and the Go cache, which already lives at~/.cache/go-build) on the guest's ext4 root.
paused: host disk full (VD#0: Host disk full)Symptom. The VM stops responding — SSH hangs at "Connection timed out during
banner exchange", ps/find time out — but unlike the memory freeze above the
guest isn't thrashing: it's been suspended by VirtualBox. VBoxManage showvminfo dev-vm reports VMState="paused", and VBox.log has:
VD#0: Host disk full
Changing the VM state from 'RUNNING' to 'SUSPENDING'
Cause. The guest disk is a thin VDI stored on the host filesystem. When
the guest writes new blocks the .vdi must grow on the host — but if the host
disk backing it is full, VirtualBox can't satisfy the write. Rather than corrupt
the image it pauses the VM (VERR_DISK_FULL). This is the safe behaviour:
nothing is lost, no reboot needed. Note the guest's own df can still show free
space — it's the host that ran out, not the guest.
Watch for it because everything the guest writes inflates the VDI on the host:
the SWAP_GB swapfile (a full SWAP_GB GB), the Go build+module caches
(~/.cache/go-build, ~/go/pkg/mod — easily several GB), /tmp build
leftovers, downloaded Go toolchains. A thin VDI only ever grows toward its
virtual ceiling and never shrinks on its own.
Confirm it (host side):
VBoxManage showvminfo dev-vm --machinereadable | grep VMState= # -> "paused" grep -a 'Host disk full' ~/"VirtualBox VMs"/dev-vm/Logs/VBox.log # the smoking gun df -h / # host filesystem full?
Recover — free space on the host, then resume (continues exactly where it left off, no reboot):
# reclaim host space (examples; pick what's safe for you) … docker system prune -af ; rm -rf ~/.cache/* # … then un-pause: VBoxManage controlvm dev-vm resume
Keep it from recurring.
ssh -p 2222 dev@127.0.0.1 'go clean -cache -modcache' ssh -p 2222 dev@127.0.0.1 'find /tmp -maxdepth 1 -name "go-build*" -exec rm -rf {} +'
ssh -p 2222 dev@127.0.0.1 'sudo sh -c "cat /dev/zero > /zero.tmp; sync; rm -f /zero.tmp"' # zero free space VBoxManage controlvm dev-vm acpipowerbutton while VBoxManage list runningvms | grep -q dev-vm; do sleep 1; done VBoxManage modifymedium disk ~/.local/share/dev-vm/dev-vm.vdi --compact VBoxManage startvm dev-vm --type headless
SWAP_GB/DISK_GB if the host disk is tight —
the swapfile alone claims SWAP_GB GB of the VDI.ssh fails right after start: Connection reset / kex_exchange_identification / banner timeoutSymptom. Just after startvm, ssh -p 2222 dev@127.0.0.1 returns
kex_exchange_identification: read: Connection reset by peer (or, later,
Connection timed out during banner exchange). Confusingly, nc -z 127.0.0.1 2222
succeeds — because port 2222 is answered by VirtualBox's NAT proxy on the
host, not by a live sshd in the guest.
Cause. The guest isn't booting. Almost always this is a hard
VBoxManage controlvm poweroff (≈ pulling the power cord) that hit while
cloud-init/apt was touching the kernel, corrupting /boot (kernel/initrd) or
the ext4 journal. GRUB then can't load the kernel:
error: image not loaded.
error: you need to load the kernel first.
A secondary symptom of the same unclean shutdown: Ubuntu's recordfail makes
GRUB wait indefinitely at the menu for a keypress the headless VM can never
receive, so it just hangs. (Both are prevented on freshly-provisioned VMs by
/etc/default/grub.d/99-headless.cfg + graceful shutdown — see below.)
Confirm it. Screenshot the headless console — GRUB errors show up here:
VBoxManage controlvm "dev-vm" screenshotpng /tmp/vm.png && xdg-open /tmp/vm.png
Prevent it. Stop the VM with acpipowerbutton, never a bare poweroff
(see Manage / tear down).
The VM is disposable, so the fix is to rebuild — but first pull anything you
care about off the disk. Mount the VDI read-only on the host (no VirtualBox
needed; the norecovery flag is required because the journal is dirty):
VBoxManage controlvm "dev-vm" poweroff 2>/dev/null # release the disk lock sudo modprobe nbd max_part=8 sudo qemu-nbd -r -c /dev/nbd0 -f vdi ~/.local/share/dev-vm/dev-vm.vdi lsblk -o NAME,SIZE,FSTYPE,LABEL /dev/nbd0 # rootfs = the ext4 'cloudimg-rootfs' sudo mount -o ro,norecovery /dev/nbd0p1 /mnt rsync -aH /mnt/home/dev/ ~/dev-vm-rescue/home-dev/ # grab your work sudo umount /mnt && sudo qemu-nbd -d /dev/nbd0 # detach cleanly
Then rebuild and restore, excluding files the fresh cloud-init owns (its new SSH key, shell rc, npm prefix) so you don't lock yourself out:
VBoxManage unregistervm "dev-vm" --delete ./provision-dev-vm.sh # wait for cloud-init (~2-3 min) ssh-keygen -R "[127.0.0.1]:2222" # drop the old host key rsync -aH -e 'ssh -p 2222' \ --exclude='/.ssh/authorized_keys' \ --exclude='/.bashrc' --exclude='/.bash_logout' --exclude='/.profile' \ --exclude='/.npmrc' --exclude='/.cache' \ ~/dev-vm-rescue/home-dev/ dev@127.0.0.1:/home/dev/
Verify the copy is complete — a dry-run should report nothing left to send:
rsync -aHn --itemize-changes -e 'ssh -p 2222' \ --exclude='/.ssh/authorized_keys' --exclude='/.cache' \ ~/dev-vm-rescue/home-dev/ dev@127.0.0.1:/home/dev/ | grep -v '^\.'
(.npm legitimately ends up larger in the new VM — cloud-init reinstalls the
CLIs into the npm cache. Everything else should match.)
RAM_MB/CPUS if your
agents are heavy.DISK_GB to 12 and skip build-essential in the
packages: list if you don't compile native modules.loadkpi/dev-vm is a public repo on GitHub by loadkpi. disposable Ubuntu VM for agentic dev.
It declares no license on GitHub. Public does not mean open source: without a license, nobody is granted the right to reuse it.
Its maker tagged it for macOS, Windows and Linux, or as Docker or cross-platform. That is declared by the maker; Take My Repo has not tested it.
Open "Take it" on its page: Take My Repo writes an install plan for your machine and hands it to your AI agent (Claude Code, Codex or Cursor), which asks you before each step. Take My Repo has not tested it on any machine.
Its last change on GitHub was on 2026-09-11. GitHub counts 17 open issues and pull requests. Take My Repo does not judge from that whether it is maintained.
Nobody has reviewed it on Take My Repo yet, which says nothing about its quality.
Навык для ИИ-агентов (Claude Code, Codex, Cursor): упрощает русский технический текст по ГОСТ Р 58049—2017 — комментарии в коде, документацию, сообщения об ошибках. Короткие однозначные предложения + линтер на 18 правил. Simplified Technical Russian (STR) skill for AI coding agents — the Russian counterpart of ASD-STE100.
Receive SMS messages to Telegram account through Twilio
Simple Minimum Order Amount plugin for Opencart 2.3/3.0
Google Mobile Friendly Test API wrapper for Ruby
This page is also available as structured data, with the same sources and dates.
/api/v1/resources/gh/loadkpi/dev-vmTake My Repo has not tested this on your machine. Requirements come from the project's own documentation.