docker-qemu/README.md

37 lines
1.4 KiB
Markdown
Raw Permalink Normal View History

2021-05-30 08:01:35 +00:00
# Dockerized QEMU
Dockerized QEMU image for reproducibly testing stuff on Windows.
Prepare OS image as described below.
2021-05-30 11:03:43 +00:00
Disk image is used as read-only using the QEMU disk snapshot option,
all local changes are lost after Docker container restart.
2021-05-30 08:01:35 +00:00
Specify MAC address via environment variable `MAC`.
For more example see `docker-compose.yml`
2021-05-30 08:13:05 +00:00
You probably need the machines to come up with
fixed IP-s. Use static leases on your DHCP server
to assign the IP addresses to the VM-s.
2021-05-30 08:01:35 +00:00
# Windows template image preparation
Prepare the image using libvirt or similar where you can specify
virtio SCSI controller for storage.
For Windows 10 install also mount
[virtio SCSI and networking drivers ISO](https://github.com/virtio-win/virtio-win-pkg-scripts/blob/master/README.md).
In Windows 10 partitioning wizard provide drivers from that ISO.
Install [OpenSSH server](https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse).
Make sure OpenSSH starts during boot.
Insert Jenkins or your favourite CI/CD software SSH public keys into
`C:\ProgramData\ssh\administrators_authorized_keys` and adjust ACL-s as described
[here](https://www.concurrency.com/blog/may-2019/key-based-authentication-for-openssh-on-windows)
2021-05-30 08:01:35 +00:00
Use the resulting virtual machine disk image with this Docker image.
# Debugging
If you can't ping the VM from host, make sure bridge mode is used
on the macvlanX interface:
```
ip -d link show type macvtap
```