-
Notifications
You must be signed in to change notification settings - Fork 242
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
libvirt-vm:Add support for cmdline parameter for --boot #3977
base: master
Are you sure you want to change the base?
Conversation
Currently, kernel_args is not present in the output of "virt-install --boot help" as "--boot cmdline=%s" is the recommended way of passing kernel command line parameters. As a result, the import/install test is failiing since kernel and initrd parameter is being passed without kernel_args But --boot option supports both kernel_args and cmdline parameter for passing kernel arguments to the guest, i.e, --boot kernel=<vmlinuz>,initrd=<initrd>,cmdline=<kernel -cmdline> (or) --boot kernel=<vmlinuz>,initrd=<initrd>,kernel_args= <kernel-cmdline> This patch adds support of reading both cmdline and kernel_args parameter and passes whichever is available from config to the virt-install --boot option Signed-off-by: Misbah Anjum N <[email protected]>
ExplanationThis particular piece of code checks the presence of "kernel_args" parameter in the output of
But the output of
This is because, "cmdline" is the recommended way of passing the kernel command line parameters |
Config file
Before patchkernel_args is not passed in --boot
After patchkernel_args is being passed in --boot
|
Please check the after patch output and confirm. |
The following is the updated output after patch
Pointing to the specific line where |
@@ -986,6 +986,8 @@ def add_kernel( | |||
result += "initrd=%s," % initrd_path | |||
if has_sub_option("boot", "kernel_args") and kernel_args: | |||
result += 'kernel_args="%s",' % kernel_args |
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.
Now that kernel_args is not part of virt_install shall we remove the check.
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.
@harihare
I kept that for people still using the older virt-install tool which has kernel_args parameter listed in virt-install --boot help
If that is not required, then I can remove that check
@clebergnu can you please help us to trigger CI for this PR |
libvirt-vm: Add support for cmdline parameter for --boot
Currently, kernel_args is not present in the output of "virt-install --boot help" as "--boot cmdline=%s" is the recommended way of passing kernel command line parameters. As a result, the import/install test is failiing since kernel and initrd parameter is being passed without kernel_args
But --boot option supports both kernel_args and cmdline parameter for passing kernel arguments to the guest, i.e,
--boot kernel=<vmlinuz>,initrd=<initrd>,cmdline=<kernel-cmdline>
(recommended way)(or)
--boot kernel=<vmlinuz>,initrd=<initrd>,kernel_args= <kernel-cmdline>
This patch adds support of reading both cmdline and kernel_args parameter and passes whichever is available from config to the virt-install --boot option
Signed-off-by: Misbah Anjum N [email protected]