Похожие чаты

Hey, how do I make a virtual interface name predictable

in libvirt usina QEMU/KVM?
The thing is that I created a bridge interface on the host and I connect my VMs to this bridge.
When it starts I have a vnet0 interface, when I restart it it becames vnet1 and so on

5 ответов

16 просмотров

Simple hack: grep output of ip -o link and take everything that starts with vnet and not yet connected to the bridge.

Create a bridge yourself and point the VMs to that

Ender
Simple hack: grep output of ip -o link and take ev...

Ip can format it output as JSON. Tools like jq can then used to extract the values by key.

Sebastian Dicke
Ip can format it output as JSON. Tools like jq can...

Thank you!!! Less dirty hacks in my scripts I'll have :)

Martin Rys
Create a bridge yourself and point the VMs to that

That's what I did, I have auto br0 iface br0 inet manual bridge_ports eth0 bridge_waitport 0 bridge_fd 0 in my /etc/network/interfaces and my VM points to it with this config generated by virt-install <interface type='bridge'> <mac address='redacted'/> <source bridge='br0'/> <model type='e1000'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </interface>

Похожие вопросы

Обсуждают сегодня

Карта сайта