vagrantubuntu-14.04vagrantfilelibvirt

How to Change Vagrant Default Network Range?


I am using vagrant with Ubuntu 14.04 and libvirt/KVM.

When I create VM, Vagrant add default NIC(management network) in range 192.168.121.0/24. I don't want to use this network range. Yes, we can modify/delete after VM up but, I want to know if any option in Vagrantfile that can change or delete default network. I know how to add public or private network and configuration.


Solution

  • Vagrant-lbvirt creates a virtual network in libvirt for managing VMs. Its default name is vagrant-libvirt and by default uses IP in range 192.168.121.0/24.

    The name and address used by this network are configurable at the provider level.

    management_network_name - Name of libvirt network to which all VMs will be connected. If not specified the default is 'vagrant-libvirt'.

    management_network_address - Address of network to which all VMs will be connected. Must include the address and subnet mask. If not specified the default is '192.168.121.0/24'.

    management_network_guest_ipv6 - Enable or disable guest-to-guest IPv6 communication.

    Read more here https://github.com/pradels/vagrant-libvirt#management-network .