Azure-Samples / ansible-playbooks

Ansible Playbook Samples for Azure
MIT License
224 stars 349 forks source link

The generalize setting does not generalize the VM, it only marks it as generalized to the platform #92

Open cynthn opened 1 year ago

cynthn commented 1 year ago

Please provide us with the following information:

This issue is for a: (mark with an x)

- [X ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Use ansible-playbooks/SIG_generalized_image/01a-create-generalized-image.yml and the VM will be marked as generalized in Azure, but hasn't actually been generalized.

Any log messages given by the failure

N/A

Expected/desired behavior

There should be something in the sample that runs waagent -deprovision+user to deprovision\generalize the VM before marking the VM as generalized. You could also just have a prerequisite that you will need a VM that has already been generalized and skip creating the VM in this playbook.

OS and Version?

Linux

Versions

N/A

Mention any other details that might be useful


Thanks! We'll be in touch soon.

cynthn commented 1 year ago

@TomArcherMsft Hey Tom, is this repo no longer managed by anyone?

TomArcherMsft commented 1 year ago

@cynthn I do not believe it's maintained. @grayzu can give the definitive answer though as he's the PM for Ansible.

xuzhang3 commented 1 year ago

@cynthn Azure azcollection is focused on resource management. Prerequisite actions like waagent -deprovision+user are not covered by Azure azcolleciton. The docs need to add more hints to users that additional actions are required before generalizing a VM, as marking an VM generalized is the last step in generalizing a VM. This example should add more hints.

cynthn commented 1 year ago

The first step SIG_generalized_image/00-prerequisites.yml walks you through creating the VM, but doesn't generalize it. Would it be possible to just remove that first step and update the sample to say the one prereq is to have a generalized VM?