nwsde / nwsde-azuretre

An accelerator to help organizations build Trusted Research Environments on Azure.
https://microsoft.github.io/AzureTRE
MIT License
0 stars 0 forks source link

Guacamole Linux VM desktop won't connect #17

Closed jonnyry closed 5 months ago

jonnyry commented 6 months ago

Appears to be intermittent

image

jonnyry commented 6 months ago

Logged upstream:

https://github.com/microsoft/AzureTRE/issues/3811

jonnyry commented 6 months ago

Issue is because the Nexus VM is stopped by the Powershell job and not restarted automatically.

TODO: change the Powershell script to restart the nexus package mirror VM.

jonnyry commented 5 months ago

Just to add more context - I've run a few extra tests on this, and it appears to occur when:

Bringing the package mirror up afterwards and restarting the Linux VM does not automatically resolve the issue, without re-running the cloud-init scripts.

Conversely creating a Linux VM while the package mirror IS running, then stopping the package mirror, does not cause an issue.

jonnyry commented 5 months ago

Following PowerShell code appended to end of TRE start runbook script will start the package mirror if it exists...

    # Start package mirror (if exists)
    $PackageMirror = Get-AzVM -ResourceGroupName $Group.ResourceGroupName -Name "nexus-$azureTreId" -ErrorVariable packageMirrorNotPresent -ErrorAction SilentlyContinue
    if (!$packageMirrorNotPresent)
    {
        Write-Output "Starting Nexus Package Mirror VM '$($PackageMirror.Name)'"
        Start-AzVM -ResourceGroupName $Group.ResourceGroupName -Name $PackageMirror.Name
    }

TODO: Add to repo, automation scripts in Azure & push upstream

jonnyry commented 5 months ago

After discussion with @marrobi, I've modified to start all the VMs in the core resource group - typically the package mirror and the jump box. This mirrors what the make version of the script does:

    # Start VMs
    $VM = Get-AzVM -ResourceGroupName $Group.ResourceGroupName
    foreach ($item in $VM) {
      Write-Output "Starting VM '$($item.Name)'"
      Start-AzVm -ResourceGroupName $item.ResourceGroupName -Name $item.Name
    }
jonnyry commented 5 months ago

4ea7c32

jonnyry commented 5 months ago

Sent PR back to microsoft/AzureTRE https://github.com/microsoft/AzureTRE/pull/3822

jonnyry commented 5 months ago

Merged into microsoft/AzureTRE & added to our Azure automation scripts