简体   繁体   中英

Vagrant RDP => Windows2012R2 | How do I rdp into my vagrant box?

➜  ~  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.

1

I'm using (vagrant box add) mwrock/Windows2012R2 --provider virtualbox

What else am I missing? How do I RDP into my vm?

This is an old question, but seeing as how it's one of the top results in google I'll provide a recent answer.

Tested with:

  • Host: macOS 10.13.6 (High Sierra)
  • VM: Windows 10 1803 (RS4)
  • vagrant 2.1.5
  • Microsoft Remote Desktop 10.2.1

Steps:

  1. Configure Vagrantfile for Windows VM with RDP forwarded:

     config.vm.guest = :windows config.vm.communicator = "winrm" config.vm.network "forwarded_port", guest: 3389, host: 3389
  2. Enable Remote Desktop. In the VM:

    • Start > Settings > Remote Desktop > Enable Remote Desktop
  3. Install an RDP client

When you vagrant up should see something similar to:

==> default: Forwarding ports...
  default: 3389 (guest) => 3389 (host) (adapter 1)

Then vagrant rdp should launch Remote Desktop and connect to the VM.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM