diff --git a/lib/fog/compute/models/libvirt/server.rb b/lib/fog/compute/models/libvirt/server.rb index 4dbd1abf7..c3b02c4a4 100644 --- a/lib/fog/compute/models/libvirt/server.rb +++ b/lib/fog/compute/models/libvirt/server.rb @@ -291,6 +291,9 @@ module Fog # or local execute arp -an to get the ip (as a last resort) end + # We check if the result is an actual ip-address + # otherwise we return nil + ipaddress=nil unless ipaddress=~/^(\d{1,3}\.){3}\d{1,3}$/ return { :public => [ipaddress], :private => [ipaddress]} end