mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
commit
8565655640
2
example_box/Vagrantfile
vendored
2
example_box/Vagrantfile
vendored
@ -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
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"provider" : "libvirt",
|
||||
"format" : "qcow2",
|
||||
"virtual_size" : 40
|
||||
"virtual_size" : 16
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user