Repository navigation
Fix QEMU guest agent install failing on first boot - #563
Open
BogdanEmilian wants to merge 2 commits into
Open
BogdanEmilian wants to merge 2 commits into
BogdanEmilian wants to merge 2 commits into
Conversation
The MSI install can fail transiently on first boot (e.g. with ERROR_SERVICE_DATABASE_LOCKED while the VSS provider service is registered), in which case the whole install is rolled back. This script will retry it, and if it still fails, ask Cloudbase-Init (exit code 1003) to reboot and run the local scripts again, once.
Cristi1324
reviewed
Nov 23, 2026
| @@ -62,8 +62,24 @@ | |||
| ] | |||
|
|
|||
| QEMU_GUEST_AGENT_INSTALL_SCRIPT_FORMAT = ( | |||
Contributor
There was a problem hiding this comment.
Please replace the quoted string lines "<code>" with a multiline string """ like the STATIC_IP_SCRIPT_TEMPLATE below.
Contributor
Author
There was a problem hiding this comment.
Thanks for the note!
I have replaced the quoted string lines to multiline string
Cristi1324
reviewed
Nov 23, 2026
| "$log = '%(agent_msi_log_dir)s\\qemu-guest-agent-msiexec.log'\n" | ||
| "$rebootMarker = '%(agent_msi_log_dir)s\\qemu-ga-install-rebooted'\n" | ||
| "for ($i = 1; $i -le 2; $i++) {\n" | ||
| ' $code = (Start-Process msiexec.exe -ArgumentList "/i `"$msi`" ' |
Contributor
There was a problem hiding this comment.
The line length limit can also be ignored with a # noqa at the end of the multiline block.
Contributor
Author
There was a problem hiding this comment.
Nice, was not aware of that!
Added the marker at the end of the multiline block.
Thanks for the info!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The MSI install can fail transiently on first boot (e.g. with ERROR_SERVICE_DATABASE_LOCKED while the VSS provider service is registered), in which case the whole install is rolled back. This script will retry it, and if it still fails, ask Cloudbase-Init (exit code 1003) to reboot and run the local scripts again, once.