Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to initiate connection to libvirt VM (installer cannot connect to VM) #241

Closed
onlineapps-cloud opened this issue Sep 5, 2024 · 8 comments

Comments

@onlineapps-cloud
Copy link

onlineapps-cloud commented Sep 5, 2024

hi, i tried to install software, but installer cannot connect to libvirt VM.
my actions:

$ ./installer.sh 
################################################################################
#                                                                              #
#                            WinApps Install Wizard                            #
#                                                                              #
################################################################################

Q) Install or uninstall WinApps? --> Install
Q) Configure WinApps for the current user 'user' or the whole system? --> Current User
Q) Automatically install supported applications or choose manually? --> Manual (Default)

Installing WinApps.
Checking for existing conflicting WinApps installations... Done!
Attempting to load WinApps configuration file... Done!
Checking whether dependencies are installed... Done!
Checking whether the user 'user' is part of the required groups... Done!
Checking the status of the Windows VM... Done!
Checking for an open RDP Port on Windows... Done!
Attempting to establish a Remote Desktop connection with Windows... Failed!

ERROR: REMOTE DESKTOP PROTOCOL FAILURE.
FreeRDP failed to establish a connection with Windows.
--------------------------------------------------------------------------------
Please view the log at /home/user/.local/share/winapps/FreeRDP_Test_20240905_2041_614540374.log.
Troubleshooting Tips:
  - Ensure the user is logged out of Windows prior to initiating the WinApps installation.
  - Ensure the credentials within the WinApps configuration file are correct.
  - Utilise a new certificate by removing relevant certificate(s) in /home/user/.config/freerdp/server.
  - If using 'libvirt', ensure the Windows VM is correctly named as specified within the README.
  - If using 'libvirt', ensure 'Remote Desktop' is enabled within the Windows VM.
  - If using 'libvirt', ensure you have merged 'RDPApps.reg' into the Windows VM's registry.
  - If using 'libvirt', try logging into and back out of the Windows VM within 'virt-manager' prior to initiating the WinApps installation.
--------------------------------------------------------------------------------
Exiting with status '14'.

error log:

cat /home/user/.local/share/winapps/FreeRDP_Test_20240905_2041_614540374.log
[20:41:19:428] [2:00000003] [WARN][com.freerdp.core.nego] - [nego_process_negotiation_failure]: Error: SSL_NOT_ALLOWED_BY_SERVER
[20:41:19:433] [2:00000003] [WARN][com.freerdp.core.nego] - [nego_process_negotiation_failure]: Error: SSL_NOT_ALLOWED_BY_SERVER
[20:41:19:446] [2:00000003] [WARN][com.freerdp.core.license] - [license_read_binary_blob_data]: license binary blob::type BB_ERROR_BLOB, length=0, skipping.
[20:41:19:838] [2:00000003] [WARN][com.freerdp.client.x11] - [xf_Pointer_get_window]: xf_Pointer: Invalid appWindow
[20:41:19:845] [2:00000003] [WARN][com.freerdp.client.x11] - [xf_Pointer_get_window]: xf_Pointer: Invalid appWindow
[20:41:19:845] [2:00000003] [WARN][com.freerdp.client.x11] - [xf_Pointer_Set]: handle=0
[20:41:19:850] [2:00000003] [WARN][com.freerdp.client.x11] - [xf_Pointer_get_window]: xf_Pointer: Invalid appWindow
[20:41:19:850] [2:00000003] [WARN][com.freerdp.client.x11] - [xf_Pointer_Set]: handle=0
[20:41:19:880] [2:00000003] [WARN][com.freerdp.client.x11] - [xf_Pointer_get_window]: xf_Pointer: Invalid appWindow
[20:41:19:880] [2:00000003] [WARN][com.freerdp.client.x11] - [xf_Pointer_Set]: handle=0
[20:41:19:223] [2:00000003] [WARN][com.freerdp.client.x11] - [xf_Pointer_get_window]: xf_Pointer: Invalid appWindow
[20:41:19:223] [2:00000003] [WARN][com.freerdp.client.x11] - [xf_Pointer_Set]: handle=0
[20:41:21:708] [2:00000022] [WARN][com.freerdp.channels.drdynvc.client] - [check_open_close_receive]: {Microsoft::Windows::RDS::DisplayControl:10} OnOpen=(nil), OnClose=0x7f8c0f350a80
[20:41:32:178] [2:00000003] [WARN][com.freerdp.client.x11] - [xf_Pointer_get_window]: xf_Pointer: Invalid appWindow
[20:41:32:178] [2:00000003] [WARN][com.freerdp.client.x11] - [xf_Pointer_Set]: handle=0
[20:41:44:960] [2:00000003] [ERROR][com.freerdp.core] - [rdp_set_error_info]: ERRINFO_LOGOFF_BY_USER [0x0001000C]
[20:41:44:963] [2:00000022] [WARN][com.freerdp.channels.drdynvc.client] - [check_open_close_receive]: {Microsoft::Windows::RDS::DisplayControl:10} OnOpen=(nil), OnClose=0x7f8c0f350a80
[20:41:19:492] [2:00000003] [INFO][com.freerdp.gdi] - [gdi_init_ex]: Local framebuffer format  PIXEL_FORMAT_BGRA32
[20:41:19:492] [2:00000003] [INFO][com.freerdp.gdi] - [gdi_init_ex]: Remote framebuffer format PIXEL_FORMAT_BGRA32
[20:41:19:497] [2:0000001d] [INFO][com.freerdp.channels.rdpdr.client] - [devman_load_device_service]: Loading device service drive [home] (static)
[20:41:19:497] [2:00000003] [INFO][com.freerdp.channels.rdpsnd.client] - [rdpsnd_load_device_plugin]: [static] Loaded fake backend for rdpsnd
[20:41:19:497] [2:00000003] [INFO][com.freerdp.channels.drdynvc.client] - [dvcman_load_addin]: Loading Dynamic Virtual Channel ainput
[20:41:19:497] [2:00000003] [INFO][com.freerdp.channels.drdynvc.client] - [dvcman_load_addin]: Loading Dynamic Virtual Channel rdpgfx
[20:41:19:497] [2:00000003] [INFO][com.freerdp.channels.drdynvc.client] - [dvcman_load_addin]: Loading Dynamic Virtual Channel disp
[20:41:19:497] [2:00000003] [INFO][com.freerdp.channels.drdynvc.client] - [dvcman_load_addin]: Loading Dynamic Virtual Channel rdpsnd
[20:41:19:707] [2:00000022] [INFO][com.freerdp.channels.rdpsnd.client] - [rdpsnd_load_device_plugin]: [dynamic] Loaded fake backend for rdpsnd
[20:41:20:498] [2:00000003] [INFO][com.freerdp.client.x11] - [xf_logon_error_info]: Logon Error Info SESSION_ID [LOGON_MSG_SESSION_CONTINUE]
[20:41:20:589] [2:0000001d] [INFO][com.freerdp.channels.rdpdr.client] - [device_announce]: registered [    drive] device #1: home (type=8 id=1)
[20:41:44:960] [2:00000003] [INFO][com.freerdp.core] - [rdp_print_errinfo]: ERRINFO_LOGOFF_BY_USER (0x0000000C):The disconnection was initiated by the user logging off their session on the server.

i using X11:

loginctl show-session 2 -p Type
Type=x11

i able to connect to my VM using reminna:
image

my config:

cat ~/.config/winapps/winapps.conf 
##################################
#   WINAPPS CONFIGURATION FILE   #
##################################

# INSTRUCTIONS
# - Leading and trailing whitespace are ignored.
# - Empty lines are ignored.
# - Lines starting with '#' are ignored.
# - All characters following a '#' are ignored.

# [WINDOWS USERNAME]
RDP_USER="user"

# [WINDOWS PASSWORD]
RDP_PASS="user"

# [WINDOWS DOMAIN]
# DEFAULT VALUE: '' (BLANK)
RDP_DOMAIN=""

