Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qnap - Container Station #154

Closed
dzinks opened this issue Feb 6, 2024 · 9 comments
Closed

Qnap - Container Station #154

dzinks opened this issue Feb 6, 2024 · 9 comments

Comments

@dzinks
Copy link

dzinks commented Feb 6, 2024

Hi

I'm having problems installing on Qnap in Container Station
Qnap TS-855X

container-logs

❯ Downloading Windows XP...
/storage/tmp/en_win 100%[===================>] 589.14M 18.8MB/s in 32s
❯ Extracting downloaded ISO image...
❯ Building Windows XP image...
❯ Creating a 64G growable disk image in raw format...
Warning: Extension CHECKSUM revision 0 not supported, missing kernel module?
iptables: No chain/target/match by that name.
❯ Booting Windows using QEMU emulator version 8.2.0 ...
❯ ERROR: qemu-system-x86_64: eVMCS version range [1..1] is not supported by kernel (supported: [0..0])
qemu-system-x86_64: kvm_init_vcpu: kvm_arch_init_vcpu failed (0): Operation not supported
❯ Starting Windows for Docker v1.20...
❯ For support visit https://github.com/dockur/windows

pls help
br Pawel

@kroese
Copy link
Contributor

kroese commented Feb 6, 2024

It looks like it has something to do with your CPU (Intel Atom). I enable Hyper-V extensions for faster acceleration, but that CPU is missing some instruction set for Hyper-V eVMCS (nested virtualization) it seems.

Maybe it is a bug in QEMU that thinks that all Intel CPUs have support for this feature, but this Intel Atom has not. Can you try if you add this variable to your compose file:

environment:
  CPU_FLAGS: "-hv-evmcs"

If it fixes the problem? Otherwise I will make a flag for you to disable all Hyper-V Enlightments in a new version.

@dzinks
Copy link
Author

dzinks commented Feb 7, 2024

Once added, the behavior is the same

@kroese
Copy link
Contributor

kroese commented Feb 7, 2024

Okay, I now added a flag to disable all Hyper-V features, that should fix your issue. Please re-pull the latest image and add this to your compose file:

environment:
  HV: "N"

@dzinks
Copy link
Author

dzinks commented Feb 7, 2024

Your action solved the problem.

Windows installs correctly on Qnap ContainerStation

Thank you for your help

@kroese kroese closed this as completed Feb 7, 2024
@televisi
Copy link

televisi commented Mar 2, 2024

@kroese I have a similar issue with QNAP TVS-671, which uses Dual-Core (4 threads) Intel i3-4150 3.5 GHz with 16GB Memory

docker-compose I used:

version: "3"
services:
  windows:
    image: dockurr/windows
    container_name: windows11
    environment:
      - "VERSION: win11"
      - "RAM_SIZE: 1G"
      - "CPU_CORES: 1"
      - "DISK_SIZE: 100G"
      - "HV: N"
      - "CPU_FLAGS: -hv-evmcs"
    devices:
      - /dev/kvm
    cap_add:
      - NET_ADMIN
    ports:
      - 8006:8006
      - 13389:3389/tcp
      - 13389:3389/udp
    stop_grace_period: 2m
    restart: on-failure
    volumes:
      - /share/Container-Data/windows11:/storage

Error logs:

Warning: Extension CHECKSUM revision 0 not supported, missing kernel module?
iptables: No chain/target/match by that name.
❯ Booting Windows using QEMU emulator version 8.2.1 ...
❯ ERROR: qemu-system-x86_64: eVMCS version range [1..1] is not supported by kernel (supported: [0..0])
qemu-system-x86_64: kvm_init_vcpu: kvm_arch_init_vcpu failed (0): Operation not supported
❯ Starting Windows for Docker v2.04...
❯ For support visit https://github.com/dockur/windows

What do you think would be the problem here?

Thanks

@kroese
Copy link
Contributor

kroese commented Mar 2, 2024

@televisi It looks like your environment flags are formatted wrongly.

Instead of:

    environment:
      - "VERSION: win11"
      - "RAM_SIZE: 1G"
      - "CPU_CORES: 1"
      - "DISK_SIZE: 100G"
      - "HV: N"
      - "CPU_FLAGS: -hv-evmcs"

Try this

    environment:
      - VERSION: "win11"
      - RAM_SIZE: "1G"
      - CPU_CORES: "1"
      - DISK_SIZE: "100G"
      - HV: "N"

@televisi
Copy link

televisi commented Mar 3, 2024

@kroese thanks for your reply!

I tried that combination, unfortunately, docker thrown this error:

failed to deploy a stack: validating /data/compose/47/v1/docker-compose.yml: services.windows.environment must be a mapping

I then changed it to the following:

    environment:
      - VERSION="win11"
      - RAM_SIZE="1G"
      - CPU_CORES="1"
      - DISK_SIZE="100G"
      - HV="N"

And the container thrown this error

> ERROR: Invalid value for DISK_SIZE: "100G"

I then changed it to the following:

    environment:
      - VERSION="win11"
      - RAM_SIZE="1G"
      - CPU_CORES="1"
      - DISK_SIZE=100G
      - HV="N"

And the container thrown this error

> ERROR: qemu-system-x86_64: -m "1G": Parameter 'size' expects a non-negative number below 2^64
Optional suffix k, M, G, T, P or E means kilo-, mega-, giga-, tera-, peta-
and exabytes, respectively.

I then changed it to the following:

    environment:
      - VERSION="win11"
      - RAM_SIZE=1G
      - CPU_CORES=1
      - DISK_SIZE=100G
      - HV="N"

And now, I'm going back to square 1 :(

❯ ERROR: qemu-system-x86_64: eVMCS version range [1..1] is not supported by kernel (supported: [0..0])
qemu-system-x86_64: kvm_init_vcpu: kvm_arch_init_vcpu failed (0): Operation not supported

Surely I missed something here?

Thanks

@televisi
Copy link

televisi commented Mar 3, 2024

@kroese Okay, I removed all of the " sign now, and seems working now.

My updated docker compose now:

version: "3"
services:
  windows:
    image: dockurr/windows
    container_name: windows11
    environment:
      - VERSION=win11
      - RAM_SIZE=2G
      - CPU_CORES=1
      - DISK_SIZE=100G
      - HV=N
    devices:
      - /dev/kvm
    cap_add:
      - NET_ADMIN
    ports:
      - 8006:8006
      - 13389:3389/tcp
      - 13389:3389/udp
    stop_grace_period: 2m
    restart: on-failure
    volumes:
      - "/share/Container-Data/windows11:/storage"

Now, I have a different error - but I can access the UI now!

Warning: Extension CHECKSUM revision 0 not supported, missing kernel module?
iptables: No chain/target/match by that name.
❯ Booting Windows using QEMU emulator version 8.2.1 ...
3h3h3hBdsDxe: failed to load Boot0002 "UEFI QEMU QEMU HARDDISK " from PciRoot(0x0)/Pci(0xA,0x0)/Scsi(0x0,0x0): Not Found
BdsDxe: loading Boot0001 "UEFI QEMU QEMU CD-ROM " from PciRoot(0x0)/Pci(0x5,0x0)/Scsi(0x0,0x0)
BdsDxe: starting Boot0001 "UEFI QEMU QEMU CD-ROM " from PciRoot(0x0)/Pci(0x5,0x0)/Scsi(0x0,0x0)

THANK YOU for your guidance!

@kroese
Copy link
Contributor

kroese commented Mar 3, 2024

I think you can ignore that iptables message, as long as everything works okay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants