Unable to delete a Guacamole User Resource if it is in the 'stopped' state #4135
Description
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
- Login to the TRE UI (as TRE Administrator)
- Connect to a Workspace
- Connect to the Virtual Desktops (Guacamole) service
- Select 'Actions > Stop' from either a linux or windows VM
- Select 'Disable' for the same resource
- 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
Assignees
Labels
Type
Projects
Status
In Progress