Skip to content

Unable to delete a Guacamole User Resource if it is in the 'stopped' state #4135

@dram1964

Description

@dram1964

Deleting a VM from the Guacamole service fails if the VM is in a stopped state

Attempting to delete a 'Stopped' VM, results in a 'deleting_failed' status and displays the following error:

compute.VirtualMachinesClient#
PowerOff: Failure sending request: StatusCode=0 -- 
Original Error: autorest/azure: Service returned an error. 
Status=<nil> 
Code="OperationNotAllowed" 
Message="Operation 'powerOff' is not allowed on VM 'linuxvm4fae' since the VM is either deallocated or marked to be deallocated.

Seems that the deletion request fails because it is trying to stop the VM, when it is already stopped. If I 'Enable' the resource, 'Start' it, then 'Disable' it, the resource can be deleted successfully.

Steps to reproduce

  1. Login to the TRE UI (as TRE Administrator)
  2. Connect to a Workspace
  3. Connect to the Virtual Desktops (Guacamole) service
  4. Select 'Actions > Stop' from either a linux or windows VM
  5. Select 'Disable' for the same resource
  6. Select 'Delete' for the same resource

Although I'm currently seeing this error from a Custom Workspace and a Custom Guacamole User-Resource, I did also encounter this problem when using the tre-base-workspace (1.5.7) and the tre-service-guacamole-linuxvm (1.0.3)

Azure TRE release version (e.g. v0.19.1):

Deployed Azure TRE components: tre-service-guacamole (0.10.9), tre-service-guacamole-linuxvm (1.0.3)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No fields configured for Bug.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions