From ebf8917c9791659df8c995993484a21be922f2e1 Mon Sep 17 00:00:00 2001 From: Johannes Schauer Marin Rodrigues Date: Sat, 7 Jan 2023 16:22:28 +0100 Subject: debvm-run: add an example (I always forget about the -snapshot option) --- debvm-run | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'debvm-run') diff --git a/debvm-run b/debvm-run index 9b64ef4..eda3477 100755 --- a/debvm-run +++ b/debvm-run @@ -49,6 +49,15 @@ 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 B (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 +B, resulting in an ephemeral run. + + debvm-run -s 8022 -i rootfs.ext4 -- -snapshot + =head1 LIMITATIONS Due to the way kernel and bootloader are being extracted before running B, one cannot upgrade a kernel and then just reboot. -- cgit v1.2.3 From fcc6be9ec9d98321c7c987d9d8277c149f2bc1f4 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Sat, 7 Jan 2023 21:38:35 +0100 Subject: use more perlpod formatting codes --- debvm-create | 10 +++++----- debvm-run | 14 +++++++------- 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'debvm-run') diff --git a/debvm-create b/debvm-create index 58094cc..c6f4b5c 100755 --- a/debvm-create +++ b/debvm-create @@ -11,7 +11,7 @@ debvm-create - Create a VM image for various Debian releases and architectures =head1 SYNOPSIS -B [B<-a> I] [B<-h> I] [B<-k> I] [B<-m> I] [B<-o> I] [B<-p> I] [B<-r> I] [B<-z> I] [B<--> I] +B [B<-a> I] [B<-h> I] [B<-k> F] [B<-m> I] [B<-o> F] [B<-p> I] [B<-r> I] [B<-z> I] [B<--> I] =head1 DESCRIPTION @@ -37,7 +37,7 @@ A suitable kernel image is automatically selected and installed into the image. Set the hostname of the virtual machine. By default, the hostname is B. -=item B<-k> I, B<--sshkey>=I +=item B<-k> F, B<--sshkey>=F Install the given ssh public key file into the virtual machine image for the root user. This option also causes the ssh server to be installed. @@ -47,12 +47,12 @@ To connect to the vm, pass a port number to B with the B<-s> option. =item B<-m> I, B<--mirror>=I Specify the Debian mirror to be used for downloading packages and to be configured inside the virtual machine image. -By default, B is being used. +By default, L is being used. -=item B<-o> I, B<--output>=I +=item B<-o> F, B<--output>=F Specify the file name of the resulting virtual machine image. -By default, it is written to B. +By default, it is written to F. =item B<-p> I, B<--package>=I diff --git a/debvm-run b/debvm-run index eda3477..c2a3f21 100755 --- a/debvm-run +++ b/debvm-run @@ -9,14 +9,14 @@ debvm-run - Run a VM image created by debvm-create =head1 SYNOPSIS -B [B<-g>] [B<-i> I] [B<-s> I] [B<--> I] +B [B<-g>] [B<-i> F] [B<-s> I] [B<--> I] =head1 DESCRIPTION B is essentially a thin wrapper around B for running a virtual machine image created by B or something compatible. The virtual machine image is expected to be a raw ext4 image with file system label B. -The architecture of the machine is detected from the contained B. -It must contain a symbolic link pointing to a kernel image at B or B depending on the architecture and a symbolic link pointing to an initrd image at B. +The architecture of the machine is detected from the contained F. +It must contain a symbolic link pointing to a kernel image at F or F depending on the architecture and a symbolic link pointing to an initrd image at F. Both are extracted and passed to B. 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 and one interacts with the serial console of the machine. This configuration is skipped in the presence of this option. -=item B<-i> I, B<--image>=I +=item B<-i> F, B<--image>=F This option specifies the location of the virtual machine image file. -By default B in the working directory is used. +By default F in the working directory is used. =item B<-s> I, B<--sshport>=I @@ -51,10 +51,10 @@ One possible use of this method is passing B<-snapshot> to avoid modifying the v =head1 EXAMPLES -Run a virtual machine stored in the image B (the default) with +Run a virtual machine stored in the image F (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 -B, resulting in an ephemeral run. +F, resulting in an ephemeral run. debvm-run -s 8022 -i rootfs.ext4 -- -snapshot -- cgit v1.2.3 From b161406981c2c9fb72cf5da3108a2c36906c2c01 Mon Sep 17 00:00:00 2001 From: Jochen Sprickerhof Date: Sun, 8 Jan 2023 14:49:21 +0100 Subject: Add FAQ to debvm-run --- debvm-run | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'debvm-run') diff --git a/debvm-run b/debvm-run index c2a3f21..4a4d5ff 100755 --- a/debvm-run +++ b/debvm-run @@ -58,6 +58,23 @@ F, 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 from an other terminal and run C in the console or use ssh. +Another option is to run C, which is available from the B package. +Also set C<$TERM> to the outside value. + +=item How can I kill debvm-run? + +The wrapped B can be terminated by pressing Ctrl-a x. +Refer to the B manual page for more escape sequences. + +=back + =head1 LIMITATIONS Due to the way kernel and bootloader are being extracted before running B, one cannot upgrade a kernel and then just reboot. -- cgit v1.2.3 From e7c2288400ee78c3ef8c7a92128287c1eff67811 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Wed, 11 Jan 2023 19:51:18 +0100 Subject: debvm-run: fix typo in error path --- debvm-run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debvm-run') diff --git a/debvm-run b/debvm-run index 4a4d5ff..6f48089 100755 --- a/debvm-run +++ b/debvm-run @@ -149,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" -- cgit v1.2.3