Windows 10: A guide how to run Ubuntu 18.04 in Enhanced Mode in Hyper-V

Page 1 of 4 123 ... LastLast
  1.    31 Mar 2018 #1

    A guide how to run Ubuntu 18.04 in Enhanced Mode in Hyper-V


    Here is a quick guide how to run ubuntu 18.04 in enhanced mode in Hyper-V.

    EDIT: This has now been modified for release version.

    Please guys, do not add any comments about Virtualbox or VMware being better. Start a new thread if you wish to discuss that. The aim here is to get constructive comments about the Hyper-V mode that can be fed back to developers. I will ask @Brink to remove any such irrelevant comments.

    It is actually quite easy to do.

    Note: It will only work on 1803 (or Skip Ahead I believe). It will not work on FCU 1709.


    It is based on this blog, but there are a couple of differences as that was based on 16.04

    Sneak Peek: Taking a Spin with Enhanced Linux VMs | Virtualization Blog

    Running in enhanced mode allows you to :-

    a) resize screens

    b) cut and paste text from host and vice versa

    c) access native wndows drives

    I cannot guarantee this works if the RDP default port of 3389 is changed, or if using 3rd party firewalls.

    Steps are as follows:-

    1) Install Ubuntu


    Download Ubuntu 18.04 iso, and install it in hyper-V as generation 1 vm. I will assume install is named Ubuntu - you need name in Step 4


    http://releases.ubuntu.com/18.04/ubu...ktop-amd64.iso


    Be patient installing - it is very slow, even with minimal install!

    -----------------------------------------------------------------------------------------

    2) Modify ubuntu 18.04 to use xrdp


    Code:
    #Get the scripts from GitHub
    
    $ sudo apt-get update
    
    $ sudo apt install git
    
    
    $ git clone https://github.com/jterry75/xrdp-init.git ~/xrdp-init
    
    #Make the scripts executable and run them...
    
    $ cd ~/xrdp-init/ubuntu/18.04/

    Now we need to edit install.sh and comment out two lines

    Click image for larger version. 

Name:	h1.PNG 
Views:	125 
Size:	5.6 KB 
ID:	186854

    edit it and add # in front of the two rmmod commands as so:-

    Click image for larger version. 

