Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Support for ipvlan or macvlan? #810

Open
gaby opened this issue Mar 21, 2021 · 3 comments
Open

Support for ipvlan or macvlan? #810

gaby opened this issue Mar 21, 2021 · 3 comments

Comments

@gaby
Copy link
Contributor

gaby commented Mar 21, 2021

I was wondering if there's way to run ignite microVM's using Docker ipvlan/macvlan?

Usually the way I go about this is:

docker network create -d ipvlan --subnet=10.0.2.0/24 -o parent=enp0s3.2 vlan_2
docker network create -d ipvlan --subnet=10.0.4.0/24 -o parent=enp0s3.4 vlan_4

docker run -it --rm --net=vlan_2 --ip=10.0.2.15 alpine ipconfig
docker run -it --rm --net=vlan_4 --ip=10.0.4.15 alpine ipconfig

No only this setup gives you static-ips on each container, you also get L2 isolation via vlan trunking. Looking at the help menu from ignite the only option is "network-plugin" which only supports "docker-bridge".

@stealthybox
Copy link
Contributor

@luxas and @bboreham are currently pairing on a macvlan implementation.
Some of the bits and pieces are working.

The tricky bits here are how the network namespace and device nodes are setup in the ignite-spawn sandbox container because a character device needs to be passed through the firecracker config if we are not using TAP's with /dev/net/tun.

Keeping in mind the Docker network-plugins, we would have to look into how the sandbox can look and what additional work needs to occur to expose those interfaces to the firecracker guest -- this problem has additional requirements beyond normal container networking.

@gaby
Copy link
Contributor Author

gaby commented Mar 29, 2021

I'm not sure how doable it would be but, attaching an ignite vm's to a docker networks? Ignite currently supports using the docker-bridge, would it be much different to use an user-created network?

@bboreham
Copy link
Contributor

Small clarification: we were working on macvtap.

Ipvlan will not work with the current code; it expects that you give it a device which can has its own L2 identity. I made #761 to fix the obvious crash but I suspect it won't work even after that.

As for using Docker network, I don't see any fundamental obstacle - it's doing roughly what the current CNI-based code does - but for these things the devil is very much in the detail. Docker does many things in pursuit of its "virtual service" concept that are unlikely to play well with what a VM needs.

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

No branches or pull requests

3 participants