Closed Dialgatrainer02 closed 6 months ago
Can you try adding this to the compose file:
devices:
- /dev/net/tun
I've got the same setup and also the same issue. Adding /dev/net/tun
to the devices section of docker-compose.yaml leads to the following output for me:
WARN[0000] /home/rflrkn/windows_docker/docker-compose.yaml: `version` is obsolete
[+] Running 0/0
⠋ Container windows Recreated 0.0s
Attaching to windows
windows | ❯ Starting Windows for Docker v2.08...
windows | ❯ For support visit https://github.com/dockur/windows
windows |
windows | open: No such device
windows | ❯ ERROR: Status 1 while: ip tuntap add dev "$VM_NET_TAP" mode tap (line 170/311)
windows exited with code 0
I have the same problem when deploying windows 10 ltsc through docker portainer.
Docker error output:
[+] Successfully downloaded Windows image!
❯ Extracting Windows 10 image...
❯ Adding XML file for automatic installation...
❯ Building Windows 10 LTSC image...
❯ Creating a 64G growable disk image in raw format...
open: No such device
❯ ERROR: Status 1 while: ip tuntap add dev "$VM_NET_TAP" mode tap (line 170/311)
❯ Starting Windows for Docker v2.08...
❯ For support visit https://github.com/dockur/windows
open: No such device
❯ ERROR: Status 1 while: ip tuntap add dev "$VM_NET_TAP" mode tap (line 170/311)
❯ Starting Windows for Docker v2.08...
❯ For support visit https://github.com/dockur/windows
open: No such device
❯ ERROR: Status 1 while: ip tuntap add dev "$VM_NET_TAP" mode tap (line 170/311)
❯ Starting Windows for Docker v2.08...
❯ For support visit https://github.com/dockur/windows
open: No such device
hostos version:
[sunnypai@storage ~]$ neofetch
sunnypai@storage
----------------
OS: Arch Linux x86_64
Host: Super Server 0123456789
Kernel: 6.7.9-arch1-1
Uptime: 18 days, 21 hours, 36 mins
Packages: 1036 (pacman)
Shell: bash 5.2.26
Resolution: 1600x900
Terminal: /dev/pts/5
CPU: AMD EPYC 7282 (32) @ 2.800GHz
GPU: NVIDIA Tesla P100 PCIe 16GB
Memory: 5891MiB / 96417MiB
compose file:
version: "3"
services:
windows:
image: dockurr/windows
container_name: windows
environment:
VERSION: "ltsc10"
devices:
- /dev/kvm
- /dev/net/tun
cap_add:
- NET_ADMIN
ports:
- 8006:8006
- 3389:3389/tcp
- 3389:3389/udp
stop_grace_period: 2m
restart: on-failure
docker info
[sunnypai@storage ~]$ sudo docker info
Client:
Version: 26.0.0
Context: default
Debug Mode: false
Plugins:
compose: Docker Compose (Docker Inc.)
Version: 2.26.1
Path: /usr/lib/docker/cli-plugins/docker-compose
Server:
Containers: 14
Running: 12
Paused: 0
Stopped: 2
Images: 14
Server Version: 26.0.0
Storage Driver: overlay2
Backing Filesystem: btrfs
Supports d_type: true
Using metacopy: true
Native Overlay Diff: false
userxattr: false
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 7c3aca7a610df76212171d200ca3811ff6096eb8.m
runc version:
init version: de40ad0
Security Options:
seccomp
Profile: builtin
cgroupns
Kernel Version: 6.7.9-arch1-1
Operating System: Arch Linux
OSType: linux
Architecture: x86_64
CPUs: 32
Total Memory: 94.16GiB
Name: storage
ID: b0b2ea14-1f33-4fe1-b7bf-fd87d685e07f
Docker Root Dir: /var/lib/docker
Debug Mode: false
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
I also tried to use macvlan to config the network, but unfortunately my NIC seems not supporting this function:
Can you give me further advise? Thank you for your assistant, and wish you a pleasant day!
I literally just fixed by rebooting although you might not be so lucky
@SunnyPai0413 Try adding privileged: true
to your compose file.
@kroese It still appears as this:
❯ Starting Windows for Docker v2.08...
❯ For support visit https://github.com/dockur/windows
open: No such device
❯ ERROR: Status 1 while: ip tuntap add dev "$VM_NET_TAP" mode tap (line 170/311)
❯ Starting Windows for Docker v2.08...
❯ For support visit https://github.com/dockur/windows
open: No such device
❯ ERROR: Status 1 while: ip tuntap add dev "$VM_NET_TAP" mode tap (line 170/311)
❯ Starting Windows for Docker v2.08...
❯ For support visit https://github.com/dockur/windows
And here's the docker compose file:
version: "3"
services:
windows:
image: dockurr/windows
container_name: windows
environment:
VERSION: "ltsc10"
devices:
- /dev/kvm
- /dev/net/tun
cap_add:
- NET_ADMIN
ports:
- 8006:8006
- 3389:3389/tcp
- 3389:3389/udp
privileged: true
stop_grace_period: 2m
restart: on-failure
Any updates on this?
Reboot fixed it
@rflrkn This error sounds like the TUN kernel module is not loaded (on most Linux distros it is loaded by default). So can you paste the output of these commands:
lsmod | grep tun
modprobe tun
to see if your system has the TUN module and can load it?
Oh my god, yes, of course. TUN module just wasn't loaded properly. That was the issue. Thanks! :)
docker logs output
docker info
docker version
compose file