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" libvirt.driver = "kvm"
# The name of the server, where libvirtd is running. # The name of the server, where libvirtd is running.
libvirt.host = "localhost" # libvirt.host = "localhost"
# If use ssh tunnel to connect to Libvirt. # If use ssh tunnel to connect to Libvirt.
libvirt.connect_via_ssh = false libvirt.connect_via_ssh = false

View File

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

View File

@ -41,16 +41,14 @@ module VagrantPlugins
# @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 end
s.addr.last s.addr.last
end end
end end
# Returns the IP address of the guest # Returns the IP address of the guest
# #
# @param [Machine] machine # @param [Machine] machine

View File

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