Vagrant RDP => Windows2012R2 | 我如何 rdp 进入我的流浪盒子?

ste*_*ep2 2 virtualbox virtual-machine vagrant

?  ~  vagrant rdp
==> default: Detecting RDP info...
    default: Address: 127.0.0.1:3389
    default: Username: vagrant
==> default: Vagrant will now launch your RDP client with the connection parameters
==> default: above. If the connection fails, verify that the information above is
==> default: correct. Additionally, make sure the RDP server is configured and  
==> default: running in the guest machine (it is disabled by default on Windows).
==> default: Also, verify that the firewall is open to allow RDP connections.
Run Code Online (Sandbox Code Playgroud)

1

我正在使用 (vagrant box add) mwrock/Windows2012R2 --provider virtualbox

我还缺少什么?我如何 RDP 到我的虚拟机?

Jak*_*ake 5

这是一个老问题,但看看它是如何成为谷歌的最佳结果之一,我将提供一个最近的答案。

测试:

  • 主机:macOS 10.13.6 (High Sierra)
  • 虚拟机:Windows 10 1803 (RS4)
  • 流浪者 2.1.5
  • 微软远程桌面 10.2.1

脚步:

  1. Vagrantfile使用 RDP 转发配置Windows VM:

    config.vm.guest = :windows
    config.vm.communicator = "winrm"
    config.vm.network "forwarded_port", guest: 3389, host: 3389
    
    Run Code Online (Sandbox Code Playgroud)
  2. 启用远程桌面。在虚拟机中:

    • 开始 > 设置 > 远程桌面 > 启用远程桌面
  3. 安装 RDP 客户端

当您vagrant up应该看到类似于以下内容的内容时:

==> default: Forwarding ports...
  default: 3389 (guest) => 3389 (host) (adapter 1)
Run Code Online (Sandbox Code Playgroud)

然后vagrant rdp应该启动远程桌面并连接到虚拟机。