windows icon indicating copy to clipboard operation
windows copied to clipboard

Unable to install Windows from a local iso file despite specifying in the compose YAML

Open johnmejia01 opened this issue 8 months ago • 7 comments

Operating system

Fedora 41

Description

The container is downloading Windows instead of getting from a specified ISO file from local as specified in the volume from the compose YAML.

Docker compose

For documentation, FAQ, additional configuration options and technical help, visit: https://github.com/dockur/windows

name: "WindowsContainer" # Docker Compose Project Name. volumes:

Create Volume 'data'.

Located @ '/var/lib/docker/volumes/winapps_data/_data' (Docker).

Located @ '/var/lib/containers/storage/volumes/winapps_data/_data' or '~/.local/share/containers/storage/volumes/winapps_data/_data' (Podman).

data: services: windows: image: ghcr.io/dockur/windows:latest container_name: WindowsContainer # Created Docker VM Name. environment: # Version of Windows to configure. For valid options, visit: # https://github.com/dockur/windows?tab=readme-ov-file#how-do-i-select-the-windows-version # https://github.com/dockur/windows?tab=readme-ov-file#how-do-i-install-a-custom-image VERSION: "11" RAM_SIZE: "8G" # RAM allocated to the Windows VM. CPU_CORES: "4" # CPU cores allocated to the Windows VM. DISK_SIZE: "64G" # Size of the primary hard disk. #DISK2_SIZE: "32G" # Uncomment to add an additional hard disk to the Windows VM. Ensure it is mounted as a volume below. USERNAME: "notrealusername" # Edit here to set a custom Windows username. The default is 'MyWindowsUser'. PASSWORD: "notrealpassword" # Edit here to set a password for the Windows user. The default is 'MyWindowsPassword'. HOME: "${HOME}" # Set path to Linux user home folder. ports: - 8006:8006 # Map '8006' on Linux host to '8006' on Windows VM --> For VNC Web Interface @ http://127.0.0.1:8006. - 3389:3389/tcp # Map '3389' on Linux host to '3389' on Windows VM --> For Remote Desktop Protocol (RDP). - 3389:3389/udp # Map '3389' on Linux host to '3389' on Windows VM --> For Remote Desktop Protocol (RDP). cap_add: - NET_ADMIN # Add network permission stop_grace_period: 60s # Wait 60 seconds before sending SIGTERM when attempting to shut down the Windows VM. restart: on-failure # Restart the Windows VM if the exit code indicates an error. volumes: - data:/storage # Mount volume 'data' to use as Windows 'C:' drive. - ${HOME}:/shared # Mount Linux user home directory @ '\host.lan\Data'. #- /path/to/second/hard/disk:/storage2 # Uncomment to mount the second hard disk within the Windows VM. Ensure 'DISK2_SIZE' is specified above. - ./oem:/oem # Enables automatic post-install execution of 'oem/install.bat', applying Windows registry modifications contained within 'oem/RDPApps.reg'. - ${HOME}/Downloads/Win11_24H2_English_x64.iso:/custom.iso # Uncomment to use a custom Windows ISO. If specified, 'VERSION' (e.g. 'tiny11') will be ignored.\

devices:
  - /dev/kvm # Enable KVM.
  - /dev/net/tun # Enable tuntap
  #- /dev/sdX:/disk1 # Uncomment to mount a disk directly within the Windows VM (Note: 'disk1' will be mounted as the main drive. THIS DISK WILL BE FORMATTED BY DOCKER).
  ###Test to mount happiness drive
  #- /dev/sdY:/disk2 # Uncomment to mount a disk directly within the Windows VM (Note: 'disk2' and higher will be mounted as secondary drives. THIS DISK WILL NOT BE FORMATTED).
sysctls:
  - net.ipv4.ip_forward=1

Docker log

john@fedora:~/dev$ podman compose --file ./composeTest.yaml up

Executing external compose provider "/usr/bin/podman-compose". Please see podman-compose(1) for how to disable this message. <<<<

534e8d9285ebaecf52ea10faa9e243abb5249d16baf5607d36cb613e7ba0034c 1f496c54efa7aa3df5c43b5781e10640e4f0d8831b07a0629e63357e4642f1f7 [windows] | ❯ Starting Windows for Docker v4.34... [windows] | ❯ For support visit https://github.com/dockur/windows [windows] | ❯ CPU: Intel Core i7 11850H | RAM: 55/63 GB | DISK: 893 GB (btrfs) | KERNEL: 6.13.11-200.fc41.x86_64... [windows] | [windows] | ❯ Warning: you are using the BTRFS filesystem for /storage, this might introduce issues with Windows Setup! [windows] | ❯ Requesting Windows 11 from the Microsoft servers...

Screenshots (optional)

Image

johnmejia01 avatar Apr 22 '25 05:04 johnmejia01

Very strange.. because it looks like you did it correctly so I can't explain

kroese avatar Apr 22 '25 08:04 kroese

you also need to change VERSION="custom.iso"

xsy420 avatar Apr 23 '25 06:04 xsy420

@xsy420 That should never be necessary?

kroese avatar Apr 23 '25 06:04 kroese

you also need to change VERSION="custom.iso"

That did not work as I'm getting the following output:

john@fedora:~/WinMode$ podman compose --file compose.yaml up

Executing external compose provider "/usr/bin/podman-compose". Please see podman-compose(1) for how to disable this message. <<<<

277d3906a71e1ad88239c4432281281e7cd552b488e5d5a2a9fe9447fff674c2 b83f941c397c69b8f4e7e4716b3cbf2504fbdf6269f8b560095682a502c67dc4 [windows] | ❯ Starting Windows for Docker v4.34... [windows] | ❯ For support visit https://github.com/dockur/windows [windows] | ❯ CPU: Intel Xeon E 2276M | RAM: 113/126 GB | DISK: 709 GB (btrfs) | KERNEL: 6.12.11-200.fc41.x86_64... [windows] | [windows] | ❯ Warning: you are using the BTRFS filesystem for /storage, this might introduce issues with Windows Setup! [windows] | ❯ ERROR: Invalid VERSION specified, value "custom.iso" is not recognized!

johnmejia01 avatar Apr 24 '25 05:04 johnmejia01

@kroese I got working by having the .ISO file on a different file system than BTRFS. For some reason, it's doesn't support BTRFS file system, but works with other filesystems like NTFS, EXT4, or others.

johnmejia01 avatar Apr 24 '25 05:04 johnmejia01

is it posible to set the version to a networkshare like smb://ipofserver/ISO/nameofiso.iso of does it really need to download the iso trough a wget or aria2 command

sojab0on avatar Jun 25 '25 17:06 sojab0on

Is this issue resolved? I'm having this problem too.

calyle avatar Sep 06 '25 14:09 calyle