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

Page 1 of 5 123 ... LastLast

  1. Posts : 15,426
    Windows10
       #1

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


    NOTE: This guide has been superseded. Just use Quick Create from Hyper-V, select Ubuntu.


    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

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

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

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


    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 A guide how to run Ubuntu 18.04 in Enhanced Mode in Hyper-V-image.png  
    Last edited by cereberus; 03 Oct 2018 at 01:56.
      My Computer


  2. Posts : 11,247
    Windows / Linux : Arch Linux
       #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 Computer


  3. Posts : 15,426
    Windows10
    Thread Starter
       #3

    Ubuntu 18.04 now officially released. Initial post edited.

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


  4. Posts : 15,426
    Windows10
    Thread Starter
       #4

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


  5. Posts : 70
    Windows 10 Pro, Ubuntu 18.04 LTS
       #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 Computers


  6. Posts : 15,426
    Windows10
    Thread Starter
       #6

    GalaxyGe said:
    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 Computer


  7. Posts : 3
    Windows 10
       #7

    cereberus said:
    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 Computer


  8. Posts : 15,426
    Windows10
    Thread Starter
       #8

    bsergeev said:
    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 Computer


  9. Posts : 2
    Windows 10
       #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 Computer


  10. Posts : 15,426
    Windows10
    Thread Starter
       #10

    odevx said:
    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 Computer


 

  Related Discussions
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 04:08.
Find Us




Windows 10 Forums