Add macvlan option to networks section
seanmikhaels opened this issue · 11 comments
Would like to be able to see macvlan added to KVM networks configuration from the OMV Plugin.
Currently From CLI this can be done via, "ip link add macvlan1 link eth0 type macvlan mode bridge" and modify VM XML to point to macvlan1, and change type to Macvlan.
This is useful for those that need their VMs to be able to access and ping the host Ethernet adapter / access services that may be running on the same physical host.
Is there a reason you can't setup a bridge from the OMV network section and then use the bridge network adapter type in the VM?
Is there a reason you can't setup a bridge from the OMV network section and then use the bridge network adapter type in the VM?
The bridge section in the OMV network only sets up a Macvtap type bridge, which unfortunately doesn't pass traffic from VM-HOST traffic.
And what are you using to recreate the macvlan after each reboot? netplan doesn't support macvlan.
At the moment, I add it manually, unless there's a better way outside of creating a startup script. Which makes me wonder how is macvtap implemented in omv because there's no entry for it in netplan. But what i do notice is that the macvtap is created on the fly upon starting a VM that calls for it and destroyed after the last VM shuts down.
After reboots, the macvtap adapter, is yet again missing but created once a VM is started that uses it. I was able to confirm this by running ip a , so not sure if netplan is even needed here.
virsh takes care of the macvtap stuff. You create the macvtap network xml and virsh can set it to autostart. There is no option to do that with macvlan. I will see if making a systemd unit file can add it on startup.
Sounds good, macvlan IMO, is much more useful. Would be great to see it added as a drop down option if its possible, but sounds like there may be some limitations into doing so. Thanks for looking into this and responding
Personally, I have no reason for the guest to talk to the host or vice versa. So, macvtap is perfect for me. I have some ideas on how to make macvlan work though. I will see if they survive reboots.
What does your xml look like for macvlan?
What does your xml look like for macvlan?
i had XML as network type bridge, pointing to the interface macvlan0 created manually using IP command it worked for a bit but now i'm not able to recreate it. It seems like its overidden when i start the VM with macvtap instead. But i see what you're saying there's no macvlan support in virsh which makes this more difficult, let me see if theres another way.
I have everything working for creating the network in the plugin but I couldn't get any xml to work for the same reason you are having - libvirt is changing it.
Closing. Will re-open if someone finds a way to do this.