0
I’ve written a fair amount about Open vSwitch (OVS), including some articles on using it with KVM and Libvirt. One thing I haven’t discussed in such environments, though, is the potential challenge of mapping network interfaces in a guest domain to the corresponding OVS interface (for the purposes of troubleshooting, for example). There is no single command that will provide a guest-to-OVS interface map (as far as I know), but this information is easily gathered using a couple commands.
First, we’ll need to gather some information about the interface from the guest domain’s perspective. There are two ways we can do this: from within the guest OS itself, or by interrogating Libvirt.
Working from Within the Guest OS
Inside the guest domain (I’m assuming you’re using a relatively recent Linux distribution), you only need to use standard commands like ip link list or ip addr list. The goal is to obtain the MAC address assigned to the particular guest interface. So, for example, if you wanted to get the MAC address for the guest “eth0” interface, you’d run:
To isolate only the MAC address from the output of that Continue reading