diff --git a/lib/vagrant/machine/remote.rb b/lib/vagrant/machine/remote.rb index dbab0149e..88a6f5b12 100644 --- a/lib/vagrant/machine/remote.rb +++ b/lib/vagrant/machine/remote.rb @@ -194,16 +194,11 @@ module Vagrant end def communicate - # TODO: this should be communicating with the client.communicate - if !@communicator - requested = @config.vm.communicator - requested ||= :ssh - klass = Vagrant.plugin("2").manager.communicators[requested] - raise Errors::CommunicatorNotFound, comm: requested.to_s if !klass - @communicator = klass.new(self) + @logger.debug("Getting communicator from client") + if !@communicate + @communicate = Vagrant::Plugin::V2::Communicator.new(self) end - - @communicator + @communicate end def guest diff --git a/plugins/commands/serve/client/target.rb b/plugins/commands/serve/client/target.rb index 8f0ea73f4..ef0d99120 100644 --- a/plugins/commands/serve/client/target.rb +++ b/plugins/commands/serve/client/target.rb @@ -22,9 +22,10 @@ module VagrantPlugins SDK::Ref::Target.new(resource_id: resource_id) end - # @return [Communicator] - # TODO: Implement + # @return [Client::Communicator] def communicate + comm_raw = client.communicate(Empty.new) + Communicator.load(comm_raw, broker: @broker) end # @return [Pathname] target specific data directory