Giter VIP home page Giter VIP logo

Comments (44)

charliebillen avatar charliebillen commented on May 18, 2024 11

@matthewturner does your VM log you in automatically?

I am able to log in to an enhanced session using the Xorg option after disabling automatic login.

from linux-vm-tools.

cwilhit avatar cwilhit commented on May 18, 2024 3

Beta releases of 18.04 had the vwmare module loaded by default, so we had that line included in the script because it must be unloaded in order to load hv_sock. I would like to note that these errors complaining about rmmod failing when a module is not loaded is not fatal. It should still continue to work :)

Nevertheless, we'll remove those lines since they're not needed anymore. We're in the final stages of working with Canonical to get an image pre-configured in our Hyper-V Quick Create gallery, which means users don't even have to mess with manually configuring. Thanks for working with us on this!

from linux-vm-tools.

stijnv1 avatar stijnv1 commented on May 18, 2024 1

Steps I did:

  1. run install.sh with rmmod vsock commented out only
  2. reboot vm
  3. run script again, saw error about vmw_vsock_vmci_transport. Commented out rmmod vmw_vsock_vmci_transport and rerun the script
  4. reboot vm
  5. connected to console of VM, asked me for enhanced session, disabled printer mapping. Used Xorg to logon.

from linux-vm-tools.

dankseman avatar dankseman commented on May 18, 2024 1

from linux-vm-tools.

sregister avatar sregister commented on May 18, 2024 1

Seems like there might be multiple issues at play here.

For whats is worth I also had issues with stock 18.04. After entering credentials afer xrdp login I just got a blank screen. I followed the microsoft blog documentation and decided to run the 16.04/config-user.sh script which I don't think works right on 18.04. I think I tracked it down to ~/.xsession being out of date--calling unity which got replaced by gnome.

I replaced 'unity' on the last line with:
env GNOME_SHELL_SESSION_MODE=ubuntu gnome-session --session=ubuntu

Now I'm able to log in.

from linux-vm-tools.

worthwhileindustries avatar worthwhileindustries commented on May 18, 2024 1

@felipedeveza it's not that difficult to install yourself. Why wait.

from linux-vm-tools.

cwilhit avatar cwilhit commented on May 18, 2024 1

@SidShetye this issue was opened to track generally getting enhanced mode to work with Ubuntu 18.04 release. If you want to track auto-login, I'd recommend following #22 instead.

from linux-vm-tools.

mvirts avatar mvirts commented on May 18, 2024 1

Hi!

Posting because I ended up here trying to get Enhanced mode working.

If you're stuck on an older release of Windows 10 and can't use HvSocket, just configure xrdp to listen on tcp, configure networking (make sure your machine can reach the VM over the network), and connect with Remote Desktop Connection (you can add Drive sharing before you connect).

