-
Notifications
You must be signed in to change notification settings - Fork 28
Firstboot script documentation #1218
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
base: gh-pages
Are you sure you want to change the base?
Conversation
Added user guide for VMware tool removal and disk-check Signed-off-by: Manjunath <84955053+Track2k@users.noreply.github.com>
|
Bito Automatic Review Skipped - Draft PR |
|
Bito Automatic Review Skipped - Draft PR |
|
Bito Automatic Review Skipped - Draft PR |
|
Bito Automatic Review Skipped - Draft PR |
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.
💡 To request another review, post a new comment with "/windsurf-review".
|
|
||
| | Issue | Location to Check | | ||
| |-------|-------------------| | ||
| | Script Not Executing | `C:\Program Files\Guestfs\log` for errors | |
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.
There's an inconsistency in the Windows log path. Line 66 specifies C:\Program Files\Guestfs\log.txt but the troubleshooting table on line 75 refers to C:\Program Files\Guestfs\log. Please ensure the log path is consistent throughout the documentation.
| --- | ||
|
|
||
| ***The script's success or failure can be determined by checking its location after migration:*** | ||
| 1. If the script executed successfully, it will not appear in both: `/usr/lib/virt-sysprep/scripts/` and `/usr/lib/virt-sysprep/scripts-done/` |
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.
The explanation for Linux script success/failure status is unclear. Line 105 states that successful scripts "will not appear in both" directories, but doesn't explain where they go. Consider clarifying what actually happens to successful scripts (e.g., are they deleted after execution, moved to another location, etc.).
| --- | ||
|
|
||
| ***The script's success or failure can be determined by checking its location after migration:*** | ||
| 1. If the script executed successfully, it will be moved to: `C:\Program Files\guestfs\Firstboot\scripts-done\` |
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.
There's an inconsistency in the capitalization of 'Guestfs' in Windows paths. Line 81 uses lowercase C:\Program Files\guestfs\Firstboot\scripts-done\ while other references use capitalized 'Guestfs'. For consistency, please use the same capitalization throughout the document.
|
Bito Automatic Review Skipped - Files Excluded |
|
@OmkarDeshpande7 / @spai-p9 / @bhavin192 could you please review this PR? |
| The script executes **automatically after the migration completes and VM boots for the first time in PCD/OpenStack.** | ||
|
|
||
|
|
||
| The firstboot Script feature uses [Guestfs](https://libguestfs.org/) (libguestfs) which is a set of tools for accessing and modifying virtual machine disk images. During migration, guestfs runs as part of [virt-v2v in-place](https://libguestfs.org/virt-v2v-in-place.1.html) conversion process which runs inside the v2v-helper pod. |
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.
Actually firstboot script does not use guestfish at all.
virt-v2v is the one who just injects the script inside the guest. So the statement "The firstboot Script feature uses Guestfs (libguestfs)" might not be entirely accurate
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, while the script is injected by virt-v2v, it is the libguestfs libraries that provide the capability to access the guest filesystem and modify the disk right? and virt-v2v uses these libraries. Correct me if i'm wrong.
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.
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.
Oh okay, I'll change the statement accordingly. "The firstboot script feature uses virt-v2v to inject the script which internally uses Guestfs libraries. During migration, the process runs inside the v2v-helper pod."
How does it sound @OmkarDeshpande7
| #### 2. Controller Creates ConfigMap | ||
| - The migration controller intercepts the script content | ||
| - Creates a Kubernetes **ConfigMap** with the script data with the name as `firstboot-config-<vmwaremachine-resource-name>` | ||
| - ConfigMap details: | ||
| - **Key**: `user_firstboot.sh` | ||
| - **Value**: User-provided script content | ||
|
|
||
| #### 3. ConfigMap Mounted to v2v-helper Pod | ||
| - The ConfigMap is mounted as a volume in the **v2v-helper pod** | ||
| - Mount path allows virt-v2v to access the script | ||
|
|
||
| #### 4. Guestfs Access and Execution | ||
| - "virt-v2v" reads the script from the mounted ConfigMap | ||
| - Script content is retrieved from the `user_firstboot.sh` key | ||
| - Guestfs adds the scripts by applying changes to the VM disk image | ||
| - When VM boots for the first time in PCD/OpenStack, the script executes automatically |
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.
we may not need these impl. details. Yes, good to have them, but it might confuse the users
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.
Will remove this
|
Bito Automatic Review Skipped - Files Excluded |
What this PR does / why we need it
Adds documentation for firstboot script usage.
Which issue(s) this PR fixes
(optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged)fixes #
Special notes for your reviewer
Testing done
firstboot-config-<vmwaremachine-resource-name>C:\Program Files\Guestfs\Firstboot\directories/root/virt-sysprep-firstboot.logand/usr/lib/virt-sysprep/scripts/paths/public/images/directory