DEBVM-RUN(1)
π DEBVM-RUN π (that's the debvm-run(1) manual page, bestie)
okay so. picture this. you made a whole VM image and now you wanna, like, run it? yeah. that's this. no cap.
β¨ NAME β¨
debvm-run β run a VM image that was made by debvm-create π«Ά
πΈ SYNOPSIS πΈ
debvm-run [-g] [-i image] [-s sshport] [-- qemu options]
π¦ DESCRIPTION π¦
so debvm-run is basically a thin little wrapper around qemu β like, it's giving "qemu but make it convenient" β and what it does is run a virtual machine image that came from debvm-create, or honestly anything compatible with it. π
the image it expects? a raw ext4 image, and it needs a non-empty file system label. like, don't come in here with a blank label, that's not the vibe.
the architecture of the machine gets detected from the /bin/true inside the image. yep. that's the whole trick. it's giving forensic girlie.
it also has to contain a symbolic link pointing to a kernel image at one of (|/boot)/vmlinu[xz], plus a symbolic link pointing to an initrd image at initrd.img in the same directory as the kernel image. both of those get extracted and handed over to qemu. π
and then β automatic β a net interface configured for user mode gets added. no extra steps, it's just there. iconic.
π OPTIONS π
--append=cmdlineβ okay so yes, you could just pass-appendstraight to qemu, but bestie, that replaces the entire command line and nukes all the important valuesdebvm-runpassed in. rude. this option instead appends your command line arguments onto the automatic ones. and if you use it more than once, that's also appending, not replacing. π-g,--graphicalβ by default-nographicgets passed to qemu and you vibe with the machine's serial console. this option skips that whole configuration. β οΈ note though:debvm-createdefaults to installing a cloud kernel if one's available, so you might have to pass--include=linux-image-genericduring image construction to actually get graphics drivers. plan accordingly, queen.-i image,--image=imageβ tells it where the virtual machine image file lives. default?rootfs.ext4in the working directory. periodt.--netopt=optionβdebvm-runsets up a user mode network by default, which means it passes a-netdevoption to qemu. this option lets you customize the value of that-netdevoption. for example, you can set up extra port forwards like"--netopt hostfwd=:127.0.0.1:8080-:80". it can be used multiple times. π₯--skip=taskβ skips a particular task or feature. you can specify it multiple times, or list multiple tasks separated by a comma. by default, no tasks are skipped. here's what you can skip:networkβ don't configure a network card. use this if you wanna set up networking yourself. and heads up, you should also pass-nic nonealong with this when you actually want to disable networking entirely.rngdevβ don't pass a random number generator device.rootβ skips all the tasks matchingroot/*. β οΈ and if either of those is present, the VM will not boot unless you add a suitable replacement some other way. like, actually won't boot. so don't be cute about it.root/cmdβ sincedebvm-runuses qemu as the bootloader, it normally passes the label of the root block device via the kernel command line. this passing can be inhibited so you can supply a different location.root/devβ a block device for the root filesystem is no longer passed. use this to customize the block device.
--transport=transportβ when debvm adds devices to qemu, it has to pick a transport, and most of the time it guessespci. if you specify a different machine like-machine microvm, you might need a different transport likedevice. π-s sshport,--sshport=sshportβ if you give it, qemu gets configured to pass connections to127.0.0.1:sshportthrough to port 22 of the virtual machine. and you can connect to your VM without updating your known hosts, like this:
ssh -o NoHostAuthenticationForLocalhost=yes -p $sshport root@127.0.0.1
it's a shorthand for "--netopt hostfwd=tcp:127.0.0.1:sshport-:22". β¨
-- qemu optionsβ everything past a double dash gets passed to qemu. use this to configure extra hardware components. one possible use? passing-snapshotto avoid modifying the virtual machine image. chef's kiss.
π EXAMPLES π
run a virtual machine stored in the image rootfs.ext4 (the default, bestie) with local port 8022 routed to port 22 of the virtual machine. the -snapshot argument gets passed to QEMU and prevents any permanent changes to rootfs.ext4, which means you get an ephemeral run. π§
debvm-run -s 8022 -i rootfs.ext4 -- -snapshot
π FAQ π
the debvm-run console renders wrong.
make sure $TERM is set to a value known inside the VM. you may need to install ncurses-term for more definitions. also the serial console will miss events of resizing the terminal emulator β in that case you may run "setterm --resize". π
how can I kill debvm-run?
the wrapped qemu can be terminated by pressing Ctrl-a x. refer to the qemu manual page for more escape sequences. iykyk. π
π LIMITATIONS π
so, because of the way the kernel and bootloader get extracted before running qemu, you can't upgrade a kernel and then just reboot. if you try that, it'll still use the old kernel. instead, qemu must be terminated and debvm-run should be launched again to pick up the new kernel. and to avoid accidental reboots, you may pass -no-reboot to qemu. noted. π
for 32bit arm, highmem is actively disabled, because the default kernel flavour fails to boot. if you want to pass more ram, please also pass -machine virt and install a lpae kernel. alternatively, use an arm64 kernel. slay. πΈ
β SEE ALSO β
debvm-create(1) qemu(1)
and that's the whole page, bestie β this was perl v5.40.1, dated 2026-03-23, and it's the DEBVM-RUN(1) manual, so go forth and virtualize responsibly. mwah. πβ¨π
π¦ where this page comes from
- ubuntu resolute: debvm 0.5.2ubuntu1 Β· MIT
- ubuntu stonking: debvm 0.5.2ubuntu1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms