
Worse even: If the startup memory becomes to low, the VM starts swapping instead of enabling the extra memory Hyper-V has granted the VM.At some point Hyper-V always show that the Linux VM has low memory, hence it will give more RAM to the Linux VM even if tools like free, top or htop show that the VM is perfectly happy with the memory it has and that Linux doesn't see the extra memory Hyper-V.A couple of seconds after bootup is finished, dmesg shows a message from hv_balloon how much the maximum RAM size is.Note: This step takes a while to complete.I remember that Dynamic Memory was not supported with Linux in the earlier days but I decided that I might give it a go on Debian 9 (based on kernel 4.9) and the upcoming 10 (based on 4.19) on our Hyper-V hosts that are running 2012 R2.Īs of writing I don't think that the memory ballooning works as it should out of the box, and I couldn't others who have seen the following behaviour: This is a step that many online instructions missed. Yes, you must runt the script again after rebooting. " echo "Reboot your machine to begin using XRDP.

# Add script to setup the ubuntu session properly if thenĬat > /etc/xrdp/startubuntu.sh /etc/modprobe.d/blacklist-vmw_vsock_vmci_nfįi #Ensure hv_sock gets loaded if then echo "hv_sock " > /etc/modules-load.d/hv_nfĬat > /etc/polkit-1/localauthority/50-local.d/45-allow-colord.pkla << EOF Identity=unix-user:* Action=-device -profile -device -profile -device -profile ResultAny=no ResultInactive=no ResultActive=yes EOF # reconfigure the service Sed -i_orig -e 's/bitmap_compression=true/bitmap_compression=false/g ' /etc/xrdp/xrdp.ini # disable bitmap compression since its local its much faster Sed -i_orig -e 's/crypt_level=high/crypt_level=none/g ' /etc/xrdp/xrdp.ini Sed -i_orig -e 's/security_layer=negotiate/security_layer=rdp/g ' /etc/xrdp/xrdp.ini # Configure the installed XRDP ini files. " >&2 exit 1įi # XRDP # Install hv_kvp utilsĪpt install -y linux-tools-virtual $ # Install the xrdp service so we have the auto start behavior " >&2 echo "Please reboot and re-run this script to finish the install.

If then echo "A reboot is required in order to proceed with the install.

# if then echo 'This script must be run with root privileges ' >&2 exit 1 HWE= " " #HWE="-hwe-20.04" # Update our machine to the latest code if we need to. #!/bin/bash # This script is for Ubuntu 20.04 Focal Fossa to download and install XRDP+XORGXRDP via # source.
