Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 545
step1step2 Avatar asked Feb 02 '26 16:02

step1step2


1 Answers

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
    • On Mac this would be Microsoft Remote Desktop 10

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.

like image 65
Jake Avatar answered Feb 04 '26 06:02

Jake



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!