# [WINDOWS IPV4 ADDRESS]
# NOTES:
# - If using 'libvirt', 'RDP_IP' will be determined by WinApps at runtime if left unspecified.
# DEFAULT VALUE:
# - 'docker': '127.0.0.1'
# - 'podman': '127.0.0.1'
# - 'libvirt': '' (BLANK)
RDP_IP=""

# [WINAPPS BACKEND]
# DEFAULT VALUE: 'docker'
# VALID VALUES:
# - 'docker'
# - 'podman'
# - 'libvirt'
# - 'manual'
WAFLAVOR="libvirt"

# [DISPLAY SCALING FACTOR]
# NOTES:
# - If an unsupported value is specified, a warning will be displayed.
# - If an unsupported value is specified, WinApps will use the closest supported value.
# DEFAULT VALUE: '100'
# VALID VALUES:
# - '100'
# - '140'
# - '180'
RDP_SCALE="100"

# [ADDITIONAL FREERDP FLAGS & ARGUMENTS]
# DEFAULT VALUE: '' (BLANK)
# VALID VALUES: See https://github.com/awakecoding/FreeRDP-Manuals/blob/master/User/FreeRDP-User-Manual.markdown
RDP_FLAGS=""

# [MULTIPLE MONITORS]
# NOTES:
# - If enabled, a FreeRDP bug *might* produce a black screen.
# DEFAULT VALUE: 'false'
# VALID VALUES:
# - 'true'
# - 'false'
MULTIMON="false"

# [DEBUG WINAPPS]
# NOTES:
# - Creates and appends to ~/.local/share/winapps/winapps.log when running WinApps.
# DEFAULT VALUE: 'true'
# VALID VALUES:
# - 'true'
# - 'false'
DEBUG="true"

# [AUTOMATICALLY PAUSE WINDOWS]
# NOTES:
# - This is currently INCOMPATIBLE with 'docker' and 'manual'.
# - See https://github.com/dockur/windows/issues/674
# DEFAULT VALUE: 'off'
# VALID VALUES:
# - 'on'
# - 'off'
AUTOPAUSE="off"

# [AUTOMATICALLY PAUSE WINDOWS TIMEOUT]
# NOTES:
# - This setting determines the duration of inactivity to tolerate before Windows is automatically paused.
# - This setting is ignored if 'AUTOPAUSE' is set to 'off'.
# - The value must be specified in seconds (to the nearest 10 seconds e.g., '30', '40', '50', etc.).
# - For RemoteApp RDP sessions, there is a mandatory 20-second delay, so the minimum value that can be specified here is '20'.
# - Source: https://techcommunity.microsoft.com/t5/security-compliance-and-identity/terminal-services-remoteapp-8482-session-termination-logic/ba-p/246566
# DEFAULT VALUE: '300'
# VALID VALUES: >=20
AUTOPAUSE_TIME="300"

# [FREERDP COMMAND]
# NOTES:
# - WinApps will attempt to automatically detect the correct command to use for your system.
# DEFAULT VALUE: '' (BLANK)
# VALID VALUES: The command required to run FreeRDPv3 on your system (e.g., 'xfreerdp', 'xfreerdp3', etc.).
FREERDP_COMMAND="flatpak run --command=xfreerdp com.freerdp.FreeRDP"

I added flatpak run --command=xfreerdp com.freerdp.FreeRDP because script cannot determine if freerdp is installed

flatpak run --command=xfreerdp com.freerdp.FreeRDP +version
This is FreeRDP version 3.8.0 (3.8.0)
virsh list
 Id   Name         State
----------------------------
 5    RDPWindows   running

image

which additional information i need to provide? best regards.

@onlineapps-cloud onlineapps-cloud changed the title Unable to initiate success install of winapp Unable to initiate connection to libvirt VM (installer cannot connect to VM) Sep 5, 2024
@onlineapps-cloud
Copy link
Author

also i don't understand what you mean here: - Utilise a new certificate by removing relevant certificate(s) in /home/user/.config/freerdp/server this folder is empty

@onlineapps-cloud
Copy link
Author

onlineapps-cloud commented Sep 5, 2024

