How to change the default libvirt private network - x360Recover

Written By Tami Sutcliffe (Super Administrator)

Updated at June 9th, 2023

x360Recover reserves the network 192.168.122.0/24 by default as a private, internal-only network for performing virtualization in test mode.

If a BDR appliance or vault management interface is assigned to any IP address from a subnet overlapping 192.168.122.0/24, then it will not be able to start vital services on boot, due to the conflicting network assignments.

Other examples of conflicting management assignments include 192.168.120.0/22 or 192.168.122.32/26, etc. where the assigned network includes all or part of the network 192.168.122.0/24.

If the management address cannot be changed to avoid conflicting with the default libvirt network, it will be necessary to override the default network configuration for libvirt.


To fix this problem, perform the following steps:

Note: This process requires x360Recover release 10.3.0 or newer.

1. Copy the default libvirt network configuration to /etc/replibit:

cp /etc/libvirt/qemu/networks/autostart/default.xml /etc/replibit/

2. Edit the configuration file and modify the default IP address settings for libvirt:

nano /etc/replibit/default.xml

<network>
  <name>default</name>
  <uuid>5b30251a-8d40-7dce-3459-d9a04f1cebfc</uuid>
  <bridge name='virbr0' stp='on' delay='0' />
  <ip address='<first_ip_address>' netmask='<netmask>'>
    <dhcp>
      <range start='second_ip_in_address' end='<last_ip_address>' />
    </dhcp>
  </ip>
</network>

3. Update ONLY the IP address and netmask values as shown above and be sure to update them to something that doesn’t conflict with existing networks in your environment. 

4. Press <CTRL>-O to save changes and <CTRL>-X  to exit the editor when finished. 

Next, update the firewall rules:

5. Copy the existing firewall rules configuration to /etc/replibit 

cp /etc/firewall/fw_ncluster.fw /etc/replibit

 6. Update the firewall rules for the new private virtual network address:  


sed -i 's|echo "-A INPUT  -s 192.168.122.0/24   -m state --state NEW  -j Cid4645X8134.0 "|echo "-A INPUT -s <address>/<netmask> -m state --state NEW -j Cid4645X8134.0 "|' "/etc/replibit/fw_ncluster.fw"


sed -i 's|echo "-A FORWARD  -s 192.168.122.0/24   -m state --state NEW  -j Cid4645X8134.1 "|echo "-A FORWARD -s <address>/<netmask> -m state --state NEW -j Cid4645X8134.1 "|' "/etc/replibit/fw_ncluster.fw"


sed -i 's|echo "-A Cid12231X10496.0  -s 192.168.122.0/24   -j RETURN "|echo "-A Cid12231X10496.0 -s <address>/<netmask> -j RETURN "|' “/etc/replibit/fw_ncluster.fw”