mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
works
This commit is contained in:
parent
5b1c34ecf5
commit
2525be90bf
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"provider" : "libvirt",
|
"provider" : "libvirt",
|
||||||
"format" : "qcow2",
|
"format" : "qcow2",
|
||||||
"virtual_size" : 40
|
"virtual_size" : 16
|
||||||
}
|
}
|
||||||
|
@ -39,18 +39,16 @@ module VagrantPlugins
|
|||||||
#
|
#
|
||||||
# @param [Machine] machine
|
# @param [Machine] machine
|
||||||
# @return [String]
|
# @return [String]
|
||||||
def read_host_ip(ip)
|
def read_host_ip(ip)
|
||||||
UDPSocket.open do |s|
|
UDPSocket.open do |s|
|
||||||
@logger.info("!!!! ALL IPs #{ip} #{ip.kind_of?(Array)}" )
|
if(ip.kind_of?(Array))
|
||||||
if ip.kind_of?(Array)
|
s.connect(ip.last, 1)
|
||||||
s.connect(ip[0], 1)
|
else
|
||||||
else
|
s.connect(ip, 1)
|
||||||
s.connect(ip, 1)
|
|
||||||
end
|
|
||||||
s.addr.last
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
s.addr.last
|
||||||
|
end
|
||||||
|
end
|
||||||
# Returns the IP address of the guest
|
# Returns the IP address of the guest
|
||||||
#
|
#
|
||||||
# @param [Machine] machine
|
# @param [Machine] machine
|
||||||
|
Loading…
Reference in New Issue
Block a user