Module: Docka::MachineDrivers::Virtualbox

Defined in:
lib/docka/machine_drivers/virtualbox.rb

Instance Method Summary collapse

Instance Method Details

#host_ipObject



3
4
5
6
7
8
# File 'lib/docka/machine_drivers/virtualbox.rb', line 3

def host_ip
  @host_ip ||= begin
    network = @app.shell!(%( VBoxManage showvminfo #{name} --machinereadable | grep hostonlyadapter | cut -d '"' -f2 ), raise: true).first.strip
    @app.shell!(%( VBoxManage list hostonlyifs | grep '^Name:.*#{network}' -A 3 | grep IPAddress | cut -d ':' -f2 | xargs )).first.strip
  end
end

#no_share_optionObject



10
11
12
# File 'lib/docka/machine_drivers/virtualbox.rb', line 10

def no_share_option
  '--virtualbox-no-share'
end