What worked for me:
On my development laptop...
New Gen2 VM, new VHD, install from ubuntu-20.04.1-desktop-amd64.iso
Create new Virtual Switch, external, sharing my wifi adapter with host (This was problematic, but eventually worked, did it 3 times)
wget https://raw.githubusercontent.com/Microsoft/linux-vm-tools/master/ubuntu/18.04/install.sh
run it (chmod +x install.sh; sudo ./install.sh)
reboot, run again per instructions
Nothing changes, go edit /etc/xrdp/xrdp.ini, change port=tcp://:3389
restart xrdpd
try to login with remote desktop, get a black screen???. Killed gnome session manager and I was logged out of both rdp and vm connection.
[messed with xrdp session and gnome config to no avail, tried a few more times]
stay logged out of my session in Virtual Machine Connection
log in over RDP again, works this time. (Maybe gnome won't allow me to log in twice?)

Matt

from linux-vm-tools.

johnkattenhorn avatar johnkattenhorn commented on May 18, 2024

@dankseman - it almost worked without change for me; I had to comment out

rmmod vsock

in install.sh from the ~/xrdp-init/ubuntu/18.04 directory; ran the script again, rebooted the Hyper-V and then did the usual Set-VM -VMName <virtual machine name> -EnhancedSessionTransportType HvSocket

I did completely shutdown the VM and start and stop the Hyper-V management service as well before I could get it to prompt for Enhanced but I don't remember doing that before.

Still don't get any drives even with printers unchecked like other suggested.

Login Screen is xrdp default but works none the less.

from linux-vm-tools.

dankseman avatar dankseman commented on May 18, 2024

Do you need to run git clone etc or just go straight to install.sh?

from linux-vm-tools.

johnkattenhorn avatar johnkattenhorn commented on May 18, 2024

Yep, I installed git first (but I used git for lots of things) and cloned it into a directory but I think you could just grab the file if you wanted too.

from linux-vm-tools.

dankseman avatar dankseman commented on May 18, 2024

from linux-vm-tools.

dankseman avatar dankseman commented on May 18, 2024

I just saw that about printers. It worked for me on 18.04 beta.

from linux-vm-tools.

johnkattenhorn avatar johnkattenhorn commented on May 18, 2024

No problem - I use this as reference https://www.tenforums.com/virtualization/107147-guide-how-run-ubuntu-18-04-enhanced-mode-hyper-v.html

from linux-vm-tools.

dankseman avatar dankseman commented on May 18, 2024

from linux-vm-tools.

johnkattenhorn avatar johnkattenhorn commented on May 18, 2024

What did you get back from sudo apt install git ?

from linux-vm-tools.

dankseman avatar dankseman commented on May 18, 2024

from linux-vm-tools.

matthewturner avatar matthewturner commented on May 18, 2024

I get a xrdp "Just connecting" screen with a login dialog with several session options (Xorg, X11rdp, Xvnc, console, vnc-any, sesman-any, neutrinordp-any).

If I choose Xorg, the dialog disappears and times out after about 5 mins. If I choose X11rdp, RDP says that it got disconnected and attempts to reconnect.

I've tried removing the line suggested above rmmod vsock and reran the ./install.sh script but it has no effect. Is there any other steps I need to follow?

Thanks!

from linux-vm-tools.

stijnv1 avatar stijnv1 commented on May 18, 2024

I had to comment out both rmmod vsock and rmmod vmw_vsock_vmci_transport in the install.sh script for ubuntu 18.04 to get it working.

from linux-vm-tools.

matthewturner avatar matthewturner commented on May 18, 2024

Thanks @stijnv1. I've tried that but still no luck. Which session should I use? XOrg or X11rdp? And do I need to rebuild the VM or just rerun the script?
Thanks again.

from linux-vm-tools.

dankseman avatar dankseman commented on May 18, 2024

I started from scratch, editing install.sh commenting out the two rmmod lines, got to the end of the setup and got this error:

Job for XRDP service failed because the control process exited with error code.

Amy ideas.

from linux-vm-tools.

matthewturner avatar matthewturner commented on May 18, 2024

Thanks @charliebillen, @stijnv1 and @dankseman.

I had to comment out both lines (rmmod vsock and rmmod vmw_vsock_vmci_transport) and disable automatic login.

The performance isn't quite what I'd hoped but close. Could those two lines affect performance?
Thanks!

from linux-vm-tools.

charliebillen avatar charliebillen commented on May 18, 2024

@matthewturner may be wrong but I don't think they'd affect performance.

My potentially incorrect understanding is that those kernel modules allow communication between VMWare guests and hosts, and are removed and replaced with hv_sock which does the same for Hyper-V guests and hosts.

There is another issue (#28) with reports of slow performance on HiDPI screens. If you're running on your Surface Pro maybe you're seeing the same thing?

from linux-vm-tools.

jterry75 avatar jterry75 commented on May 18, 2024

@matthewturner - vsock is the AF_VSOCK protocol for tcp/ip between virtual machines and any hypervisor. vmw_vsock_vmci_transport is the VMWare implementation of vsock when running on a VMWare hypervisor and hv_sock is the Hyper-V implementation for running on the Windows hypervisor. So the goal is that you are using hv_sock + vsock to enable the Hyper-V socket connections between host/guest.

from linux-vm-tools.

dankseman avatar dankseman commented on May 18, 2024

from linux-vm-tools.

jterry75 avatar jterry75 commented on May 18, 2024

I think he must of just missed it. @cwilhit - Is very much on top of responses in other instances. I will work on getting this script fixed today for release 18.04.

from linux-vm-tools.

dankseman avatar dankseman commented on May 18, 2024

from linux-vm-tools.

cwilhit avatar cwilhit commented on May 18, 2024

Is this a stock 18.04 release .iso you're using from Canonical and did this occur on your first attempt at running the script?

My most recent attempt at running this script was this morning with an .iso from Canonical's website and it ran with no issues. After all, virtual machines are supposed to be reproduceable.

from linux-vm-tools.

dankseman avatar dankseman commented on May 18, 2024

Well, I finally got it working. I restarted from scratch and did full installation rather than the minimal installation as well.

I actually typed all the commands and this time it worked. I do not know if this is relevant but I did the edit to install.sh before the chmod command this time, and I also did initial reboot using reboot command rather than shutting down via Hyper-V Taskbar and restarting.

I copied these from cerberus script on www.tenforums.com

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 edit the install.sh file using whatever editor you like (nano, vi etc)
and comment out these two lines dding a # in front

rmmod vmw_vsock_vmci_ttransport
rmmod vsock

i.e.

#rmmod vmw_vsock_vmci_ttransport
#rmmod vsock

Save file.

$ sudo chmod +x install.sh

$ sudo ./install.sh

Reboot VM

$ reboot

Run script again to finish setting up VM

$ cd ~/xrdp-init/ubuntu/18.04/

$ sudo ./install.sh

Shutdown VM completely (I do this from Hyper-V Taskbar)

On Host Windows, run following powershell command (with admin rights)

Set-VM -VMName Ubuntu -EnhancedSessionTransportType HvSocket

Restart VM to kick in to XRDP

In popup box, deselect printers, and choose which drive you want to see.

Login with xorg, and name, password.

Now it is in enhanced mode.

from linux-vm-tools.

cwilhit avatar cwilhit commented on May 18, 2024

Good to see it is working for you! You do not need to run the 16.04's config-user.sh for 18.04.

from linux-vm-tools.

dankseman avatar dankseman commented on May 18, 2024

from linux-vm-tools.

Ephesos avatar Ephesos commented on May 18, 2024

Any news on this? My quick create gallery isn't showing an Ubuntu option, just Windows 10 dev environment.

from linux-vm-tools.

worthwhileindustries avatar worthwhileindustries commented on May 18, 2024

@Ephesos mine doesn't either. Neither enterprise or professional had it available. I just installed it from the iso and installed this library.

from linux-vm-tools.

cwilhit avatar cwilhit commented on May 18, 2024

Still working through a few things to get the experience we want for the user. When it does go live, we'll post a new update on our blog and I'll tweet it out.

from linux-vm-tools.

felipedeveza avatar felipedeveza commented on May 18, 2024

Waiting anxiously for ubuntu 18.04 on quick start.

from linux-vm-tools.

rob10e avatar rob10e commented on May 18, 2024

@sregister Your solution worked!

from linux-vm-tools.

ajaju avatar ajaju commented on May 18, 2024

Dealt with similar issues as you guys and tried the various remedies suggested here and other places. What worked for me, however, was installing the full version of Ubuntu; I sweated it out with the minimalist version. Someone somewhere said to run the VM on Gen 1 than Gen 2 but i was adamant on running it on Gen 2. The minimalist installation on Gen 2 was apparently missing some important driver/s and/or process/es which i didn't get the time to figure out; i hope someone does so that we get to make it work with the minimalist version.

from linux-vm-tools.

pudknocka avatar pudknocka commented on May 18, 2024

Don't see any shared-drives in the Ubuntu session.
Wonder if there is any issue with Server 2016?
E.g. Powershell doesn't know '-EnhancedSessionTransportType HvSocket',
not sure if that is necessary here.
Other than this, I get full-screen Ubuntu session, through RDP even with convenient auto-login,
but desperate to see my USB drives.

from linux-vm-tools.

dankseman avatar dankseman commented on May 18, 2024

You have to be running normal version 1803 to do this as 1709 does not have the powershell upgrade needed. I am almost certain the same is true of Server 2016.

from linux-vm-tools.

pudknocka avatar pudknocka commented on May 18, 2024

Probably, well just from the MS doc (may 31)
docs.microsoft.com/en-us/windows/desktop/HyperV_v2/msvm-virtualsystemsettingdata
it looks like this parameter is not intended to be added to Server 2016 (maybe not yet)?

How does someone know that he is in EnhancedSessionMode, its just not by getting full-screen and Auto-Login?
I don't see anything in the xrdp.log either.

from linux-vm-tools.

dankseman avatar dankseman commented on May 18, 2024

It just works i.e. you get the xrdp login screen. It will not work with 2016 - you will just get the normal linux login screen.

Also, it does not work if you use linux autologin.

from linux-vm-tools.

pudknocka avatar pudknocka commented on May 18, 2024

@dankseman Don't quite understand whats the difference linux autologin vs RDP autologin could be?
Even the Clipboard mapping works on my system.
Just the shared-drives are missing, so apparently the setting of the transport type to HvSocket is needed.
That much I guess, but for the time being, Server 2016 with Build 14393 doesn't have that feature implemented yet, alas

from linux-vm-tools.

cwilhit avatar cwilhit commented on May 18, 2024

@pudknocka you need to be running a Windows version of 1803 or newer, like a recent Insider build. That means builds 17134+. Versions earlier than this (like 14393) do not have this feature--you'd need to upgrade to get it.

As for your question about knowing you're in enhanced session mode: you'll have to login through an xrdp login, which has a very distinct baby blue background. Alternatively, in a Hyper-V VMConnect window, hovering over the icons in the toolbar you will see an icon that reads either "Basic Session" or "Enhanced Session"

from linux-vm-tools.

SidShetye avatar SidShetye commented on May 18, 2024

@cwilhit why is this issue closed without a fix in the Microsoft VM tools/scripts? As of 10/16/2018, linux auto-login is still kills enhanced sessions upon connecting. This happens on a fresh install and what's worse, the setup wizard happily presents the option to enable auto-login ("It's a trap!").

On a side note, Ubuntu 18.04's memory usage is really bloated, apparently due to Gnome (6.5GB idle at login). Do you support enhanced sessions with other desktop managers? If yes, how?


For others seeing this and this issue broke gnome terminal, you can disable auto-login by "Show applications" (bottom-left) -> Details -> Users -> [Unlock] (top right) -> Automatic Login -> Off

Or if terminal is working, by sudo nano /etc/gdm3/custom.conf and comment out the lines as follows

# Enabling automatic login
#  AutomaticLoginEnable = true
#  AutomaticLogin = your_username_here

from linux-vm-tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.