when i launch right now ./installer.sh i get this error:
./installer.sh: line 1528: 15339 Killed $FREERDP_COMMAND /cert:tofu /d:"$RDP_DOMAIN" /u:"$RDP_USER" /p:"$RDP_PASS" /scale:"$RDP_SCALE" +auto-reconnect +home-drive -wallpaper +dynamic-resolution /app:program:"C:\Windows\System32\cmd.exe",cmd:"/C type NUL > "$TEST_PATH_WIN" && tsdiscon" /v:"$RDP_IP" &> "$FREERDP_LOG"
i executed this command before sudo flatpak override --filesystem=home com.freerdp.FreeRDP

@onlineapps-cloud
Copy link
Author

onlineapps-cloud commented Sep 5, 2024

i can connect directly truth freerdp
image

@onlineapps-cloud
Copy link
Author

i checked registry, and this value after reboot machine disappear:
image
but, if after adding again in registry, i have same problem with installer!

@onlineapps-cloud
Copy link
Author

so installer can login truth RDP, but what happens next, i don't know:

1-2024-09-05_21.46.17.mp4

@onlineapps-cloud
Copy link
Author

hi again, i installed another VM in proxmox, and i get another error log:

cat /home/user/.local/share/winapps/FreeRDP_Test_20240906_1427_075027067.log
[14:27:24:356] [2:00000003] [WARN][com.freerdp.crypto] - [verify_cb]: Certificate verification failure 'self-signed certificate (18)' at stack position 0
[14:27:24:357] [2:00000003] [WARN][com.freerdp.crypto] - [verify_cb]: CN = RDPWindows
[14:27:24:369] [2:00000003] [ERROR][com.winpr.sspi.Kerberos] - [kerberos_AcquireCredentialsHandleA]: krb5_parse_name (Configuration file does not specify default realm [-1765328160])
[14:27:24:369] [2:00000003] [ERROR][com.winpr.sspi.Kerberos] - [kerberos_AcquireCredentialsHandleA]: krb5_parse_name (Configuration file does not specify default realm [-1765328160])
[14:27:24:413] [2:00000003] [WARN][com.freerdp.core.license] - [license_read_binary_blob_data]: license binary blob::type BB_ERROR_BLOB, length=0, skipping.
[14:27:24:934] [2:00000003] [WARN][com.freerdp.client.x11] - [xf_Pointer_get_window]: xf_Pointer: Invalid appWindow
[14:27:24:936] [2:00000003] [WARN][com.freerdp.client.x11] - [xf_Pointer_get_window]: xf_Pointer: Invalid appWindow
[14:27:24:936] [2:00000003] [WARN][com.freerdp.client.x11] - [xf_Pointer_Set]: handle=0
[14:27:24:948] [2:00000003] [WARN][com.freerdp.client.x11] - [xf_Pointer_get_window]: xf_Pointer: Invalid appWindow
[14:27:24:948] [2:00000003] [WARN][com.freerdp.client.x11] - [xf_Pointer_Set]: handle=0
[14:27:25:975] [2:00000003] [WARN][com.freerdp.client.x11] - [xf_Pointer_get_window]: xf_Pointer: Invalid appWindow
[14:27:25:975] [2:00000003] [WARN][com.freerdp.client.x11] - [xf_Pointer_Set]: handle=0
[14:27:25:026] [2:00000003] [WARN][com.freerdp.client.x11] - [xf_Pointer_get_window]: xf_Pointer: Invalid appWindow
[14:27:25:026] [2:00000003] [WARN][com.freerdp.client.x11] - [xf_Pointer_Set]: handle=0
[14:27:25:069] [2:00000003] [WARN][com.freerdp.client.x11] - [xf_Pointer_get_window]: xf_Pointer: Invalid appWindow
[14:27:25:069] [2:00000003] [WARN][com.freerdp.client.x11] - [xf_Pointer_Set]: handle=0
[14:27:25:622] [2:00000003] [WARN][com.freerdp.client.x11] - [xf_Pointer_get_window]: xf_Pointer: Invalid appWindow
[14:27:25:622] [2:00000003] [WARN][com.freerdp.client.x11] - [xf_Pointer_Set]: handle=0
[14:27:25:642] [2:00000003] [WARN][com.freerdp.client.x11] - [xf_Pointer_get_window]: xf_Pointer: Invalid appWindow
[14:27:25:648] [2:00000003] [WARN][com.freerdp.client.x11] - [xf_Pointer_get_window]: xf_Pointer: Invalid appWindow
[14:27:25:648] [2:00000003] [WARN][com.freerdp.client.x11] - [xf_Pointer_Set]: handle=0
[14:27:25:680] [2:00000003] [WARN][com.freerdp.client.x11] - [xf_Pointer_get_window]: xf_Pointer: Invalid appWindow
[14:27:25:680] [2:00000003] [WARN][com.freerdp.client.x11] - [xf_Pointer_Set]: handle=0
[14:27:25:690] [2:00000022] [WARN][com.freerdp.channels.drdynvc.client] - [check_open_close_receive]: {Microsoft::Windows::RDS::DisplayControl:10} OnOpen=(nil), OnClose=0x7faaf7241a80
[14:27:47:805] [2:00000003] [ERROR][com.freerdp.core] - [rdp_set_error_info]: ERRINFO_LOGOFF_BY_USER [0x0001000C]
[14:27:47:818] [2:00000022] [WARN][com.freerdp.channels.drdynvc.client] - [check_open_close_receive]: {Microsoft::Windows::RDS::DisplayControl:10} OnOpen=(nil), OnClose=0x7faaf7241a80
[14:27:24:590] [2:00000003] [INFO][com.freerdp.gdi] - [gdi_init_ex]: Local framebuffer format  PIXEL_FORMAT_BGRA32
[14:27:24:590] [2:00000003] [INFO][com.freerdp.gdi] - [gdi_init_ex]: Remote framebuffer format PIXEL_FORMAT_BGRA32
[14:27:24:597] [2:0000001d] [INFO][com.freerdp.channels.rdpdr.client] - [devman_load_device_service]: Loading device service drive [home] (static)
[14:27:24:597] [2:00000003] [INFO][com.freerdp.channels.rdpsnd.client] - [rdpsnd_load_device_plugin]: [static] Loaded fake backend for rdpsnd
[14:27:24:597] [2:00000003] [INFO][com.freerdp.channels.drdynvc.client] - [dvcman_load_addin]: Loading Dynamic Virtual Channel ainput
[14:27:24:597] [2:00000003] [INFO][com.freerdp.channels.drdynvc.client] - [dvcman_load_addin]: Loading Dynamic Virtual Channel rdpgfx
[14:27:24:597] [2:00000003] [INFO][com.freerdp.channels.drdynvc.client] - [dvcman_load_addin]: Loading Dynamic Virtual Channel disp
[14:27:24:597] [2:00000003] [INFO][com.freerdp.channels.drdynvc.client] - [dvcman_load_addin]: Loading Dynamic Virtual Channel rdpsnd
[14:27:24:924] [2:00000022] [INFO][com.freerdp.channels.rdpsnd.client] - [rdpsnd_load_device_plugin]: [dynamic] Loaded fake backend for rdpsnd
[14:27:25:290] [2:00000003] [INFO][com.freerdp.client.x11] - [xf_logon_error_info]: Logon Error Info LOGON_FAILED_OTHER [LOGON_MSG_SESSION_CONTINUE]
[14:27:25:517] [2:0000001d] [INFO][com.freerdp.channels.rdpdr.client] - [device_announce]: registered [    drive] device #1: home (type=8 id=1)
[14:27:47:805] [2:00000003] [INFO][com.freerdp.core] - [rdp_print_errinfo]: ERRINFO_LOGOFF_BY_USER (0x0000000C):The disconnection was initiated by the user logging off their session on the server.

@oskardotglobal
Copy link
Member

I think the problem is that you're running FreeRDP via Flatpak. Can you try building FreeRDP from source for now? We are working on finding a better solution to distribute FreeRDP in #195

@onlineapps-cloud
Copy link
Author

yes, you right, i installed from binaries freerdp3 and all work fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants