1

General info:


I have a KVM-libvirt/qemu running on ArchLinux;

3.18.2-2-ARCH
ls | egrep -i 'libvirt|qemu'
libvirt-1.2.11-1-x86_64.pkg.tar.xz
libvirt-glib-0.2.0-1-x86_64.pkg.tar.xz
libvirt-python-1.2.11-1-x86_64.pkg.tar.xz
qemu-2.2.0-1-x86_64.pkg.tar.xz

Problem:


I'm running different firewalls (with multiple interfaces / Zones) and for DHCP issues while handling particular configurations I'd like to change the :

[root@localhost networks]# pwd
/etc/libvirt/qemu/networks
[root@localhost networks]# cat default.xml | grep address
  <mac address='52:54:00:66:9c:8c'/>
  <ip address='192.168.150.1' netmask='255.255.255.0'>

Which is the "gateway" for my networks and applied as an IP for the vrbrX interface to something other than 192.168.150.1, as for example if somehost behind the firewall takes the first available IP it will have the same IP so it will generate a network conflict (This happens as the firewall interfaces are bridges and hosts are found behind them.), and I don't want each time to change the networks to Static-IP's by turning off the DHCP (or other tweaks).

What I tried:

Well, I tried editing manually the xml's of qemu/networks and than started the interfaces, but although the on the xml was :

Yet, the interface had

 25: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN        group default 
inet 192.168.150.1/24 brd 192.168.150.255 scope global virbr0
1

Didn't think the solution was so easy,

basically it should be edited with virsh net-edit which prompts you to vi, and than the change is applied also to the interface.

Strangely enough, I edited the xml, and it was applied also into the autostart directory and than started the interfaces, so it seems like with virsh it does other operations as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.