You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
TL;DR: Can I influence the DHCP leasetime for the network created by vagrant-libvirt?
When using vagrant-libvirt on e.g. a laptop, the VM's IP addresses might change if you put the laptop to sleep/suspend and wake it up again. Apparently, the DHCP lease time is only 1 hour, so after that the IPs might change.
In my case it is not possible to set static IPs, so I would like to increase the DHCP lease time to e.g. 24h or even 1 week.
Although there are some DHCP-related options for private networks, there is nothing regarding the leasetime.
A sample Vagrantfile without the network options might look like this:
Vagrant.configure("2") do |config|
# name the VMs
config.vm.define "leap155" do |node|
# which image to use
node.vm.box = "opensuse/Leap-15.5.x86_64"
# disable synced folders
node.vm.synced_folder ".", "/vagrant", disabled: true
# sizing of the VMs
node.vm.provider "libvirt" do |lv|
lv.random_hostname = false
lv.memory = 2048
lv.cpus = 2
end
# set the hostname
node.vm.hostname = "leap155"
end # config.vm.define nodes
end
This results in a new network vagrant-libvirt being created whose xml looks like this:
its currently not implemented. I think it would be pretty straight forward to implement, the closest thing is to look at the old "bootp" related commits for what has to be changed:
both the network generation code and the template must be adopted:
Is your feature request related to a problem? Please describe.
TL;DR: Can I influence the DHCP leasetime for the network created by vagrant-libvirt?
When using vagrant-libvirt on e.g. a laptop, the VM's IP addresses might change if you put the laptop to sleep/suspend and wake it up again. Apparently, the DHCP lease time is only 1 hour, so after that the IPs might change.
In my case it is not possible to set static IPs, so I would like to increase the DHCP lease time to e.g. 24h or even 1 week.
Describe the solution you'd like
Apparently one can set lots of things on private networks, but not for the public network.
https://vagrant-libvirt.github.io/vagrant-libvirt/configuration.html#private-network-options
https://vagrant-libvirt.github.io/vagrant-libvirt/configuration.html#public-network-options
Although there are some DHCP-related options for private networks, there is nothing regarding the leasetime.
A sample Vagrantfile without the network options might look like this:
This results in a new network
vagrant-libvirt
being created whose xml looks like this:All it would need is one line inside the
<range>
according to the libvirt documentation.The text was updated successfully, but these errors were encountered: