diff options
author | Helmut Grohne <helmutg@debian.org> | 2022-12-31 06:43:03 +0000 |
---|---|---|
committer | Helmut Grohne <helmutg@debian.org> | 2022-12-31 06:43:03 +0000 |
commit | 947506522176e2b966fa1dc6389fa366322dec12 (patch) | |
tree | 104ffb883d6d277280fac49e168aca98857ff968 /debvm-run | |
parent | c00b63fc4c642bec5be44577771170dc8b2ac5e0 (diff) | |
parent | 293a1fa978c0dff81bdf6f37f89eef22066783c6 (diff) | |
download | debvm-947506522176e2b966fa1dc6389fa366322dec12.tar.gz |
Merge branch 'pod2man' into 'main'
add documentation in pod2man format
Closes #2
See merge request helmutg/debvm!11
Diffstat (limited to 'debvm-run')
-rwxr-xr-x | debvm-run | 60 |
1 files changed, 59 insertions, 1 deletions
@@ -2,9 +2,67 @@ # Copyright 2022 Helmut Grohne <helmut@subdivi.de> # SPDX-License-Identifier: MIT +: <<'POD2MAN' +=head1 NAME + +debvm-run - Run a VM image created by debvm-create + +=head1 SYNOPSIS + +B<debvm-run> [B<-g>] [B<-i> I<image>] [B<-s> I<sshport>] [B<--> I<qemu options>] + +=head1 DESCRIPTION + +B<debvm-run> is essentially a thin wrapper around B<qemu> for running a virtual machine image created by B<debvm-create> or something compatible. +The virtual machine image is expected to be a raw ext4 image with file system label B<debvm>. +The architecture of the machine is detected from the contained B</bin/true>. +It must contain a symbolic link pointing to a kernel image at B</vmlinuz> or B</vmlinux> depending on the architecture and a symbolic link pointing to an initrd image at B</initrd.img>. +Both are extracted and passed to B<qemu>. +A net interface configured for user mode is added automatically. + +=head1 OPTIONS + +=over 8 + +=item B<-g>, B<--graphical> + +By default, the option B<-nographic> is passed to B<qemu> and one interacts with the serial console of the machine. +This configuration is skipped in the presence of this option. + +=item B<-i> I<image>, B<--image>=I<image> + +This option specifies the location of the virtual machine image file. +By default B<rootfs.ext4> in the working directory is used. + +=item B<-s> I<sshport>, B<--sshport>=I<sshport> + +If given, B<qemu> is configured to pass connections to I<127.0.0.1:sshport> to port 22 of the virtual machine. + +=item B<--> I<qemu options> + +All options beyond a double dash are passed to B<qemu>. +This can be used to configure additional hardware components. +One possible use of this method is passing B<-snapshot> to avoid modifying the virtual machine image. + +=back + +=head1 LIMITATIONS + +Due to the way kernel and bootloader are being extracted before running B<qemu>, one cannot upgrade a kernel and then just reboot. +Attempting to do so, will still use the old kernel. +Instead, B<qemu> must be terminated and B<debvm-run> should be launched again to pick up the new kernel. +In order to avoid accidental reboots, one may pass B<-no-reboot> to B<qemu>. + +=head1 SEE ALSO + + debvm-create(1) qemu(1) + +=cut +POD2MAN + set -u -IMAGE=rootfs.ext2 +IMAGE=rootfs.ext4 SSHPORT= GRAPHICAL= |