2024-06-21 09:54:37 +00:00
|
|
|
# Debian vm auto setup with preseed
|
2023-12-19 23:37:02 +00:00
|
|
|
|
2024-06-21 09:54:37 +00:00
|
|
|
Install a debian headless virtual-machine from scratch with netboot in a QEMU environment.
|
2023-12-19 23:37:02 +00:00
|
|
|
|
2024-06-21 09:54:37 +00:00
|
|
|
## Requirements
|
2023-12-19 23:37:02 +00:00
|
|
|
|
|
|
|
- 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
|
|
|
|
```
|
|
|
|
|
|
|
|
## 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/
|