diff options
Diffstat (limited to 'debvm-run')
-rwxr-xr-x | debvm-run | 38 |
1 files changed, 32 insertions, 6 deletions
@@ -9,14 +9,14 @@ 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>] +B<debvm-run> [B<-g>] [B<-i> F<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>. +The architecture of the machine is detected from the contained F</bin/true>. +It must contain a symbolic link pointing to a kernel image at F</vmlinuz> or F</vmlinux> depending on the architecture and a symbolic link pointing to an initrd image at F</initrd.img>. Both are extracted and passed to B<qemu>. A net interface configured for user mode is added automatically. @@ -29,10 +29,10 @@ A net interface configured for user mode is added automatically. 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> +=item B<-i> F<image>, B<--image>=F<image> This option specifies the location of the virtual machine image file. -By default B<rootfs.ext4> in the working directory is used. +By default F<rootfs.ext4> in the working directory is used. =item B<-s> I<sshport>, B<--sshport>=I<sshport> @@ -49,6 +49,32 @@ One possible use of this method is passing B<-snapshot> to avoid modifying the v =back +=head1 EXAMPLES + +Run a virtual machine stored in the image F<rootfs.ext4> (the default) with +local port 8022 routed to port 22 of the virtual machine. The B<-snapshot> +argument is passed to QEMU and prevents any permanent changes to +F<rootfs.ext4>, resulting in an ephemeral run. + + debvm-run -s 8022 -i rootfs.ext4 -- -snapshot + +=head1 FAQ + +=over 8 + +=item The debvm-run console renders wrong. + +Get C<echo $LINES $COLUMNS> from an other terminal and run C<stty rows $LINES cols $COLUMNS> in the console or use ssh. +Another option is to run C<eval $(resize)>, which is available from the B<xterm> package. +Also set C<$TERM> to the outside value. + +=item How can I kill debvm-run? + +The wrapped B<qemu> can be terminated by pressing Ctrl-a x. +Refer to the B<qemu> manual page for more escape sequences. + +=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. @@ -123,7 +149,7 @@ while getopts :gi:s:-: OPTCHAR; do usage_error "missing argument for -$OPTARG" ;; '?') - usage_erro "unrecognized option -$OPTARG" + usage_error "unrecognized option -$OPTARG" ;; *) die "internal error while parsing command options, please report a bug" |