mirror of
https://github.com/hashicorp/vagrant.git
synced 2026-05-28 04:36:05 -04:00
Setup guest client when initializing guest
This commit is contained in:
parent
8efc8542b7
commit
7a5d045083
2 changed files with 4 additions and 9 deletions
|
|
@ -12,9 +12,8 @@ module Vagrant
|
|||
end
|
||||
|
||||
def initialize(machine, guests, capabilities)
|
||||
@capabilities = capabilities
|
||||
@guests = guests
|
||||
@machine = machine
|
||||
@machine = machine
|
||||
@client = machine.client.guest
|
||||
@logger = Log4r::Logger.new("vagrant::guest")
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -48,10 +48,6 @@ module Vagrant
|
|||
@config = config
|
||||
@data_dir = @client.data_dir
|
||||
@vagrantfile = vagrantfile
|
||||
@guest = Guest.new(
|
||||
self,
|
||||
Vagrant.plugin("2").manager.guests,
|
||||
Vagrant.plugin("2").manager.guest_capabilities)
|
||||
@name = name
|
||||
@ui_mutex = Mutex.new
|
||||
@state_mutex = Mutex.new
|
||||
|
|
@ -217,8 +213,8 @@ module Vagrant
|
|||
|
||||
def guest
|
||||
raise Errors::MachineGuestNotReady if !communicate.ready?
|
||||
if @guest.client.nil?
|
||||
@guest.client = client.guest
|
||||
if !@guest
|
||||
@guest = Guest.new(self, nil, nil)
|
||||
end
|
||||
@guest
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue