From c2167985357b5d89c51aedb9df8461a83dc83333 Mon Sep 17 00:00:00 2001
From: Jochen Sprickerhof <git@jochen.sprickerhof.de>
Date: Tue, 17 Jan 2023 21:11:53 +0100
Subject: Add better Qemu options

---
 bin/debvm-run | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

(limited to 'bin/debvm-run')

diff --git a/bin/debvm-run b/bin/debvm-run
index 3c3e528..22e3571 100755
--- a/bin/debvm-run
+++ b/bin/debvm-run
@@ -233,6 +233,9 @@ if test "$ARCHITECTURE" = "$VMARCH"; then
 else
 	QEMU="qemu-system-$VMARCH"
 	case "$VMARCH" in
+		amd64)
+			QEMU=qemu-system-x86_64
+		;;
 		arm64)
 			QEMU=qemu-system-aarch64
 			set -- -machine virt -cpu max "$@"
@@ -266,6 +269,11 @@ else
 		;;
 	esac
 fi
+case "$VMARCH" in
+	amd64)
+		set -- -machine q35 "$@"
+	;;
+esac
 if test -z "$MAX_SMP" || test "$MAX_SMP" -gt 1; then
 	NPROC=$(nproc)
 	test -n "$MAX_SMP" && test "$NPROC" -gt "$MAX_SMP" && NPROC=$MAX_SMP
@@ -282,6 +290,12 @@ if test -z "$GRAPHICAL"; then
 	if test -t 0 && test -t 1 && test -n "$TERM"; then
 		KERNEL_CMDLINE="$KERNEL_CMDLINE TERM=$TERM"
 	fi
+else
+	case "$VMARCH" in
+		amd64|i386)
+			set -- -vga virtio "$@"
+		;;
+	esac
 fi
 
 if test -n "$SSHPORT"; then
-- 
cgit v1.2.3


From 7ee975583c52ace472b5fced23178e006f8a8700 Mon Sep 17 00:00:00 2001
From: Jochen Sprickerhof <git@jochen.sprickerhof.de>
Date: Tue, 17 Jan 2023 21:19:25 +0100
Subject: Update FAQ about console renderings

---
 bin/debvm-run | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'bin/debvm-run')

diff --git a/bin/debvm-run b/bin/debvm-run
index 22e3571..0ef8740 100755
--- a/bin/debvm-run
+++ b/bin/debvm-run
@@ -64,9 +64,9 @@ F<rootfs.ext4>, resulting in an ephemeral run.
 
 =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.
+Make sure C<$TERM> is set to a value known inside the VM.
+You may need to install B<ncurses-term> for more definitions.
+It also helps to run C<setterm --resize> after boot and when resizing the terminal emulator.
 
 =item How can I kill debvm-run?
 
-- 
cgit v1.2.3