Compare commits

..

No commits in common. "master" and "v7.06" have entirely different histories.

8 changed files with 25 additions and 41 deletions

View file

@ -21,7 +21,6 @@ body:
attributes: attributes:
label: Docker compose label: Docker compose
description: The compose file (or otherwise the `docker run` command used). description: The compose file (or otherwise the `docker run` command used).
render: yaml
validations: validations:
required: true required: true
- type: textarea - type: textarea
@ -29,7 +28,6 @@ body:
attributes: attributes:
label: Docker log label: Docker log
description: The logfile of the container (as shown by `docker logs qemu`). description: The logfile of the container (as shown by `docker logs qemu`).
render: shell
validations: validations:
required: true required: true
- type: textarea - type: textarea

View file

@ -23,7 +23,6 @@ body:
attributes: attributes:
label: Docker compose label: Docker compose
description: The compose file (or otherwise the `docker run` command used). description: The compose file (or otherwise the `docker run` command used).
render: yaml
validations: validations:
required: true required: true
- type: textarea - type: textarea
@ -31,7 +30,6 @@ body:
attributes: attributes:
label: Docker log label: Docker log
description: The logfile of the container (as shown by `docker logs qemu`). description: The logfile of the container (as shown by `docker logs qemu`).
render: shell
validations: validations:
required: true required: true
- type: textarea - type: textarea

View file

@ -46,16 +46,16 @@ jobs:
with: with:
context: git context: git
images: | images: |
ghcr.io/${{ github.repository }}
${{ secrets.DOCKERHUB_REPO }} ${{ secrets.DOCKERHUB_REPO }}
ghcr.io/${{ github.repository }}
tags: | tags: |
type=raw,value=latest,priority=100 type=raw,value=latest,priority=100
type=raw,value=${{ vars.MAJOR }}.${{ vars.MINOR }} type=raw,value=${{ vars.MAJOR }}.${{ vars.MINOR }}
labels: | labels: |
org.opencontainers.image.title=${{ vars.NAME }} org.opencontainers.image.title=${{ vars.NAME }}
env: env:
DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- -
@ -112,6 +112,6 @@ jobs:
connection_url: ${{secrets.MAIL_CONNECTION}} connection_url: ${{secrets.MAIL_CONNECTION}}
subject: Build of ${{ github.event.repository.name }} v${{ steps.meta.outputs.version }} completed subject: Build of ${{ github.event.repository.name }} v${{ steps.meta.outputs.version }} completed
body: | body: |
The build job of ${{ github.event.repository.name }} v${{ steps.meta.outputs.version }} was completed successfully! The build job of ${{ github.event.repository.name }} v${{ steps.meta.outputs.version }} was completed successfully!
See https://github.com/${{ github.repository }}/actions for more information. See https://github.com/${{ github.repository }}/actions for more information.

View file

@ -19,7 +19,6 @@ RUN set -eu && \
wget \ wget \
7zip \ 7zip \
curl \ curl \
fdisk \
nginx \ nginx \
procps \ procps \
seabios \ seabios \
@ -34,12 +33,12 @@ RUN set -eu && \
iputils-ping \ iputils-ping \
genisoimage \ genisoimage \
ca-certificates \ ca-certificates \
qemu-system-arm && \ netcat-openbsd \
qemu-system-arm \
qemu-efi-aarch64 && \
apt-get clean && \ apt-get clean && \
mkdir -p /etc/qemu && \ mkdir -p /etc/qemu && \
echo "allow br0" > /etc/qemu/bridge.conf && \ echo "allow br0" > /etc/qemu/bridge.conf && \
wget "https://snapshot.debian.org/archive/debian/20250128T092032Z/pool/main/e/edk2/qemu-efi-aarch64_2024.11-5_all.deb" -O /tmp/aavmf.deb -q --timeout=10 && \
dpkg -i /tmp/aavmf.deb && \
mkdir -p /usr/share/novnc && \ mkdir -p /usr/share/novnc && \
wget "https://github.com/novnc/noVNC/archive/refs/tags/v${VERSION_VNC}.tar.gz" -O /tmp/novnc.tar.gz -q --timeout=10 && \ wget "https://github.com/novnc/noVNC/archive/refs/tags/v${VERSION_VNC}.tar.gz" -O /tmp/novnc.tar.gz -q --timeout=10 && \
tar -xf /tmp/novnc.tar.gz -C /tmp/ && \ tar -xf /tmp/novnc.tar.gz -C /tmp/ && \
@ -60,9 +59,9 @@ COPY --chmod=755 ./src /run/
VOLUME /storage VOLUME /storage
EXPOSE 22 5900 8006 EXPOSE 22 5900 8006
ENV BOOT="alpine"
ENV CPU_CORES="2" ENV CPU_CORES="2"
ENV RAM_SIZE="2G" ENV RAM_SIZE="2G"
ENV DISK_SIZE="16G" ENV DISK_SIZE="16G"
ENV BOOT="http://example.com/image.iso"
ENTRYPOINT ["/usr/bin/tini", "-s", "/run/entry.sh"] ENTRYPOINT ["/usr/bin/tini", "-s", "/run/entry.sh"]

