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

[Linux] Shutdown guest OS after auto install completes instead of rebooting #489

Merged
merged 6 commits into from
Aug 14, 2023

Conversation

keirazhang
Copy link
Contributor

Even though guest OS sends autoinstall complete message to serial port, it might still be running some post tasks and it won't be rebooted immediately. Sometimes the post tasks take some time, which led to ansible tasks thought starting to wait for guest full name but it failed due to guest OS hasn't reboot at all.

It is difficult to find the best timing when to wait for guest full name, so in this change I replaced 'reboot' with 'shutdown' as the following action after autoinstall is compeleted. Therefore, we only needs to wait for VM's power states becoming poweredOff after autoinstall complete message received. Then we can consider the complete autoinstall process is finished, and then power on VM to wait for its guest full name.

In this change, I also added boot options for redirecting console output to serial port, so we can have more information when debugging deploy_vm failures.

Signed-off-by: Qi Zhang <qiz@vmware.com>
Signed-off-by: Qi Zhang <qiz@vmware.com>
Signed-off-by: Qi Zhang <qiz@vmware.com>
Signed-off-by: Qi Zhang <qiz@vmware.com>
Signed-off-by: Qi Zhang <qiz@vmware.com>
@keirazhang keirazhang added this to the v3.0 milestone Aug 10, 2023
Copy link
Collaborator

@linhuali linhuali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks.

@keirazhang keirazhang merged commit e03f031 into vmware:main Aug 14, 2023
linhuali added a commit to linhuali/ansible-vsphere-gos-validation that referenced this pull request Aug 15, 2023
@keirazhang keirazhang deleted the fix_iso_autoinstall branch August 15, 2023 09:51
linhuali added a commit to linhuali/ansible-vsphere-gos-validation that referenced this pull request Aug 16, 2023
linhuali added a commit to linhuali/ansible-vsphere-gos-validation that referenced this pull request Aug 17, 2023
linhuali added a commit to linhuali/ansible-vsphere-gos-validation that referenced this pull request Aug 22, 2023
linhuali added a commit to linhuali/ansible-vsphere-gos-validation that referenced this pull request Aug 22, 2023
linhuali added a commit to linhuali/ansible-vsphere-gos-validation that referenced this pull request Aug 25, 2023
linhuali added a commit to linhuali/ansible-vsphere-gos-validation that referenced this pull request Aug 25, 2023
linhuali added a commit to linhuali/ansible-vsphere-gos-validation that referenced this pull request Sep 1, 2023
linhuali added a commit to linhuali/ansible-vsphere-gos-validation that referenced this pull request Sep 1, 2023
linhuali added a commit to linhuali/ansible-vsphere-gos-validation that referenced this pull request Sep 11, 2023
linhuali added a commit to linhuali/ansible-vsphere-gos-validation that referenced this pull request Sep 11, 2023
linhuali added a commit to linhuali/ansible-vsphere-gos-validation that referenced this pull request Sep 18, 2023
linhuali added a commit to linhuali/ansible-vsphere-gos-validation that referenced this pull request Sep 18, 2023
linhuali added a commit to linhuali/ansible-vsphere-gos-validation that referenced this pull request Sep 25, 2023
linhuali added a commit to linhuali/ansible-vsphere-gos-validation that referenced this pull request Sep 25, 2023
linhuali added a commit to linhuali/ansible-vsphere-gos-validation that referenced this pull request Sep 27, 2023
linhuali added a commit to linhuali/ansible-vsphere-gos-validation that referenced this pull request Sep 27, 2023
linhuali added a commit to linhuali/ansible-vsphere-gos-validation that referenced this pull request Oct 12, 2023
linhuali added a commit to linhuali/ansible-vsphere-gos-validation that referenced this pull request Oct 12, 2023
linhuali added a commit to linhuali/ansible-vsphere-gos-validation that referenced this pull request Oct 30, 2023
linhuali added a commit to linhuali/ansible-vsphere-gos-validation that referenced this pull request Oct 30, 2023
linhuali added a commit to linhuali/ansible-vsphere-gos-validation that referenced this pull request Nov 17, 2023
linhuali added a commit to linhuali/ansible-vsphere-gos-validation that referenced this pull request Nov 17, 2023
linhuali added a commit to linhuali/ansible-vsphere-gos-validation that referenced this pull request Nov 24, 2023
linhuali added a commit to linhuali/ansible-vsphere-gos-validation that referenced this pull request Dec 4, 2023
linhuali added a commit to linhuali/ansible-vsphere-gos-validation that referenced this pull request Dec 12, 2023
linhuali added a commit to linhuali/ansible-vsphere-gos-validation that referenced this pull request Dec 19, 2023
linhuali added a commit to linhuali/ansible-vsphere-gos-validation that referenced this pull request Jan 11, 2024
linhuali added a commit to linhuali/ansible-vsphere-gos-validation that referenced this pull request Jan 15, 2024
linhuali added a commit to linhuali/ansible-vsphere-gos-validation that referenced this pull request Jan 30, 2024
linhuali added a commit to linhuali/ansible-vsphere-gos-validation that referenced this pull request Jan 31, 2024
linhuali added a commit to linhuali/ansible-vsphere-gos-validation that referenced this pull request Jan 31, 2024
linhuali added a commit to linhuali/ansible-vsphere-gos-validation that referenced this pull request Jan 31, 2024
linhuali added a commit to linhuali/ansible-vsphere-gos-validation that referenced this pull request Feb 2, 2024
linhuali added a commit to linhuali/ansible-vsphere-gos-validation that referenced this pull request Feb 2, 2024
linhuali added a commit to linhuali/ansible-vsphere-gos-validation that referenced this pull request Feb 21, 2024
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.

3 participants