GithubHelp home page GithubHelp logo

[Question]: ERROR: You are using Docker Desktop for Windows which does not support macvlan, please revert to bridge networking! about windows HOT 16 CLOSED

nfonseca avatar nfonseca commented on September 22, 2024
[Question]: ERROR: You are using Docker Desktop for Windows which does not support macvlan, please revert to bridge networking!

from windows.

Comments (16)

nfonseca avatar nfonseca commented on September 22, 2024 1

Thank you so much ! I will give it a try !

from windows.

kroese avatar kroese commented on September 22, 2024 1

I have zero experience with either AKS, or Podman, or Kubernetes, nor Windows Worker nodes, so I am the last person who can say something reasonable about that haha :) Good luck!

from windows.

kroese avatar kroese commented on September 22, 2024

I do a check if the IP of the container starts with 172.x.x.x and if not, I assume it is because macvlan is enabled.

This checks works for Docker Desktop because it uses 172.x.x.x by default, but apparently Podman uses a different range. So if you can tell me the IP that your container gets by default from Podman, I can account for it in the check.

from windows.

nfonseca avatar nfonseca commented on September 22, 2024

Hi !

I cannot get the IP Address of the container as it seems to be empty.
If it helps, this is my podman network configuration

C:\Users\xxx>podman network inspect podman
[
{
"name": "podman",
"id": "2f259bab93aaaaa2542ba43ef33eb990d0999ee1b9924b557b7be53c0b7a1bb9",
"driver": "bridge",
"network_interface": "podman0",
"created": "2024-05-21T09:37:21.103570919+01:00",
"subnets": [
{
"subnet": "10.88.0.0/16",
"gateway": "10.88.0.1"
}
],
"ipv6_enabled": false,
"internal": false,
"dns_enabled": false,
"ipam_options": {
"driver": "host-local"
}
}
]

Thank you for the help and let me know if you need anything else.

from windows.

kroese avatar kroese commented on September 22, 2024

Yes, it helps because I can now see the Podman IP's start with 10.x instead of 172.x

I will fix it in the next version. Maybe you can workaround it in the mean time by giving the container an IP that looks more like Docker Desktop, for example by adding --ip 172.17.0.1 to the run command.

from windows.

nfonseca avatar nfonseca commented on September 22, 2024

C:\Users\fonsen>podman run --name windows555 --net podman -p 8006:8006 --dns 10.8.8.8 --ip 172.17.0.1 9d9b57d1b2f0 Error: preparing container 2b86cb0e830606cc5e935079c3991d6cc4f977eb2301a0a55f75d2e1ddb6a98a for attach: requested static ip 172.17.0.1 not in any subnet on network podman

I might need to change the podman network configuration. I will find a way to do it and try again to make it look like docker.

from windows.

kroese avatar kroese commented on September 22, 2024

This is now fixed in v3.09, please try it and let me know!

from windows.

nfonseca avatar nfonseca commented on September 22, 2024

Hi !

Unfortunatley I still have the same error and I pulled the most recent image

`
C:\Users\xxx>podman pull dockurr/windows
Trying to pull docker.io/dockurr/windows:latest...
Getting image source signatures
Copying blob sha256:f6e28649d811de123ecc9ab566af4022cf7bfb75cc04a613699b69dd518d4ac2
Copying blob sha256:26107d8982c17ab9de45af465fc1452ba3d172c03a0ac445bef29c3dc4a801ae
Copying blob sha256:cd1c63d83d36432249ce665491c9fe4e5ba12f92f1df5fa569d52f4ad82924a1
Copying blob sha256:61a6775d97f36f7f0eba114e4ddb4ae4ff91c17e14ff814246e1f035842f131a
Copying blob sha256:f0577c5c988bcd2aae11a3296ab739e7658b9fcad77b44899354f884860c896b
Copying blob sha256:82dbfa2376551086b33e062b3e0866d03e26001dab781397c622fb3e1f16a0ab
Copying config sha256:48707e29044ebcead1a4715521758b587686b215b52bc328cf45c0e8b6c3ad0e
Writing manifest to image destination
48707e29044ebcead1a4715521758b587686b215b52bc328cf45c0e8b6c3ad0e

C:\Users\xxx>podman image list
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/dockurr/windows latest 48707e29044e 9 hours ago 431 MB
9d9b57d1b2f0 2 days ago 431 MB
docker.io/library/docker latest 72f08938a4ea 5 days ago 366 MB
quay.io/podman/hello latest b1c06f48960c 2 months ago 1.7 MB
docker.io/library/alpine latest 05455a08881e 3 months ago 7.67 MB
quay.io/tengqm/kab latest f9126bf3f577 8 months ago 268 MB

C:\Users\xxx>podman run -it --name windows1999 -p 8006:8006 --device=/dev/kvm --cap-add NET_ADMIN --stop-timeout 120 dockurr/windows
❯ Starting Windows for Docker v3.09...
❯ For support visit https://github.com/dockur/windows
❯ CPU: 13th Gen Intel Core TM i7 13700H | RAM: 14/16 GB | DISK: 167 GB (ext4) | HOST: 5.10.102.1-microsoft-standard-WSL2...

❯ Requesting Windows 11 from Microsoft server...
❯ ERROR: Microsoft blocked the automated download request based on your IP address.
❯ Failed to download Windows 11, will try a diferent method now...
❯ Downloading product information from Microsoft server...
❯ Downloading Windows 11...
/storage/tmp/win11x64.esd 100%[===================================================================================================================>] 4.54G 22.1MB/s in 3m 18s
❯ Extracting Windows 11 bootdisk...
❯ Extracting Windows 11 environment...
❯ Extracting Windows 11 setup...
❯ Extracting Windows 11 image...
❯ Adding win11x64.xml for automatic installation...
❯ Building Windows 11 image...
❯ Creating a 64G growable disk image in raw format...
❯ ERROR: You are using Docker Desktop for Windows which does not support macvlan, please revert to bridge networking!

C:\Users\xxx>

`

