summaryrefslogtreecommitdiff
path: root/bin
AgeCommit message (Collapse)Author
2024-08-09debvm-run: fix manual pageHelmut Grohne
The --transport option was added in the middle of the --skip documentation. Fixes: d927a5e0cee2 ("debvm-run: add --transport option")
2024-06-23debvm-create: do install loginHelmut Grohne
login has become non-essential and autologin simply respawns indefinitely when login is not installed. We better install it explicitly and that works on all releases. If we are only interested in logging in via ssh (and thus --skip=autologin), no login package is needed.
2024-05-08debvm-create: Increase default VM size to 2GBenjamin Drung
The Ubuntu 24.04 (noble) image is 1.1G in size and an image size of 1 GB does not fit it. ``` $ du -ht 50M / 77M /boot 56M /usr/lib/x86_64-linux-gnu 106M /usr/lib/modules/6.8.0-31-generic/kernel/drivers 147M /usr/lib/modules/6.8.0-31-generic/kernel 154M /usr/lib/modules/6.8.0-31-generic 154M /usr/lib/modules 78M /usr/lib/firmware/mellanox 72M /usr/lib/firmware/mrvl/prestera 78M /usr/lib/firmware/mrvl 59M /usr/lib/firmware/qcom 481M /usr/lib/firmware 721M /usr/lib 780M /usr 86M /var/lib/dpkg 170M /var/lib/apt/lists 170M /var/lib/apt 257M /var/lib 266M /var 1.1G / ``` Increase the default VM size to 2G. LP: #2064921
2024-05-02debvm-create: turn of incompatible ext features for jessieHelmut Grohne
2024-04-10debvm-create: clarify that passing an empty string to -r may be okHelmut Grohne
2024-03-25Merge feature-virtio-bus into mainHelmut Grohne
2024-03-05debvm-run: add --transport optionHelmut Grohne
What was named bus earlier is called transport in qemu and we should name it the same way when exposing it.
2024-03-05debvm-run: refactor bus managementHelmut Grohne
Depending on the machine type, devices reside on different buses. For most vms, we use the pci bus, but m68k uses the virtio ("device") bus. Also if we were to use an x86 microvm, we'd also use virtio. This is common to all devices and we can abstract it into a $BUS.
2024-03-05debvm-run: skip rngdev for sparc64 via opt_skipHelmut Grohne
2024-02-27debvm-create: explain the trap 'exit 1'Helmut Grohne
Reported-by: Johannes Schauer Marin Rodrigues <josch@mister-muffin.de>
2024-02-27debvm-create: emit an empty /devHelmut Grohne
With the change from genext2fs to mkfs.ext4, we no longer create an intermediate tar archive and thus no longer create device nodes if using unshare. Thus our output is slightly unreproducible. At the same time, we never need devices, because /dev is mounted as devtmpfs. Hence, we unconditionally skip them and thus improve reproducibility. Reported-by: Johannes Schauer Marin Rodrigues <josch@mister-muffin.de>
2024-02-27debvm-create: fix --skip ext4Helmut Grohne
We were truncating the output file after generating it. Instead, split the logic and create the file prior to running mmdebstrap to make permission failures fail early.
2024-02-26debvm-create: allow running without unshare againHelmut Grohne
In a CI-environment such as salsa-ci, we tend to run as root and want --mode=root rather than --mode=unshare.
2024-02-26debvm-create: switch from genext2fs to mkfs.ext4Helmut Grohne
Why? genext2fs is slow. It has O(n^2) behaviour, which becomes annoying with larger filesystems. It also creates an ext2 image and we have to upgrade it to ext4 in multiple steps. Even then, the image has an inode size of 128, which is incompatible with 2038 and does not allow storing sub-second precision time stamps. How? We use mkfs.ext4 from e2fsprogs (which is required anyway) instead. Running this from within a --customize-hook does not work, because the user namespace used for the hook often has no privileges to write to the output image. Instead, we now ask mmdebstrap to output to a directory and create the filesystem separately. We construct a special namespace that has both access to the tree and to the output image and perform the mkfs.ext4 there. As a consequence, we no longer support any mode but unshare and since mkfs.ext4 consumes the size parameter, the size syntax is reduced a bit.
2024-01-09debvm-run: use -cpu max for kvmHelmut Grohne
When kvm works, passing "max" will get us "host" as before. When it does not, "host" doesn't work at all, but "max" will somewhat. Suggested-by: Michael Tokarev <mjt@tls.msk.ru>
2024-01-09disable highmem for 32bit arm by defaultHelmut Grohne
Since recent qemu, a non-lpae kernel cannot boot a highmem-enabled virtual machine. A typical failure is: pci-host-generic 4010000000.pcie: can't claim ECAM area [mem 0x10000000-0x1fffffff]: address conflict with pcie@10000000 [mem 0x10000000-0x3efeffff] Since the default kernel image is non-lpae, we disable highmem by default. Link: https://lists.nongnu.org/archive/html/qemu-devel/2024-01/msg01444.html Thanks: Michael Tokarev <mjt@tls.msk.ru>
2024-01-07debvm-run.1: more details on disabling networkHelmut Grohne
Reported-by: Johannes Schauer Marin Rodrigues <josch@mister-muffin.de>
2023-09-24bin/debvm-waitssh: make --timeout=N workJohannes Schauer Marin Rodrigues
2023-07-04bin/debvm-run: commas in the image filename must be escapedJohannes Schauer Marin Rodrigues
2023-06-24bin/debvm-run: allow being run in environments without TERM setJohannes Schauer Marin Rodrigues
2023-06-22Merge run-skip into mainHelmut Grohne
2023-06-22debvm-run: restore behaviour of repeated --sshport flagsHelmut Grohne
When issuing multiple --sshport options, the last one should win. Fixes: a2db07766257 ("debvm-run: add a --netopt option to customize the -netdev")
2023-06-22Merge run-netopt into mainHelmut Grohne
2023-06-22Merge qemu-append into mainHelmut Grohne
2023-06-22debvm-run: expand the rootdev skipHelmut Grohne
2023-06-21debvm-run: add a --netopt option to customize the -netdevHelmut Grohne
2023-06-20debvm-run: add a --skip optionHelmut Grohne
As with debvm-create, this option allows skipping default configuration to let a user override things in their way. Link: https://bugs.debian.org/1036918
2023-06-20debvm-run: fix local emulation of set -exHelmut Grohne
Should be using stderr. Fixes: 7d0b160531d6 ("debvm-run: replace shell process with qemu process")
2023-06-19debvm-run: match on DEB_HOTS_ARCH_CPU rather than DEB_HOST_ARCHHelmut Grohne
This way we loose unnecessary detail such as libc, kernel and abi. For one thing this simplifies the arm* match. For another, this makes us stop think about arm64ilp32 or x32.
2023-06-19debvm-run: make shellcheck happyHelmut Grohne
Fixes: 1c98a5b3b36f ("bin/debvm-run: qemu (>> 1:8.0) provides symlinks for qemu-system-${debarch} as well as qemu-system-any")
2023-06-19bin/debvm-run: qemu (>> 1:8.0) provides symlinks for qemu-system-${debarch} ↵Johannes Schauer Marin Rodrigues
as well as qemu-system-any
2023-06-19debvm-run: avoid hard coding fds for kernel and initrdHelmut Grohne
qemu makes heavy use of fd passing, so we better avoid user-passed fds.
2023-06-19debvm-run: replace shell process with qemu processHelmut Grohne
We need the intermediate shell process to clean the temporary files with the kernel and the initrd - unless we delete them before running qemu. This method should help with killing a qemu e.g. using a timeout.
2023-06-09the argument to setterm is --resize, not -resizeHelmut Grohne
2023-06-07debvm-run: add an --append optionHelmut Grohne
Unlike qemu's -append, it has append semantics both to repeated use and to internal defaults.
2023-04-27debvm-create: recognize finit as an init systemHelmut Grohne
2023-03-30debvm-run: do not apply pauth-impdef=on to arm32Helmut Grohne
I really should have tested this part, but CI did. Fixes: 954ba600ffb7 ("debvm-run: massively speed up tcg emulation of arm cpus")
2023-03-29debvm-run: massively speed up tcg emulation of arm cpusHelmut Grohne
pauth emulation is very intensive on the CPU and thus there is a non-cryptographic alternative that provides a speedup of 3 to 4. https://qemu-project.gitlab.io/qemu/system/arm/cpu-features.html#tcg-vcpu-features Suggested-by: Arnd Bergmann <arnd@arndb.de> Reported-by: Emanuele Rocca <ema@debian.org> Tested-by: Emanuele Rocca <ema@debian.org> Closes: #1033643
2023-03-19debvm-waitssh: improve comment about character rangesHelmut Grohne
Reported-by: Jakub Wilk <jwilk@debian.org>
2023-03-11debvm-run: --graphical should not require an argumentHelmut Grohne
2023-03-06debvm-create: autodetect size of serial consolesHelmut Grohne
We now extend /etc/profile to invoke setterm -resize when detecting an interactive login on a serial console. This should fix 90% of wrongly sized serial consoles.
2023-03-06debvm-create: deprecate and hide the -a optionHelmut Grohne
At this point, we only forward -a to mmdebstrap. It's not actually that helpful to have this option on both levels, so just keep it on the mmdebstrap level.
2023-03-06support a mips64el kernel in a mipsel image via multiarchHelmut Grohne
Reported-by: Fabian Gruenbichler
2023-03-05debvm-create: extend examples in the manual pageHelmut Grohne
2023-03-05debvm-run: always use virtio input devices for graphical modeHelmut Grohne
These clearly benefit the amd64 case as well. Experience with the virtio gpu is not as clear cut as it may crash qemu.
2023-03-02debvm-run: be more explicit about graphics and cloud kernelsHelmut Grohne
Reported-by: Arnd Bergmann <arnd@arndb.de>
2023-03-02debvm-run: improve graphical experience on !x86Arnd Bergmann
2023-02-23debvm-create: also support --initsystem=busyboxHelmut Grohne
Reported-by: Johannes Schauer Marin Rodrigues <josch@debian.org>
2023-02-23debvm-create: also support --initsystem=runitHelmut Grohne
2023-02-23debvm-create: do not fsckHelmut Grohne
Asking for a fsck pass in fstab is not what we want. Requiring fsck makes sysvinit fail when fsck.ext4 is missing. Without that pass, it happily boots without e2fsprogs. Link: https://bugs.debian.org/1028267 Thanks: Thorsten Glaster <t.glaser@tarent.de>