Skip to content

Cannot establish RDP connection to Ubuntu VM made with Hyper-V Quick Create #1260

Open
@zakimaksyutov

Description

@zakimaksyutov

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:

  1. Remote access to the server is not enabled
  2. The remote computer is turned off
  3. 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

nelsonjchen commented on Nov 29, 2018

@nelsonjchen

Did you set a password in the install step for the user account?

zakimaksyutov

zakimaksyutov commented on Nov 29, 2018

@zakimaksyutov
Author

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

njonesnMSFT commented on Jan 22, 2019

@njonesnMSFT

Hi. Did you solve this as we are experiencing exactly the same issue. Thanks.

njonesnMSFT

njonesnMSFT commented on Jan 22, 2019

@njonesnMSFT

Hi. Did you solve this as we are experiencing exactly the same issue. Thanks.

jwgmeligmeyling

jwgmeligmeyling commented on Feb 5, 2019

@jwgmeligmeyling

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 sets use_vsock=true and security_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

jackmcdowell commented on Feb 13, 2019

@jackmcdowell

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

jwgmeligmeyling commented on Feb 13, 2019

@jwgmeligmeyling

Hmm, so that blogpost has the same observation as I had. Now Im wondering: does xrdp even support RemoteFX without going through vsocks?

cwilhit

cwilhit commented on Feb 19, 2019

@cwilhit

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

burdiuz commented on Aug 14, 2019

@burdiuz

I was able to connect once I stopped selecting option to automatically sign in. On both 18 and 19 versions of Ubuntu.

jlenos

jlenos commented on Sep 5, 2019

@jlenos

Thanks @burdiuz ! Your solution worked for me.

jwgmeligmeyling

jwgmeligmeyling commented on Sep 5, 2019

@jwgmeligmeyling

I was able to connect once I stopped selecting option to automatically sign in

Where is this option? In Hyper-V or the xrdp config file?

jlenos

jlenos commented on Sep 5, 2019

@jlenos

This option was presented on the initial setup of Ubuntu when defining the machine and user/password in the Ubuntu setup GUI

leonmeijer

leonmeijer commented on Sep 5, 2019

@leonmeijer

I was able to connect once I stopped selecting option to automatically sign in

Where is this option? In Hyper-V or the xrdp config file?

This option was presented on the initial setup of Ubuntu when defining the machine and user/password in the GUI

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

FERViborg commented on Nov 30, 2019

@FERViborg

I was able to connect once I stopped selecting option to automatically sign in. On both 18 and 19 versions of Ubuntu.

I also needed to restart after changing the setting.

20 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Cannot establish RDP connection to Ubuntu VM made with Hyper-V Quick Create · Issue #1260 · neutrinolabs/xrdp
      Can't support this form
      To protect your security while using Google Translate, please do not submit information in this type of form.
      Got itGo to original URL