13

My co-worker has an old Mac, and needs to test something on Windows. His Mac is not powerful enough to run a VM, so he needs the ones I have. I have a few VMs that fit his needs.
The solution I thought of was for me to host the VMs, and for him to connect to them through RDP. If you have a simpler solutions, I'm all ears. And no, we don't (yet) have a local server to run the VMs on in headless mode (that would be perfect).

I use VirtualBox 4.2.12, hosted on Windows 7 Pro. The VM I'm using are downloaded from http://www.modern.ie; right now I'm trying with Windows 7 Enterprise.
The VirtualBox addons are installed on the guest OS; I even have reinstalled them, just in case.

In the config of the VM, in the Display/Remote Access tab, I have checked "Enable the server", port 3390, no authentication, allow multiple connections. I have also tried with various random ports, with the same result

In the Network tab, I have tried NAT and bridge:

  • When I use "NAT", when I try to connect to m.y.i.p:3390 using mstsc, I get a message: Your computer could not connect to another console session on the remote computer because you already have a console session in progress. I can't find much on this error on Google, and anything I found didn't work, like here.
  • When I use "bridge", I get a classic message when you try to connect to a computer that doesn't exist or has RDP disabled, using the VM's IP, even though I have disabled the firewall in the VM.

The firewall has been disabled on both the guest and the host OS.

Do you have any idea on how I can get a remote access into these VMs ?

Thanks

4
  • Try another port number? Check your Firewall?
    – David
    Commented Jun 18, 2013 at 14:51
  • I tried other ports, and I have disabled the firewall on both the host and the guest OS.
    – thomasb
    Commented Jun 18, 2013 at 15:03
  • @thomasbtv: Have you tried using the VM hostname instead of IP address?
    – James P
    Commented Jun 19, 2013 at 8:33
  • My issue was an older version of the Extension Pack was installed; it was disabled without any error message showing when the VM started. Here's how to update: forums.virtualbox.org/viewtopic.php?f=7&t=44337
    – user423430
    Commented Apr 7, 2017 at 3:28

3 Answers 3

20

I have found a not-very-friendly-but-works solution:

In the VM's settings:

  • Set the RDP port to anything (it works with 5030)
  • Set the network access to NAT
  • Go to Network > Advanced > Port redirection, add the following line:
    RDP ; TCP ; host's IP ; 5030 ; 10.0.2.15 ; 3389

The host's IP must be the actual host's IP if you want to connect with another computer, or 127.0.0.1 if you want to connect on the host computer.

My VMs all seem to have 10.0.2.15 as IPs, but maybe that's a coincidence. Check that, if it doesn't work.

On the guest OS, check that RDP is enabled: on Win7, right click computer > properties > Remote settings (on the left panel) > Allow connections (I used the "less secure" one)

The VMs downloaded on modern.ie have an "auto-logon" feature that's nice in general, but annoying in this scenario (they might prevent you from logging in). On Win7, run "netplwiz" and check "Users must enter a user name and password". The password of the user can be found here (it's Passw0rd!)

4
  • Also ensure that the firewall on your Windows guest is disabled. You can do this by executing the following in a Command Prompt or PowerShell session: netsh advfirewall set allprofiles state off. Commented Nov 2, 2014 at 19:48
  • Make sure to enable RDP on the guest! If you don't you will get a nasty "connection refused by host"
    – phil
    Commented Dec 3, 2014 at 17:41
  • ..and watch out for anything that disables it, like Avast/AVG installs.
    – mckenzm
    Commented Jul 4, 2019 at 1:36
  • You can omit the host IP (10.0.2.15). It will be auto-detected.
    – rustyx
    Commented Oct 9, 2022 at 10:29
3

The above answer (by cosmo0) should solve the problem, except if you need authenticated connection. For authentication, choose external in VM Settings > Display > Remote Display > Authentication Method. Then in RDP client, press Show Options and tick Allow me to save credentials. Press connect and it should prompt you with loging/password dialog.


If it doesn't work for you, then create RDP user as follows. Locate VBoxManage.exe command line tool (in my case it was inC:\Program Files\Oracle\VirtualBox\) and perform following commands while VM is off:

VBoxManage internalcommands passwordhash "your_password"

you will get a hash here. Copy it. Then continue with:

VBoxManage setproperty vrdeauthlibrary "VBoxAuthSimple"
VBoxManage modifyvm "your_VM_name" --vrdeauthtype external
VBoxManage setextradata "your_VM_name" "VBoxAuthSimple/users/your_username"
your_hash

This way your create an RDP user that should work. NOTE, this user is NOT related to any existing users in guest or host os, its for VirtualBox only.

1

This should work without running a server on the VM. It is VirtualBox's server you are connecting to.

It should not be necessary to start headless.

Do use a different port of you have enabled RDP to your "client". Do allow multiple screens.

1
  • I did not think this through, the OP wants to RDP, so it would be similar to SSH, and the VM is actually the listener.
    – mckenzm
    Commented Feb 16, 2021 at 18:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .