diff --git a/lib/vagrant-lxc/driver.rb b/lib/vagrant-lxc/driver.rb index fb52db8..3c43e64 100644 --- a/lib/vagrant-lxc/driver.rb +++ b/lib/vagrant-lxc/driver.rb @@ -105,22 +105,6 @@ module Vagrant end def assigned_ip - ip = '' - retryable(:on => LXC::Errors::ExecuteError, :tries => 10, :sleep => 3) do - unless ip = get_container_ip_from_ip_addr - # retry - raise LXC::Errors::ExecuteError, :command => "lxc-attach" - end - end - ip - end - - # From: https://github.com/lxc/lxc/blob/staging/src/python-lxc/lxc/__init__.py#L371-L385 - def get_container_ip_from_ip_addr - output = @cli.attach '/sbin/ip', '-4', 'addr', 'show', 'scope', 'global', 'eth0', namespaces: 'network' - if output =~ /^\s+inet ([0-9.]+)\/[0-9]+\s+/ - return $1.to_s - end end protected