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

vmware_guest speedup module #2278

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

GuideGlyph
Copy link
Contributor

SUMMARY

Speedup network search while creating VM using vmware_guest.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

vmware_guest.py

ADDITIONAL INFORMATION

vmware_guest network search is slow. It use find_obj() from vmware.py that loop through all objects trying to find correct. I have a lag for 5 mins trying. PyVmomi.network_exists_by_name works much faster.

@GuideGlyph GuideGlyph changed the title vmware_guest speedup vmware_guest speedup module Dec 24, 2024
@GuideGlyph
Copy link
Contributor Author

also curios why Clone task

                    task = vm_obj.Clone(folder=destfolder, name=self.params['name'], spec=clonespec)

dont have self.wait_for_task(task) line like CreateVM_Task or ReconfigVM_Task.
After debugging customize_advanced_settings function (not successfully sadly) I get incorrect facts = self.gather_facts(vm_obj) couple of times because it didnt have time enough to get it correct (i guess)

@GuideGlyph
Copy link
Contributor Author

TODO: also add find_network_by_name function to

                if nic.device.deviceInfo.summary != network_name:
                    if 'DVSwitch' not in nic.device.deviceInfo.summary:
                        nic.device.deviceInfo.summary = network_name
                        nic_change_detected = True
                    else:

@GuideGlyph
Copy link
Contributor Author

Recheck

@mariolenz
Copy link
Collaborator

I'm sorry, I didn't find much time to work on this collection during the last weeks. I hope I'm able to review this PR soon.

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

Successfully merging this pull request may close these issues.

2 participants