Merge pull request #463 from swizzley/master

This works on CentOS 7.1
This commit is contained in:
Dmitry Vasilets 2015-09-24 04:55:55 +02:00
commit 8565655640
4 changed files with 12 additions and 15 deletions

View File

@ -39,7 +39,7 @@ Vagrant.configure("2") do |config|
libvirt.driver = "kvm"
# The name of the server, where libvirtd is running.
libvirt.host = "localhost"
# libvirt.host = "localhost"
# If use ssh tunnel to connect to Libvirt.
libvirt.connect_via_ssh = false

View File

@ -1,5 +1,5 @@
{
"provider" : "libvirt",
"format" : "qcow2",
"virtual_size" : 40
"virtual_size" : 16
}

View File

@ -41,16 +41,14 @@ module VagrantPlugins
# @return [String]
def read_host_ip(ip)
UDPSocket.open do |s|
@logger.info("!!!! ALL IPs #{ip} #{ip.kind_of?(Array)}" )
if ip.kind_of?(Array)
s.connect(ip[0], 1)
if(ip.kind_of?(Array))
s.connect(ip.last, 1)
else
s.connect(ip, 1)
end
s.addr.last
end
end
# Returns the IP address of the guest
#
# @param [Machine] machine

View File

@ -54,8 +54,6 @@ rm -f ~root/${EPEL_PKG}
yum -y install openssh-server openssh-clients sudo \
ruby ruby-devel make gcc rubygems rsync
chkconfig sshd on
gem install puppet
gem install chef
# Users, groups, passwords and sudoers.
@ -118,3 +116,4 @@ rm -f ~root/.bash_history
rm -r "$(gem env gemdir)"/doc/*
yum clean all
halt