0

FYI, I have installed the 22.04.1 LTS version from https://kubuntu.org/getkubuntu/.

The funny thing is that I can connect to my VM from within the VM using KRDP so I have confirmed that remote desktop is enabled. However, using the IP address of the VM I cannot RDP into it from the Windows 10 host. I have tried "ping IPADDR" from the host which works so it is certainly reachable from Windows 10. The main reason that I want to do this is that some important features such as copy paste between the VM and my host and the ability to use my entire screen don't exist using the hyper-V interface. I've read that the only way to have those types of features is to start my VM via hyper-v manager and then RDP to it from Windows 10.

If it helps, I'm also using the Default switch in the hyper-v network adapter settings, and without the Enable Virtual LAN ID option checked.

I have also noticed that the network configuration shows that the KUBuntu VM is on a different subnet which is interesting. I read an article suggesting that the host and guest must be on the same subnet, but I'm not sure how with hyper-v to manually configure the network. I'm guessing this is more of a network configuration issue and that using the default switch in hyper-v won't work.

3
  • Did you install XRDP on the Ubuntu System
    – John
    Dec 17, 2022 at 22:33
  • I have KRDC which I thought was for configuring remote access. The KRDC GUI shows me the host name and IP address that is supposedly available.
    – shawn1874
    Dec 17, 2022 at 22:46
  • I am not sure of the differences between XRDP and KRDC. Did you try an External network for the Hyper-V guest? You would need to add the external network and change the network type in the guest.
    – John
    Dec 17, 2022 at 22:59

1 Answer 1

0

I think you need XRDP (I am using XRDP and it works). I am fairly sure you need or would benefit from an External Switch (e.g. 192.168.x.y on your network)

I added the External Switch, set my Linux system to use this.

Hyper-V External Switch

I installed XRDP in Linux: sudo apt-get install xrdp

I restarted Linux.

Then I used: sudo systemctl start xrdp and then checked with sudo systemctl status xrdp .

I logged out of the Guest machine (RDP will log out the current user of a Windows machine but apparently not of a Linux machine.

I started Windows (11) Remote Desktop Connection, put in the Guest IP address and it connected immediately.

Hyper V guest access with Windows RDP

.

I did have to ensure the service was running in Linux (xrdp in my case). Try xrdp

Also make sure you log out of (not turn off) the Guest machine and that xrdp was started first.

Then attach with Windows RDP

This is working properly for Ubuntu and for Kali Linux

Summary:

  1. Add an External Switch in Hyper-V.
  2. With Guest OFF, change the network connection to External Switch.
  3. Start the Guest Machine and install xrdp in the Guest machine.
  4. Start the xrdp service: sudo systemctl start xrdp . Check with status.
  5. Log out of (not power off) Guest machine.
  6. Open Windows RDP and connect with IP address.
8
  • Interesting. I'd like to ask for a follow up then. Was the external switch manually configured on guest and host or did you use DHCP? What's the difference between setting up an internal vs external switch? I might have screwed up my network config on the Linux VM in the process of troubleshooting so I am not sure if I need to manually configure it or if I should be trying to setup DHCP to work.
    – shawn1874
    Dec 18, 2022 at 0:16
  • You have to log out of your Guest machine (RDP this way will not log the Guest out automatically) I spun up an Ubuntu 22.04 machine, installed xrdp, started it and logged in. I am there now. My external switch gets an IP from my network router which hand out IP addresses by DHCP. . Remove the external switch (Hyper-V) and restart Hyper-V. Then add an External Switch. I called mine New External Switch. Then turn your guest OFF, change the network (Hyper-V) to New External Switch, and start the guest. Be sure to start the xrdp service.. As noted - working here.
    – John
    Dec 18, 2022 at 0:24
  • I added details of the External Switch to my answer
    – John
    Dec 18, 2022 at 0:35
  • Also make sure HHyper-V (all features), Virtual Machine Platform and Windows Hypervisor Platform are enabled in Programs and Features, Windows Features. Make sure Windows is right up to date.
    – John
    Dec 18, 2022 at 0:43
  • Anecdotally , I have a VMware Host machine and a Hyper-V host machine. I used Hyper-V for the above and tried VMware as well and it works.
    – John
    Dec 18, 2022 at 1:02

You must log in to answer this question.

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