View file

@ -49,7 +49,7 @@ services:
##### Via Docker CLI: ##### Via Docker CLI:
```bash ```bash
docker run -it --rm --name qemu -e "BOOT=alpine" -p 8006:8006 --device=/dev/kvm --device=/dev/net/tun --cap-add NET_ADMIN -v "${PWD:-.}/qemu:/storage" --stop-timeout 120 qemux/qemu-arm docker run -it --rm --name qemu -e "BOOT=alpine" -p 8006:8006 --device=/dev/kvm --device=/dev/net/tun --cap-add NET_ADMIN -v ${PWD:-.}/qemu:/storage --stop-timeout 120 qemux/qemu-arm
``` ```
##### Via Kubernetes: ##### Via Kubernetes:
@ -60,7 +60,7 @@ kubectl apply -f https://raw.githubusercontent.com/qemus/qemu-arm/refs/heads/mas
##### Via Github Codespaces: ##### Via Github Codespaces:
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/qemus/qemu) [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new?repo=626637620&machine=basicLinux32gb)
## FAQ 💬 ## FAQ 💬
@ -301,12 +301,12 @@ kubectl apply -f https://raw.githubusercontent.com/qemus/qemu-arm/refs/heads/mas
### How do I pass-through a disk? ### How do I pass-through a disk?
It is possible to pass-through disk devices or partitions directly by adding them to your compose file in this way: It is possible to pass-through disk devices directly by adding them to your compose file in this way:
```yaml ```yaml
devices: devices:
- /dev/sdb:/disk1 - /dev/sdb:/disk1
- /dev/sdc1:/disk2 - /dev/sdc:/disk2
``` ```
Use `/disk1` if you want it to become your main drive, and use `/disk2` and higher to add them as secondary drives. Use `/disk1` if you want it to become your main drive, and use `/disk2` and higher to add them as secondary drives.

View file

@ -100,11 +100,10 @@ else
fi fi
SM_BIOS="" SM_BIOS=""
PS="/sys/class/dmi/id/product_serial"
if [ -s "$PS" ] && [ -r "$PS" ]; then if [ -s "/sys/class/dmi/id/product_serial" ]; then
BIOS_SERIAL=$(<"$PS") BIOS_SERIAL=$(</sys/class/dmi/id/product_serial)
BIOS_SERIAL="${BIOS_SERIAL//[![:alnum:]]/}" BIOS_SERIAL="${BIOS_SERIAL//[![:alnum:]]/}"
if [ -n "$BIOS_SERIAL" ]; then if [ -n "$BIOS_SERIAL" ]; then

View file

