dockur / windows

Windows inside a Docker container.
MIT License
15.51k stars 1.27k forks source link

Shared folder problem #623

Open JustDj-Git opened 1 week ago

JustDj-Git commented 1 week ago

Operating system

OpenSUSE Tumbleweed

Description

I encountered an issue with connecting folders to Windows. The screenshots show that \host.lan\ does not exist. In the Docker container, files are accessible at /shared/ (as shown in the screenshot). It doesn't see its own share under any conditions in Explorer, but it is accessible via direct navigation to \pcname.

What I've tried:

Docker compose

services: windows: image: dockurr/windows container_name: windows environment: RAM_SIZE: "8G" CPU_CORES: "8" DISK_SIZE: "100G" VERSION: "tiny11" devices:

Docker log

❯ Starting Windows for Docker v3.12... ❯ For support visit https://github.com/dockur/windows ❯ CPU: AMD Ryzen 9 7900X 12 Core Processor | RAM: 54/63 GB | DISK: 526 GB (btrfs) | HOST: 6.9.5-1-default... ❯ Extracting local ISO image... ❯ Detecting version from ISO image... ❯ Detected: Windows 11 Pro ❯ Adding drivers to image... ❯ Adding win11x64.xml for automatic installation... ❯ Building Windows 11 image... ❯ Creating a 100G growable disk image in raw format... open: Operation not permitted ❯ ERROR: The 'tun' kernel module is not available. Try this command: 'sudo modprobe tun' or run the container with 'privileged: true'. ❯ Warning: falling back to usermode networking (slow)! ❯ Booting Windows using QEMU v8.2.4... 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) ❯ Windows started succesfully, visit http://localhost:8006/ to view the screen... 3h3h3hBdsDxe: loading Boot0004 "Windows Boot Manager" from HD(1,GPT,2A5D1513-2AD7-4E66-81B7-3E8A23A5340F,0x800,0x40000)/\EFI\Microsoft\Boot\bootmgfw.efi BdsDxe: starting Boot0004 "Windows Boot Manager" from HD(1,GPT,2A5D1513-2AD7-4E66-81B7-3E8A23A5340F,0x800,0x40000)/\EFI\Microsoft\Boot\bootmgfw.efi 3h3h3hBdsDxe: loading Boot0004 "Windows Boot Manager" from HD(1,GPT,2A5D1513-2AD7-4E66-81B7-3E8A23A5340F,0x800,0x40000)/\EFI\Microsoft\Boot\bootmgfw.efi BdsDxe: starting Boot0004 "Windows Boot Manager" from HD(1,GPT,2A5D1513-2AD7-4E66-81B7-3E8A23A5340F,0x800,0x40000)/\EFI\Microsoft\Boot\bootmgfw.efi ❯ Shutdown completed!

Screenshots (optional)

Screenshot_20240625_091608 Screenshot_20240625_091828 Screenshot_20240625_092934

kroese commented 1 week ago

The reason is these errors in the log:

 ERROR: The 'tun' kernel module is not available. Try this command: 'sudo modprobe tun' or run the container with 'privileged: true'.
❯ Warning: falling back to usermode networking (slow)!

When using usermode networking you cannot use the name //host.lan but only the IP //20.20.20.1. But the best solution is to figure out why the TUN module is not loaded on Suse Tumbleweed, or load it manually using the commands in the error message.

JustDj-Git commented 1 week ago

The reason is these errors in the log:

 ERROR: The 'tun' kernel module is not available. Try this command: 'sudo modprobe tun' or run the container with 'privileged: true'.
❯ Warning: falling back to usermode networking (slow)!

When using usermode networking you cannot use the name //host.lan but only the IP //20.20.20.1. But the best solution is to figure out why the TUN module is not loaded on Suse Tumbleweed, or load it manually using the commands in the error message.

Loading this module manually doesn't help too. Strange problem. Switched to other distro and all good so far. Thank you for helping!

ghostvar commented 6 days ago

wondering the solution to the same problem, which in my case was a bit different with //host.lan showing but not being accessible, was doing a rebuild due same issue.

It turns out that I forgot to change the DNS settings in Windows container using custom Google or Cloudflare DNS, causing the host name host.lan cannot be resolved.

To still have custom domain enabled, writing dns on compose yml file doesn't working so I just using hosts file and pointing host.lan to 20.20.20.1.

image image