from windows.

kroese avatar kroese commented on September 22, 2024

Can you add -e "DEBUG=Y" to your run command and post the output of the log here? (This also disables the IP check)

from windows.

nfonseca avatar nfonseca commented on September 22, 2024

As requested, Thanks !

C:\Users\fonsen>podman run -it --name windows666 -p 8006:8006 --network podman --device=/dev/kvm  --cap-add NET_ADMIN -e "DEBUG=Y"--stop-timeout 120 dockurr/windows
Error: short-name resolution enforced but cannot prompt without a TTY

C:\Users\fonsen>podman run -it --name windows666 -p 8006:8006 --network podman --device=/dev/kvm  --cap-add NET_ADMIN -e "DEBUG=Y"--stop-timeout 120 dockurr/windows
Error: short-name resolution enforced but cannot prompt without a TTY

C:\Users\fonsen>podman run -it --name windows666 -p 8006:8006 --device=/dev/kvm  --network podman --cap-add NET_ADMIN -e "DEBUG=Y" --stop-timeout 120 dockurr/windows
❯ Starting Windows for Docker v3.09...
❯ For support visit https://github.com/dockur/windows
❯ CPU: 13th Gen Intel Core TM i7 13700H | RAM: 14/16 GB | DISK: 155 GB (ext4) | HOST: 5.10.102.1-microsoft-standard-WSL2...

❯ Requesting Windows 11 from Microsoft server...
 - Parsing download page: https://www.microsoft.com/en-us/software-download/windows11
Getting Product edition ID: 2935
Permit Session ID: 555522d7-cca2-4287-8cb9-902a9e0dd71c
Getting language SKU ID: 17442
Getting ISO download link...
❯ ERROR: Microsoft blocked the automated download request based on your IP address.
❯ Failed to download Windows 11, will try a diferent method now...
❯ Downloading product information from Microsoft server...
❯ Downloading Windows 11...
/storage/tmp/win11x64.esd                            100%[===================================================================================================================>]   4.54G  28.9MB/s    in 3m 8s
❯ Extracting Windows 11 bootdisk...
❯ Extracting Windows 11 environment...
❯ Extracting Windows 11 setup...
❯ Extracting Windows 11 image...
❯ Adding win11x64.xml for automatic installation...
❯ Building Windows 11 image...
❯ Creating a 64G growable disk image in raw format...
❯ Host: ca4ceda26306  IP: 10.88.0.3  Gateway: 10.88.0.1  Interface: eth0  MAC: 02:C7:EA:5B:B3:C9
nameserver 10.8.8.8

mknod: /dev/net/tun: Operation not permitted
❯ ERROR: TUN device missing. Please add the following setting to your container: --device /dev/net/tun --cap-add NET_ADMIN

C:\Users\fonsen>

from windows.

nfonseca avatar nfonseca commented on September 22, 2024

New attempt:

C:\Users\fonsen>podman run -it --name windows11666 -p 8006:8006 --device=/dev/kvm  --network podman --cap-add NET_ADMIN --device /dev/net/tun  -e "DEBUG=Y" --stop-timeout 120 dockurr/windows
❯ Starting Windows for Docker v3.09...
❯ For support visit https://github.com/dockur/windows
❯ CPU: 13th Gen Intel Core TM i7 13700H | RAM: 14/16 GB | DISK: 150 GB (ext4) | HOST: 5.10.102.1-microsoft-standard-WSL2...

❯ Requesting Windows 11 from Microsoft server...
 - Parsing download page: https://www.microsoft.com/en-us/software-download/windows11
Getting Product edition ID: 2935
Permit Session ID: bd2ea069-2701-4ece-8eea-eee72ea730f9
Getting language SKU ID: 17442
Getting ISO download link...
❯ ERROR: Microsoft blocked the automated download request based on your IP address.
❯ Failed to download Windows 11, will try a diferent method now...
❯ Downloading product information from Microsoft server...
❯ Downloading Windows 11...
/storage/tmp/win11x64.esd                            100%[===================================================================================================================>]   4.54G  20.0MB/s    in 13m 10s
❯ Extracting Windows 11 bootdisk...
❯ Extracting Windows 11 environment...
❯ Extracting Windows 11 setup...
❯ Extracting Windows 11 image...
❯ Adding win11x64.xml for automatic installation...
❯ Building Windows 11 image...
❯ Creating a 64G growable disk image in raw format...
❯ Host: a2757b868f2f  IP: 10.88.0.5  Gateway: 10.88.0.1  Interface: eth0  MAC: 02:D6:12:8C:CD:68
nameserver 10.8.8.8

