Compare commits
13 commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
9546b11150 | ||
![]() |
ffc4bb39c2 | ||
![]() |
41da658176 | ||
![]() |
caa7bc311d | ||
![]() |
72738ce2a3 | ||
![]() |
d5cb0b8c71 | ||
![]() |
038c4c6e14 | ||
![]() |
f89cb831c4 | ||
![]() |
a100af1fc5 | ||
![]() |
56cb411a23 | ||
![]() |
7622677489 | ||
![]() |
18dee3c07d | ||
![]() |
105db123af |
7 changed files with 37 additions and 22 deletions
2
.github/ISSUE_TEMPLATE/1-issue.yml
vendored
2
.github/ISSUE_TEMPLATE/1-issue.yml
vendored
|
@ -21,6 +21,7 @@ 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
|
||||||
|
@ -28,6 +29,7 @@ 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
|
||||||
|
|
2
.github/ISSUE_TEMPLATE/3-bug.yml
vendored
2
.github/ISSUE_TEMPLATE/3-bug.yml
vendored
|
@ -23,6 +23,7 @@ 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
|
||||||
|
@ -30,6 +31,7 @@ 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
|
||||||
|
|
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
|
@ -46,16 +46,16 @@ jobs:
|
||||||
with:
|
with:
|
||||||
context: git
|
context: git
|
||||||
images: |
|
images: |
|
||||||
${{ secrets.DOCKERHUB_REPO }}
|
|
||||||
ghcr.io/${{ github.repository }}
|
ghcr.io/${{ github.repository }}
|
||||||
|
${{ secrets.DOCKERHUB_REPO }}
|
||||||
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.
|
||||||
|
|
|
@ -19,6 +19,7 @@ RUN set -eu && \
|
||||||
wget \
|
wget \
|
||||||
7zip \
|
7zip \
|
||||||
curl \
|
curl \
|
||||||
|
fdisk \
|
||||||
nginx \
|
nginx \
|
||||||
procps \
|
procps \
|
||||||
seabios \
|
seabios \
|
||||||
|
@ -33,12 +34,12 @@ RUN set -eu && \
|
||||||
iputils-ping \
|
iputils-ping \
|
||||||
genisoimage \
|
genisoimage \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
netcat-openbsd \
|
qemu-system-arm && \
|
||||||
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/ && \
|
||||||
|
@ -59,9 +60,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"]
|
||||||
|
|
|
@ -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:
|
||||||
|
@ -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 directly by adding them to your compose file in this way:
|
It is possible to pass-through disk devices or partitions directly by adding them to your compose file in this way:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
devices:
|
devices:
|
||||||
- /dev/sdb:/disk1
|
- /dev/sdb:/disk1
|
||||||
- /dev/sdc:/disk2
|
- /dev/sdc1:/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.
|
||||||
|
|
|
@ -12,7 +12,6 @@ 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"
|
||||||
|
@ -23,12 +22,15 @@ 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 ' ')
|
||||||
|
|
||||||
|
|
18
src/proc.sh
18
src/proc.sh
|
@ -34,10 +34,10 @@ if [[ "$KVM" != [Nn]* ]]; then
|
||||||
KVM_ERR=""
|
KVM_ERR=""
|
||||||
|
|
||||||
if [ ! -e /dev/kvm ]; then
|
if [ ! -e /dev/kvm ]; then
|
||||||
KVM_ERR="(device file missing)"
|
KVM_ERR="(/dev/kvm is 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="(no write access)"
|
KVM_ERR="(/dev/kvm is unwriteable)"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -45,9 +45,17 @@ 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
|
||||||
error "KVM acceleration not available $KVM_ERR, this will cause a major loss of performance."
|
kernel=$(uname -a)
|
||||||
error "See the FAQ on how to diagnose the cause, or continue without KVM by setting KVM=N (not recommended)."
|
case "${kernel,,}" in
|
||||||
|
*"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
|
||||||
|
|
Loading…
Reference in a new issue