Description
I created Ubuntu VM on Windows by following Hyper-V Quick Create (https://blogs.windows.com/buildingapps/2018/09/17/run-ubuntu-virtual-machines-made-even-easier-with-hyper-v-quick-create/).
Connection from Hyper-V terminal works great (including enhanced session). But I cannot establish RDP connection to this VM from neither another box nor from host.
Both desktops can ping Ubuntu VM.
I wonder whether xrdp gets special configuration to work with Hyper-V out of the box. And as a result it doesn't accept standard RDP connections.
Message box:
[Window Title]
Remote Desktop Connection
[Content]
Remote Desktop can’t connect to the remote computer for one of these reasons:
- Remote access to the server is not enabled
- The remote computer is turned off
- The remote computer is not available on the network
Make sure the remote computer is turned on and connected to the network, and that remote access is enabled.
[OK] [Help]
Activity
nelsonjchen commentedon Nov 29, 2018
Did you set a password in the install step for the user account?
zakimaksyutov commentedon Nov 29, 2018
Yes, my Ubuntu VM has a user account with a password (I think I was asked at some point during Hyper-V Quick Create flow).
njonesnMSFT commentedon Jan 22, 2019
Hi. Did you solve this as we are experiencing exactly the same issue. Thanks.
njonesnMSFT commentedon Jan 22, 2019
Hi. Did you solve this as we are experiencing exactly the same issue. Thanks.
jwgmeligmeyling commentedon Feb 5, 2019
I don't think this is an issue with xrdp, but instead how xrdp is configured within the Ubuntu image from Hyper-V. I encounter the same issue: after enabling RemoteFX for the VM, even connecting through the Hyper-V Managers goes through xrdp (as made obvious by the login screen), but I just can't connect using an RDP client, not from the host but also not from any other computer in my network. From
netstat -l
It seems xrdp isn't listening on the 3389 socket. I think this may be because the Ubuntu installed with Hyper-V setsuse_vsock=true
andsecurity_layer=rdp
. Changing these properties however does not fix the problem with regard to connecting other RDP clients and only seems to break the Hyper-V connectivity... Probably one step closer, but it seems something else has to be done too.jackmcdowell commentedon Feb 13, 2019
FYI this post here: https://c-nergy.be/blog/?p=12429 seems to indicate that it's possible to enable network access while losing enhanced mode. Frankly I don't see the use of enhanced mode if I have to RDP into the server hosting the ubuntu VM and then remote into that again...
I thought the whole idea of this setup was to allow us to remote into Ubuntu w/o going though VNC or some other slow protocol.
Anyway, haven't tested that "fix" yet.
jwgmeligmeyling commentedon Feb 13, 2019
Hmm, so that blogpost has the same observation as I had. Now Im wondering: does xrdp even support RemoteFX without going through vsocks?
cwilhit commentedon Feb 19, 2019
See #1124, microsoft/linux-vm-tools#31. Reconfiguring xrdp and restarting the service should allow you to have a tcp connection or vsock connection, but not both.
That issue contains a hyperlink to a a prototype branch that include support for both, though.
burdiuz commentedon Aug 14, 2019
I was able to connect once I stopped selecting option to automatically sign in. On both 18 and 19 versions of Ubuntu.
jlenos commentedon Sep 5, 2019
Thanks @burdiuz ! Your solution worked for me.
jwgmeligmeyling commentedon Sep 5, 2019
Where is this option? In Hyper-V or the xrdp config file?
jlenos commentedon Sep 5, 2019
This option was presented on the initial setup of Ubuntu when defining the machine and user/password in the Ubuntu setup GUI
leonmeijer commentedon Sep 5, 2019
If you click on the Power button top-right, expand your user name, go to Account Settings, you will see the Automatic Login checkbox.
FERViborg commentedon Nov 30, 2019
I also needed to restart after changing the setting.
20 remaining items