Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LabBuilder.py: destroy option does not work on shutdown VMs #11

Open
tsluyter opened this issue Dec 31, 2020 · 2 comments
Open

LabBuilder.py: destroy option does not work on shutdown VMs #11

tsluyter opened this issue Dec 31, 2020 · 2 comments

Comments

@tsluyter
Copy link
Contributor

Reproduction:

  1. Create lab environment green-field using the LabBuilder.py script.
  2. Shutdown the VMs through Azure Portal or through the OS running in the VM.
  3. Run the LabBuilder.py script with "-destroy".

This results in:

  1. ws01 being destroyed, but dc and linux still being there.
  2. The following error message:
Error: compute.VirtualMachineExtensionsClient#Delete: Failure sending request: StatusCode=0 -- Original Error: autorest/azure: Service returned an error. Status=<nil> Code="OperationNotAllowed" Message="Cannot modify extensions in the VM when the VM is not running."

Error: compute.VirtualMachineExtensionsClient#Delete: Failure sending request: StatusCode=0 -- Original Error: autorest/azure: Service returned an error. Status=<nil> Code="OperationNotAllowed" Message="Cannot modify extensions in the VM when the VM is not running."
@tsluyter
Copy link
Contributor Author

Potential work-around: simply kill the "class-resources" resource group in one blow :)

@ghost
Copy link

ghost commented Feb 2, 2021

Researched some upstream project issues and found this. Looks to me like this is solved by using the azure_linux_virtual_machine and/or azure_windows_virtual_machine resources in the azurerm v2+ provider. This project locks the provider version at 1.27 so the resources with the extra capabilities aren't available at present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant