Remote Visualization in Azure

This post has been republished via RSS; it originally appeared at: Azure Global articles.

Remote visualization is enabling companies to move their workflow to the cloud. This enables companies to redirect funds currently being spent on expensive workstations to other business areas. Now engineers that needs a high end workstation some of the time to model and visualize results can access it the cloud. By making this move to the cloud, engineers and scientist are now able to make changes to their models and visualize results in or away from the office from their laptop.

 

Getting Started:

Recommended instances: NV series

Setup for Windows

Provision Windows NV/NV_v3 instance I use the Windows 10 Pro image from the market place

"image_publisher": "MicrosoftWindowsDesktop",
"image_offer": "Windows-10",
"image_sku": "rs5-pron"

 

Install Nvidia driver

Make sure that the GPU is in WDDM and not TCC mode

  • C:\Program Files\NVIDIA Corporation\NVSMI\nvidia-smi.exe

Check to see if it says TCC on the GPU 0 line

If so run

C:\Program Files\NVIDIA Corporation\NVSMI\nvidia-smi.exe -g 0 -dm 0 (NV6, NV12)
C:\Program Files\NVIDIA Corporation\NVSMI\nvidia-smi.exe -g 1 -dm 0 (NV12)

 

Disable Hyper-V video

Interactive:

Open device management

From command prompt run devmgmt.msc
Go to display adaptors
Right click on Hyper-V Video and select disable

 

PowerShell Script:

- Note: Run as admin

# Disable the Hyper-V Video device
$dev = (Get-PnpDevice -PresentOnly).Where{ $_.FriendlyName -like '*Hyper-V Video' }
Disable-PnpDevice -InstanceId $dev.InstanceId -Confirm:$false

 

Reboot the system

 

Setup for Linux (Run commands as root user)

Use Centos 7.5 or 7.7 from the market place on a NV/NV_v3 instance

Note: Xorg 1.19 works but 1.20 in CentOS 7.6 fails to start Xorg

If your are using CentOS 7.5 run the following two commands to make sure you don’t get version xserver 1.20. For CentOS 7.7, skip to the next set of commands

 

find /etc/yum.repos.d -name '*.repo' -print0 | xargs -0 sed -i 's/$releasever/'7.5.1804/  
yum clean all 

 

 

Next install a windows package manager, additional packages, and configuration changes

#Install additional packages 
yum install -y kernel-devel 

# Install KDE  yum groupinstall -y 'KDE' 'X Window System' --skip-broken systemctl set-default graphical.target
# Disable GDM
systemctl disable gdm.service

# Install dkms  rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm  yum install -y dkms  # Disable nouveau  echo "blacklist nouveau" > /etc/modprobe.d/nouveau.conf  echo "blacklist lbm-nouveau" >> /etc/modprobe.d/nouveau.conf # Install LIS  wget https://aka.ms/lis  tar xvzf lis  cd LISISO  ./install.sh  # Reboot is needed  reboot

 

 

 After machine has rebooted, log back in and run the following commands

# Install grid driver 
yum install -y "kernel-devel-uname-r == $(uname -r)" 
wget -O NVIDIA-Linux-x86_64-grid.run https://go.microsoft.com/fwlink/?linkid=874272   
chmod +x NVIDIA-Linux-x86_64-grid.run 
./NVIDIA-Linux-x86_64-grid.run
unalias cp cp /etc/nvidia/gridd.conf.template /etc/nvidia/gridd.conf  echo "IgnoreSP=FALSE" >> /etc/nvidia/gridd.conf  reboot

After the reboot update xorg.conf and enable password authentication through ssh

 

BUSID=`nvidia-xconfig --query-gpu-info | grep PCI | head -n1 | awk '{print $4}'`
cp /etc/X11/xorg.conf /etc/X11/xorg.conf.orig
cat << EOF > /etc/X11/xorg.conf
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "Tesla M60"
BusID "$BUSID"
Option "CustomEDID" "DFP-0:/etc/X11/Z27s_EDID.txt; DFP-1:/etc/X11/Z27s_EDID.txt"
Option "ConnectedMonitor" "DFP-0, DFP-1"
Option "UseEDID" "true"
EndSection
EOF

wget "https://azhpcscus.blob.core.windows.net/apps/remote-viz/Linux/multi-monitors/Z27s_EDID.txt" -O /etc/X11/Z27s_EDID.txt

# Enable SSH password authentication
sed -i "s/PasswordAuthentication no/PasswordAuthentication yes/" /etc/ssh/sshd_config

Finally, install a display manager and enable it

yum install -y lightdm
systemctl enable lightdm.service

 

After you have setup your Windows or Linux machine, install your remote visualization software (i.e. HP RGS, TGX, etc)

 

Setup HP-RGS in Azure

Required Ports:

  • 42966

Sender: 

Windows Install 

Note: The scripts to do an automated deployment of a Windows RGS sender node on a NV6 can be found at https://github.com/Azure/azurehpc/tree/master/examples/simple_hpc_pbs_rgs

 

Install HP RGS as per the instructions 

Edit <RGS install path>\rgsenderconfig file (Update the lines to below) 

  • Rgsender.Compatibility.Displays.AllowNvidiaResolutionMatching=on 
  • Rgsender.Compatibility.Displays.ForceEdidOnHeadless=1 

 

Linux Install 

Install HP RGS

# Download RGS Sender for HP RGS - RHEL7-SUSE12-64bit-Installers.tar.gz
# Download license from HP RGS trial.lic
tar xzvf RHEL7-SUSE12-64bit-Installers.tar.gz 
tar zxvf rg_install_linux_64_sender.tar.gz

# Install requires you to answer a few questions.
./install.sh
cp trial.lic /etc/opt/hpremote/rgsender/

reboot

 

Receiver: 

Configure: 

Select HP RGS preferences 7.6

Performance ->  
  * Enable Adaptive Image Quality (Check this option) 
Connection-> 
  * Match Receiver display resolution 
  * Match Receiver display layout 

Select HP RGS preferences 7.7
Performance ->  
* Enable Advanced Video Compression on Sender(Check this option - Windows)
* Enable Adaptive Image Quality (Check this option - Mac and Linux) 
Connection-> 
* Set Sender display(s) to match Receiver display(s)

 

 

Mac: 

  • Duo monitor support is spotty at the time of this writing. To be able to span both monitors you need to disable screens. This is done by going to mission control and unchecking “Displays have separate Spaces” then log out and log back in.

 

Setup TGX in Azure

Required Ports:

  • 40001-40017

Sender: 

Windows Install

Note: The scripts to do an automated deployment of a Windows TGX sender node on a NV6 can be found at https://github.com/Azure/azurehpc/tree/master/examples/simple_hpc_pbs_tgx

 

 

 

 

 

 

cd C:\Windows\Temp # Download TGX Sender (TGX_Sender.exe) .\TGX_Sender.exe /SILENT /SUPPRESSMSGBOXES /LOG /NORESTART REBOOT=ReallySuppress # Dowload TGX license (TGX.lic) and place it in the following directory copy TGX.lic c:\ProgramData\Mechdyne\licenses\TGX.lic

 

 

 

 

 

 

 

Linux Install

Receiver: 

Configure: 

Port: 40001 (default)
Settings: Use defaults unless you encounter issues.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.