Explore different ways to setup a debian VM
Find a file
2023-12-20 00:50:24 +01:00
files_to_serve fix: setup workspace with args 2023-12-20 00:50:24 +01:00
.gitignore initial commit 2023-12-19 13:28:22 +01:00
debian_install_config_default fix: lock version of netboot and cwd of http server 2023-12-19 23:37:59 +01:00
install_machine.sh fix: lock version of netboot and cwd of http server 2023-12-19 23:37:59 +01:00
README.md docs: add README 2023-12-20 00:37:02 +01:00
run_usernet.sh docs: add README 2023-12-20 00:37:02 +01:00
setup_workspace.sh fix: setup workspace with args 2023-12-20 00:50:24 +01:00

Debian vm auto setup

Install a debian headless virtual-machine from scratch with netboot in a QEMU environment

requirements

  • QEMU + KVM
  • tmux
  • bash
  • python3 (for http server)
  • telnet or netcat (to transmit logs)

Getting started

./setup_workspace.sh
cd machines/machine01.local/
./install_machine.sh

then on a client, connect to ssh via the port forwarding (in user mode network)

ssh -o StrictHostKeyChecking=no -p 42022 root@localhost

troubleshooting

kill qemu: pkill -f qemu-system-x86_64

TODO

  • find a better way to kill qemu

preseed file

Change this line to add initial packages.

d-i pkgsel/include string binfmt-support debian-keyring openssh-server qemu-user-static

inspiration

https://sigmaris.info/blog/2019/04/automating-debian-install-qemu/