Skip to content

[BUG] com.azure.resourcemanager.compute.models.VirtualMachines.list() query returns deleted VM #35524

Open
@qooiprww

Description

@qooiprww

Describe the bug
com.azure.resourcemanager.compute.models.VirtualMachines.list() query returns deleted VM.
Fetching details using the returned VM object will result in ResourceNotFound ApiErrorException

To Reproduce

  1. Manually create a VM from Azure Portal
  2. Query VirtualMachines using com.azure.resourcemanager.compute.models.VirtualMachines.list()
  3. Delete VM from Azure Portal
  4. Query VirtualMachines using com.azure.resourcemanager.compute.models.VirtualMachines.list() with the same client
  5. Find object of deleted VM instance from query result and retrieve powerState from found object to trigger refreshInstanceView
  6. refreshInstanceView will trigger ApiErrorException with code ResourceNotFound

Metadata

Metadata

Assignees

Labels

Compute - VMMgmtThis issue is related to a management-plane library.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-triageWorkflow: This issue needs the team to triage.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions