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
Support for generalizing VMs #49704
Support for generalizing VMs #49704
Conversation
@@ -68,6 +68,12 @@ | |||
- Toggle that controls if the machine is allocated/deallocated, only useful with state='present'. | |||
default: True | |||
type: bool | |||
generalized: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why 'd'?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it follows other options, which are "started", "stopped".... etc....
@@ -1343,6 +1359,9 @@ def serialize_vm(self, vm): | |||
if vm.instance_view: | |||
result['powerstate'] = next((s.code.replace('PowerState/', '') | |||
for s in vm.instance_view.statuses if s.code.startswith('PowerState')), None) | |||
for s in vm.instance_view.statuses: | |||
if s.code == "OSState/generalized": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lower case to avoid case sensitive?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, won't hurt
generalized: | ||
description: | ||
- Use with state 'present' to generalize the machine. Set to true to generalize the machine. | ||
- Please note that this operation is irreversible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think we need stronger message to user, that once generalized, the vm is not usable.
SUMMARY
This PR extends current VM to support generalization.
ISSUE TYPE
COMPONENT NAME
azure_rm_virtualmachine
azure_rm_virtualmachine_facts
ADDITIONAL INFORMATION