commands/rdp: execute propre capabilities
This commit is contained in:
parent
746b568176
commit
0fa07637f9
|
@ -21,6 +21,18 @@ module VagrantPlugins
|
||||||
|
|
||||||
# Execute RDP if we can
|
# Execute RDP if we can
|
||||||
with_target_vms(argv, single_target: true) do |machine|
|
with_target_vms(argv, single_target: true) do |machine|
|
||||||
|
if !machine.communicate.ready?
|
||||||
|
raise Vagrant::Errors::VMNotCreatedError
|
||||||
|
end
|
||||||
|
|
||||||
|
if !machine.guest.capability?(:rdp_info)
|
||||||
|
raise Errors::GuestUnsupported,
|
||||||
|
name: machine.guest.name.to_s
|
||||||
|
end
|
||||||
|
|
||||||
|
@env.host.capability(
|
||||||
|
:rdp_client,
|
||||||
|
machine.guest.capability(:rdp_info))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -6,6 +6,10 @@ module VagrantPlugins
|
||||||
error_namespace("vagrant_rdp.errors")
|
error_namespace("vagrant_rdp.errors")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
class GuestUnsupported < RDPError
|
||||||
|
error_key(:guest_unsupported)
|
||||||
|
end
|
||||||
|
|
||||||
class HostUnsupported < RDPError
|
class HostUnsupported < RDPError
|
||||||
error_key(:host_unsupported)
|
error_key(:host_unsupported)
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,15 @@
|
||||||
en:
|
en:
|
||||||
vagrant_rdp:
|
vagrant_rdp:
|
||||||
errors:
|
errors:
|
||||||
|
guest_unsupported: |-
|
||||||
|
The guest OS detected by Vagrant ('%{name}') is reporting
|
||||||
|
that it does not supported RDP connections. If this is an
|
||||||
|
error, it is because Vagrant does not know how to connect
|
||||||
|
via RDP to this guest.
|
||||||
|
|
||||||
|
Please open an issue documenting how to connect via RDP
|
||||||
|
to this guest OS and we can fix this.
|
||||||
|
|
||||||
host_unsupported: |-
|
host_unsupported: |-
|
||||||
Vagrant doesn't support running an RDP client on your
|
Vagrant doesn't support running an RDP client on your
|
||||||
host OS. Currently only Windows is supported for RDP
|
host OS. Currently only Windows is supported for RDP
|
||||||
|
|
|
@ -950,7 +950,7 @@ en:
|
||||||
taking too long to reboot. First, try reloading your machine with
|
taking too long to reboot. First, try reloading your machine with
|
||||||
`vagrant reload`, since a simple restart sometimes fixes things.
|
`vagrant reload`, since a simple restart sometimes fixes things.
|
||||||
If that doesn't work, destroy your machine and recreate it with
|
If that doesn't work, destroy your machine and recreate it with
|
||||||
a `vagrant destroy` followed by a `1vagrant up`. If that doesn't work,
|
a `vagrant destroy` followed by a `vagrant up`. If that doesn't work,
|
||||||
contact support.
|
contact support.
|
||||||
ssh_connection_timeout: |-
|
ssh_connection_timeout: |-
|
||||||
Vagrant timed out while attempting to connect via SSH. This usually
|
Vagrant timed out while attempting to connect via SSH. This usually
|
||||||
|
|
Loading…
Reference in New Issue