sysctl: permission denied on key "net.ipv4.ip_forward"
❯ ERROR: IP forwarding is disabled. Please add the following setting to your container: --sysctl net.ipv4.ip_forward=1

C:\Users\fonsen>```

from windows.

kroese avatar kroese commented on September 22, 2024

Please add --sysctl net.ipv4.ip_forward=1 to the run command. Al these errors are caused by Podman having different permissions than Docker.

from windows.

nfonseca avatar nfonseca commented on September 22, 2024

Still a couple of issues related with Podman ....


C:\Users\fonsen>podman run -it --name windows116466 -p 8006:8006 --device=/dev/kvm  --network podman --cap-add NET_ADMIN --device /dev/net/tun  -e "DEBUG=Y"  --sysctl net.ipv4.ip_forward=1  --stop-timeout 120 dockurr/windows
❯ Starting Windows for Docker v3.09...
❯ For support visit https://github.com/dockur/windows
❯ CPU: 13th Gen Intel Core TM i7 13700H | RAM: 14/16 GB | DISK: 144 GB (ext4) | HOST: 5.10.102.1-microsoft-standard-WSL2...

❯ Requesting Windows 11 from Microsoft server...
 - Parsing download page: https://www.microsoft.com/en-us/software-download/windows11
Getting Product edition ID: 2935
Permit Session ID: 9b051efa-251d-4af0-9b19-36fc1f685bca
Getting language SKU ID: 17442
Getting ISO download link...
❯ ERROR: Microsoft blocked the automated download request based on your IP address.
❯ Failed to download Windows 11, will try a diferent method now...
❯ Downloading product information from Microsoft server...
❯ Downloading Windows 11...
/storage/tmp/win11x64.esd                            100%[===================================================================================================================>]   4.54G  11.6MB/s    in 10m 18s
❯ Extracting Windows 11 bootdisk...
❯ Extracting Windows 11 environment...
❯ Extracting Windows 11 setup...
❯ Extracting Windows 11 image...ten
❯ Adding win11x64.xml for automatic installation...
❯ Building Windows 11 image...
❯ Creating a 64G growable disk image in raw format...
❯ Host: 2a76050a5591  IP: 10.88.0.2  Gateway: 10.88.0.1  Interface: eth0  MAC: 02:6F:39:7B:E1:C2
nameserver 10.8.8.8

iptables v1.8.10 (legacy): can't initialize iptables table `nat': Permission denied (you must be root)
Perhaps iptables or your kernel needs to be upgraded.
❯ ERROR: The 'ip_tables' kernel module is not loaded. Try this command: sudo modprobe ip_tables iptable_nat

C:\Users\fonsen>

from windows.

nfonseca avatar nfonseca commented on September 22, 2024

I think I am going to give up at this point

iptables v1.8.10 (legacy): can't initialize iptables table `nat': Permission denied (you must be root)
Perhaps iptables or your kernel needs to be upgraded.
❯ ERROR: The 'ip_tables' kernel module is not loaded. Try this command: sudo modprobe ip_tables iptable_nat

C:\Users\fonsen>podman machine ssh
Connecting to vm podman-machine-default. To close connection, use `~.` or `exit`
Warning: Permanently added '[localhost]:51896' (ED25519) to the list of known hosts.
Last login: Wed May 22 12:01:47 2024 from ::1
[user@W11CNMM9Y3 ~]$ sudo su
[root@W11CNMM9Y3 user]# modprobe ip_tables iptable_nat
modprobe: FATAL: Module ip_tables not found in directory /lib/modules/5.10.102.1-microsoft-standard-WSL2
[root@W11CNMM9Y3 user]# modprobe ip_tables
modprobe: FATAL: Module ip_tables not found in directory /lib/modules/5.10.102.1-microsoft-standard-WSL2
[root@W11CNMM9Y3 user]# modprobe iptable_nat
modprobe: FATAL: Module iptable_nat not found in directory /lib/modules/5.10.102.1-microsoft-standard-WSL2
[root@W11CNMM9Y3 user]#

from windows.

kroese avatar kroese commented on September 22, 2024

The simplest is to just add --privileged I guess

from windows.

nfonseca avatar nfonseca commented on September 22, 2024

Hi,

Your suggestion has worked but now I am hitting issue #226 ...
I really appreciate the help but at this stage I am just going to hold on using this image for Podman builds.
Also as a more generic question if you don't mind.

I was planning to build a customized windows image using Podman and then have that same image deployed on AKS hybrid running Windows Worker nodes. Do you think the image would run fine if it has been built on Podman (Linux) and then deployed on Windows worker nodes managed by AKS ?

Thank you.

from windows.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.