Table of Contents
FSL VM
El problema
El servidor de calculo de neuroimagen tiene instalada una tarjeta NVIDIA para aprovechar la capacidad de calculo GPU. Esto provoca que todo software que usa opengl tenga dificultades cuando se ejecutaen remoto. Despues de mucho tiempo intentando arreglar esto hemos deisitido y vamos a intentar ejecutar fsleyes desde una maquina remota.
Instalacion
Lo primero es descargarse la maquina virtual de la pagina de FSL. Esta maquina esta pensada para Windows pero por supuesto que funciona en cualquier sistema operativo. En principio es una maquina VMWare pero puede convertirse a formato qcow2 e integrarse en libvirtd.
[root@brick03 ~]# mkdir /nas/software/vmx [root@brick03 ~]# cd /nas/software [root@brick03 software]# virt-v2v -i vmx /nas/software/FSLVm7_64.vmwarevm/FSLVm7_64.vmx -of qcow2 -os vmx -n default [ 0.0] Opening the source -i vmx /nas/software/FSLVm7_64.vmwarevm/FSLVm7_64.vmx [ 0.0] Creating an overlay to protect the source from being modified [ 0.2] Initializing the target -o libvirt -os vmx [ 0.2] Opening the overlay [ 2.2] Inspecting the overlay [ 21.6] Checking for sufficient free disk space in the guest [ 21.6] Estimating space required on target for each disk [ 21.6] Converting CentOS Linux release 7.6.1810 (Core) to run on KVM virt-v2v: This guest has virtio drivers installed. [ 117.6] Mapping filesystem data to avoid copying unused and blank areas [ 118.2] Closing the overlay [ 118.4] Checking if the guest needs BIOS or UEFI to boot [ 118.4] Assigning disks to buses [ 118.4] Copying disk 1/1 to /the_dysk/nas/software/vmx/FSLVm7_64-sda (qcow2) (100.00/100%) [ 249.2] Creating output metadata Pool vmx refreshed Domain FSLVm7_64 defined from /tmp/v2vlibvirtbfa966.xml [ 250.1] Finishing off
La VM queda directamente integrada en libvirtd y solo hay que arrancarla y seguir la instalacion de FSL (pass: neuroimagen). Tras esto retocar un poco,
[root@brick03 ~]# virsh net-update default add ip-dhcp-host "<host mac='00:0c:29:5c:6c:e8' name='FSLVm7_64' ip='192.168.122.22' />" --live --config
Edito el fstab de la maquina virtual,
172.26.2.40:/Investigacion/nas /home nfs defaults,exec 0 0
y ya puedo montar la particion /nas.
Listo,
Aprovecho y editando el .bash_profile añado los paths de FreeSurfer desde el /nas,
export FREESURFER_HOME=/nas/usr/local/opt/freesurfer source $FREESURFER_HOME/SetUpFreeSurfer.sh export SUBJECTS_DIR=/nas/data/subjects
Instalo un par de librerias que faltan en la VM e intento lanzar freeview,
Acceso remoto
Acceso administrativo por tunel SSH
No usar para propositos de trabajo
Primero se ha de hacer un tunel ssh a matlab.fundacioace.com,
> ssh -p 20024 -v -C -L 5901:localhost:5901 matlab.fundacioace.com
despues basta con abrir un vncviewer a localhost:1 y todo sera redirigido a la maquina remota,
Desde aqui hay que abrir la maquina virtual y ya se puede ejecutar todo.
VNC (acceso directo)
He añadido una regla de entrada al firewall de la maquina virtual
[root@FSLVm7_64 ~]# firewall-cmd --list-all public (active) target: default icmp-block-inversion: no interfaces: eno16777736 sources: services: dhcpv6-client ssh ports: 20022/tcp 5900/tcp protocols: masquerade: no forward-ports: source-ports: icmp-blocks: rich rules:
y compartido el escritorio Gnome,
Tras esto se añade una regla de iptables a brick03 para que haga forward desde el 5923 al 5900 de la maquina virtual,
-A PREROUTING -p tcp -m tcp --dport 5923 -j DNAT --to-destination 192.168.122.22:5900
Tras esto solo hay que hacer,
~> vinagre matlab.fundacioace.org::5923
y nos conectamos al escritorio de la maquina virtual,
Nota: tiger-vnc no funciona,
~> vncviewer matlab.fundacioace.org::5923 TigerVNC Viewer 64-bit v1.9.80 Copyright (C) 1999-2019 TigerVNC Team and many others (see README.rst) See https://www.tigervnc.org for information on TigerVNC. Wed May 29 09:43:09 2019 DecodeManager: Detected 4 CPU core(s) DecodeManager: Creating 4 decoder thread(s) CConn: Connected to host matlab.fundacioace.org port 5923 CConnection: Server supports RFB protocol version 3.7 CConnection: Using RFB protocol version 3.7 CConnection: No matching security types CConn: No matching security types