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"
|
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
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"provider" : "libvirt",
|
"provider" : "libvirt",
|
||||||
"format" : "qcow2",
|
"format" : "qcow2",
|
||||||
"virtual_size" : 40
|
"virtual_size" : 16
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user