question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add macvtap support

See original GitHub issue

Hey everbody,

as @NerdsvilleCEO mentioned in #81, there is no support for using host devices (e.g through macvtap) in the nets section. This would be a really nice feature.

@karmab - I saw your talk at FOSDEM 2019. kcli is awesome, love it!

Cheers

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
karmabcommented, Apr 28, 2020

to give it a try, i’ve added some preliminary support for macvtap in https://github.com/karmab/kcli/commit/3c9c7b1f510c4ff9acc45ecdb87c9201eb7c3d3b

my understanding is that you only need to create a macvtap network in libvirt on top of a specified nic, and then use it as a regular network. so latest commit adds the ability to create a macvtap network with the following invocation

kcli create network -P macvtap=true -P nic=eth0 my_net

you can then use this network when creating a vm, for instance, with a oneliner like

kcli create vm -i centos7 -P nets=[my_net]

i havent fully tested it (but i will) and will think how to improve end user experience for this case.

1reaction
karmabcommented, Apr 28, 2020

technically, the way i give vms a “public” ip is simply by

  • setting a bridge on top of the default interface of your hypervisor (in my case, it’s generally a wired connection).
  • using this network in kcli (which will be reported in kcli list network)

In this configuration, qemu-guest-agent will actually take care of reporting the ip used by the vm, so you can still kcli ssh to it

Read more comments on GitHub >

github_iconTop Results From Across the Web

17.12. Attaching a Virtual NIC Directly to a Physical Interface
Open the virtual hardware details window ⇒ select NIC in the menu ⇒ for Network source, select host device name: macvtap ⇒ select...
Read more >
Using the MacVTap driver
“Macvtap is a new device driver meant to simplify virtualized bridged networking. ... by kvm/qemu and other hypervisors that support the tun/tap interface....
Read more >
MacVTap
A macvtap interface is created an configured using the ip link command from iproute2, in the same way as we configure macvlan or...
Read more >
Add MacVTap as new virtual interface type for libvirt ...
Adding support for a general macvtap vif_type that is represented by the following domain.xml: <interface type='direct'> <source ...
Read more >
What is macvtap and where is it supported?
A macvtap endpoint is a character device that largely follows the tun/tap ioctl interface and can be used directly by kvm/qemu and other ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found