From a030d46efcdb4a5492074e1d165318d4a6f7efb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Molinero=20Fern=C3=A1ndez?= Date: Tue, 2 Nov 2021 19:16:38 +0100 Subject: [PATCH] Enabled KVM by default --- Dockerfile.m4 | 2 +- README.md | 6 +++--- run.sh | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Dockerfile.m4 b/Dockerfile.m4 index 0dea49b..e637632 100644 --- a/Dockerfile.m4 +++ b/Dockerfile.m4 @@ -65,7 +65,7 @@ ENV VM_DISK_SIZE=16G ENV VM_KEYBOARD=en-us ENV VM_NET_OPTIONS=hostfwd=tcp::13389-:3389,hostfwd=tcp::15900-:5900 ENV VM_BOOT_ORDER=cd -ENV VM_KVM=false +ENV VM_KVM=true # Create some directories for QEMU RUN mkdir -p /var/lib/qemu/iso/ /var/lib/qemu/images/ diff --git a/README.md b/README.md index 7b48409..53a8ebd 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@ A Docker image for the [ReactOS](https://www.reactos.org) operating system. ```sh docker run --detach \ --name qemu-reactos \ + --device /dev/kvm \ --publish 127.0.0.1:6080:6080/tcp \ - --env VM_KVM=true --device /dev/kvm \ docker.io/hectormolinero/qemu-reactos:latest ``` @@ -31,8 +31,8 @@ VM keyboard layout (`en-us` by default). VM boot order (`cd` by default). #### `VM_KVM` -Start QEMU in KVM mode (`false` by default). -> The `--device /dev/kvm` option is required to use KVM in the container. +Start QEMU in KVM mode (`true` by default). +> The `--device /dev/kvm` option is required for this variable to take effect. ## License See the [license](LICENSE.md) file. diff --git a/run.sh b/run.sh index f65149f..4e34d31 100755 --- a/run.sh +++ b/run.sh @@ -37,9 +37,9 @@ printf '%s\n' "Creating \"${CONTAINER_NAME:?}\" container..." --hostname "${CONTAINER_NAME:?}" \ --restart on-failure:3 \ --log-opt max-size=32m \ - --publish '127.0.0.1:5900:5900/tcp' \ - --publish '127.0.0.1:6080:6080/tcp' \ - --env VM_KVM=true --device /dev/kvm \ + --device /dev/kvm \ + --publish 127.0.0.1:5900:5900/tcp \ + --publish 127.0.0.1:6080:6080/tcp \ "${IMAGE_NAME:?}" "$@" >/dev/null printf '%s\n\n' 'Done!'