Name:	image.png 
Views:	125 
Size:	5.1 KB 
ID:	186856


    Code:
    $ sudo chmod +x install.sh
    
    $ sudo ./install.sh
    
    $ reboot

    Code:
    #Run script again to finish setting up VM
    
    $ cd ~/xrdp-init/ubuntu/18.04/
    
    $ sudo ./install.sh
    Shutdown Ubuntu VM.

    ----------------------------------------------------------------------------------------

    3) Register Ubuntu session

    Run this command on host PC using powershell with admin rights

    Code:
    Set-VM -VMName Ubuntu -EnhancedSessionTransportType HvSocket
    (change vmname as appropriate from Step 1). Put name in double quotes if spaces in name.

    ------------------------------------------------------------------------------------------

    4) Start in Enhanced Mode

    Restart VM, and you the get the familiar enhanced mode screen

    Important:- UNCHECK Printers in local resources. There is a bug at the moment and if you leave it checked, you cannot see host drives you select.



    If you forget, close down VM AND the VMCONNECT SESSION - do not restart same VMCONNECT session or else the enhanced mode screen does not pop up.

    ------------------------------------------------------------------------------------------------

    5) Login to XRDP

    You will then get the xrdp login screen, and enter username - must be lowercase.

    It will now run it in enhanced mode.

    Cut and Paste works now.

    Shared Host Drives are now visible
    Attached Thumbnails Attached Thumbnails image.png  
    Last edited by cereberus; 08 May 2018 at 09:51.
      My ComputerSystem Spec

  2.    31 Mar 2018 #2

    Hi there
    @cereberus Thanks !!!

    Just a note to people installing Ubuntu 18.XX

    Ubuntu 18.04 LTS Release Date and New Features

    LTS date for 18.04 is now out (Apr 26) so people might want to hold off building a "Daily use" type VM until then.

    Otherwise thanks for great tutorial.

    Cheers
    jimbo
      My ComputerSystem Spec

  3.    28 Apr 2018 #3

    Ubuntu 18.04 now officially released. Initial post edited.

    http://releases.ubuntu.com/18.04/ubu...ktop-amd64.iso
      My ComputerSystem Spec

  4.    06 May 2018 #4

    I have now fixed the procedure for the release version. It needed an additional file to be edited.
      My ComputerSystem Spec


  5. Posts : 69
    Windows 10 Pro, Ubuntu 16.04 LTS
       07 May 2018 #5

    hi Cereberus,

    great! unfortunately I'm stuck with my ("heavily customised") 16.04 as Canonical announced they will only provide distribution updates from July 26.

    impatiently waiting... [emoji53]
      My ComputersSystem Spec

  6.    07 May 2018 #6

    GalaxyGe said: View Post
    hi Cereberus,

    great! unfortunately I'm stuck with my ("heavily customised") 16.04 as Canonical announced they will only provide distribution updates from July 26.

    impatiently waiting... [emoji53]
    Use the link "Sneak Peek....". That works fine for 16.04 in meantime.
      My ComputerSystem Spec

  7.    07 May 2018 #7

    cereberus said: View Post
    I have now fixed the procedure for the release version. It needed an additional file to be edited.
    What is the additional file that needs to be edited, haven't you forgotten to add it (I couldn't notice any differences from the previous version of this tutorial)?

    Another question: after Enhanced Mode dialog (where I un-check printers), "Login to Ubuntu" dialog opens up with a choice of Session types: Xorg, X11rdp, Xvnc, console, vnc-any, sesman-any, and neutrinordp-any.
    Which Session should I chose?

    If I select Xorg and enter my Ubuntu login, I the "Login to Ubuntu" dialog disappears and, at first, I am left with empty blue screen (with no Ubuntu UI). A minute or two later, I get a message box with an error:
    connecting to sesman ip 127.0.0.1 port 3350
    sesman connected ok
    sending login info to session manager, please wait...
    login succeeded for display 10
    started connecting
    connection problem, giving up
    some problem

    Occasionally, after entering my Ubuntu login with Xorg session, I get a dialog with an error message "The session was disconnected, try connecting again" and two buttons "Reconnect" and "Exit"... The text in the middle of the black VM window says "Video remoting was disconnected".

    Thank you for your help,
    Boris
    Last edited by bsergeev; 07 May 2018 at 16:16.
      My ComputerSystem Spec

  8.    08 May 2018 #8

    bsergeev said: View Post
    What is the additional file that needs to be edited, haven't you forgotten to add it (I couldn't notice any differences from the previous version of this tutorial)?

    Another question: after Enhanced Mode dialog (where I un-check printers), "Login to Ubuntu" dialog opens up with a choice of Session types: Xorg, X11rdp, Xvnc, console, vnc-any, sesman-any, and neutrinordp-any.
    Which Session should I chose?

    If I select Xorg and enter my Ubuntu login, I the "Login to Ubuntu" dialog disappears and, at first, I am left with empty blue screen (with no Ubuntu UI). A minute or two later, I get a message box with an error:
    connecting to sesman ip 127.0.0.1 port 3350
    sesman connected ok
    sending login info to session manager, please wait...
    login succeeded for display 10
    started connecting
    connection problem, giving up
    some problem

    Occasionally, after entering my Ubuntu login with Xorg session, I get a dialog with an error message "The session was disconnected, try connecting again" and two buttons "Reconnect" and "Exit"... The text in the middle of the black VM window says "Video remoting was disconnected".

    Thank you for your help,
    Boris
    The extra step is to edit install.sh

    You use xorg

    Re. other issues, I cannot say. It works fine for me.
    I am puzzled about the 3350 port. The default rdp port is 3389. Have you changed it - if so maybe a firewall issue?
      My ComputerSystem Spec

  9.    08 May 2018 #9

    Does not work on WIndows 1709


    I followed the instructions but step 3 failed:

    Code:
    Set-VM -VMName Ubuntu -EnhancedSessionTransportType HvSocket
    The response:
    Set-VM : A parameter cannot be found that matches parameter name 'EnhancedSessionTransportType'.At line:1 char:23+ Set-VM -VMName Ubuntu -EnhancedSessionTransportType HvSocket+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (:) [Set-VM], ParameterBindingException + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.HyperV.PowerShell.Commands.SetVM
    Code:
    Help Set-VM
    does not show any option -EnhancedSessionTransportType.

    Any clues? Thanks.
    edit: then I saw at the beginning of the thread this does not work on Windows 10 1709! That's probably the problem.
    Last edited by odevx; 08 May 2018 at 07:32. Reason: Possible cause of the problem
      My ComputerSystem Spec

  10.    08 May 2018 #10

    odevx said: View Post
    I followed the instructions but step 3 failed:

    Code:
    Set-VM -VMName Ubuntu -EnhancedSessionTransportType HvSocket
    The response:


    Code:
    Help Set-VM
    does not show any option -EnhancedSessionTransportType.

    Any clues? Thanks.
    edit: then I saw at the beginning of the thread this does not work on Windows 10 1709! That's probably the problem.
    Yep - need to be on 1803.
      My ComputerSystem Spec


 
Page 1 of 4 123 ... LastLast

Related Threads
I am trying to install Ubuntu 1704 through Hyper V. It seems to go easily until I select the command to go ahead and install Ubuntu. Then things go wrong. I get the following error messages as shown in the attachment. It says that file ...
I have a fresh install of Windows 10 1709 Education N, and using the same image I made a Gen2 VM in Hyper-V. I thought something was off and then I noticed that enhanced mode wasn't on at all, and it is greyed out in the menu. It is enabled in...
How to Turn On or Off Hyper-V Enhanced Session Mode in Windows 10 Hyper-V enables running virtualized computer systems on top of a physical host. These virtualized systems (aka: guests) can be used and managed just as if they were physical...
When I moved to WIndows 10 both Edge and IE works fine. But recently, Edge started to falling apart. It crashes with a message and the display is too short that I don't even have enough time reading it before Edge close itself. Since I still have IE...
Enhanced Session Mode in Virtualization
I have Windows 10 Build 10041 and created a VM in Hyper-V using a Windows XP SP3 iso. After initial setup, Windows XP is missing many drivers, including network so I can't copy driver files to the VM. Is there a way to enable usb support or...
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 01:26.
Find Us