@ -12,6 +12,7 @@ SERIAL_OPTS="-serial $SERIAL"
CPU_OPTS="-cpu $CPU_FLAGS -smp $SMP" CPU_OPTS="-cpu $CPU_FLAGS -smp $SMP"
RAM_OPTS=$(echo "-m ${RAM_SIZE^^}" | sed 's/MB/M/g;s/GB/G/g;s/TB/T/g') RAM_OPTS=$(echo "-m ${RAM_SIZE^^}" | sed 's/MB/M/g;s/GB/G/g;s/TB/T/g')
MON_OPTS="-monitor $MONITOR -name $PROCESS,process=$PROCESS,debug-threads=on" MON_OPTS="-monitor $MONITOR -name $PROCESS,process=$PROCESS,debug-threads=on"
[ -n "$USB" ] && [[ "${USB,,}" != "no"* ]] && USB_OPTS="-device $USB -device usb-kbd -device usb-tablet"
MAC_OPTS="-machine type=${MACHINE},secure=${SECURE},dump-guest-core=off${KVM_OPTS}" MAC_OPTS="-machine type=${MACHINE},secure=${SECURE},dump-guest-core=off${KVM_OPTS}"
[ -n "$UUID" ] && MAC_OPTS+=" -uuid $UUID" [ -n "$UUID" ] && MAC_OPTS+=" -uuid $UUID"
@ -22,15 +23,12 @@ DEV_OPTS+=" -device virtio-rng-pci,rng=objrng0,id=rng0,bus=pcie.0"
if [[ "${BOOT_MODE,,}" != "windows"* ]]; then if [[ "${BOOT_MODE,,}" != "windows"* ]]; then
DEV_OPTS+=" -device virtio-balloon-pci,id=balloon0,bus=pcie.0" DEV_OPTS+=" -device virtio-balloon-pci,id=balloon0,bus=pcie.0"
if [ -d "/shared" ]; then
DEV_OPTS+=" -fsdev local,id=fsdev0,path=/shared,security_model=none"
DEV_OPTS+=" -device virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=shared"
fi
fi fi
if [ -d "/shared" ] && [[ "${BOOT_MODE,,}" != "windows"* ]]; then
DEV_OPTS+=" -fsdev local,id=fsdev0,path=/shared,security_model=none"
DEV_OPTS+=" -device virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=shared"
fi
[ -n "$USB" ] && [[ "${USB,,}" != "no"* ]] && USB_OPTS="-device $USB -device usb-kbd -device usb-tablet"
ARGS="$DEF_OPTS $CPU_OPTS $RAM_OPTS $MAC_OPTS $DISPLAY_OPTS $MON_OPTS $SERIAL_OPTS ${USB_OPTS:-} $NET_OPTS $DISK_OPTS $BOOT_OPTS $DEV_OPTS $ARGUMENTS" ARGS="$DEF_OPTS $CPU_OPTS $RAM_OPTS $MAC_OPTS $DISPLAY_OPTS $MON_OPTS $SERIAL_OPTS ${USB_OPTS:-} $NET_OPTS $DISK_OPTS $BOOT_OPTS $DEV_OPTS $ARGUMENTS"
ARGS=$(echo "$ARGS" | sed 's/\t/ /g' | tr -s ' ') ARGS=$(echo "$ARGS" | sed 's/\t/ /g' | tr -s ' ')

View file

@ -34,10 +34,10 @@ if [[ "$KVM" != [Nn]* ]]; then
KVM_ERR="" KVM_ERR=""
if [ ! -e /dev/kvm ]; then if [ ! -e /dev/kvm ]; then
KVM_ERR="(/dev/kvm is missing)" KVM_ERR="(device file missing)"
else else
if ! sh -c 'echo -n > /dev/kvm' &> /dev/null; then if ! sh -c 'echo -n > /dev/kvm' &> /dev/null; then
KVM_ERR="(/dev/kvm is unwriteable)" KVM_ERR="(no write access)"
fi fi
fi fi
@ -45,17 +45,9 @@ if [[ "$KVM" != [Nn]* ]]; then
KVM="N" KVM="N"
if [[ "$OSTYPE" =~ ^darwin ]]; then if [[ "$OSTYPE" =~ ^darwin ]]; then
warn "you are using macOS which has no KVM support, this will cause a major loss of performance." warn "you are using macOS which has no KVM support, this will cause a major loss of performance."
else else
kernel=$(uname -a) error "KVM acceleration not available $KVM_ERR, this will cause a major loss of performance."
case "${kernel,,}" in error "See the FAQ on how to diagnose the cause, or continue without KVM by setting KVM=N (not recommended)."
*"microsoft"* )
error "Please bind '/dev/kvm' as a volume in the optional container settings when using Docker Desktop." ;;
*"synology"* )
error "Please make sure that Synology VMM (Virtual Machine Manager) is installed and that '/dev/kvm' is binded to this container." ;;
*)
error "KVM acceleration is not available $KVM_ERR, this will cause a major loss of performance."
error "See the FAQ for possible causes, or continue without it by adding KVM: \"N\" (not recommended)." ;;
esac
[[ "$DEBUG" != [Yy1]* ]] && exit 88 [[ "$DEBUG" != [Yy1]* ]] && exit 88
fi fi
fi fi