mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
Merge pull request #356 from dcbw/dcbw/fix-vm-ip-multiple-leases
Fix retrieving VM IP address if there are multiple leases for the same VM
This commit is contained in:
commit
d107b899c8
@ -34,7 +34,9 @@ module VagrantPlugins
|
||||
ip_address = nil
|
||||
domain.wait_for(2) {
|
||||
addresses.each_pair do |type, ip|
|
||||
ip_address = ip[0] if ip[0] != nil
|
||||
# Multiple leases are separated with a newline, return only
|
||||
# the most recent address
|
||||
ip_address = ip[0].split("\n").first if ip[0] != nil
|
||||
end
|
||||
ip_address != nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user