xcp-ng: allow passing vm boot options#5335
Conversation
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
|
@blueorangutan package |
|
@nvazquez a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian. SL-JID 921 |
|
@blueorangutan help |
|
@nvazquez I understand these words: "help", "hello", "thanks", "package", "test" Blessed contributors for kicking Trillian test jobs: ['rhtyd', 'nvazquez', 'PaulAngus', 'borisstoyanov', 'DaanHoogland', 'shwstppr', 'andrijapanicsb', 'Spaceman1984', 'Pearl1594', 'davidjumani', 'harikrishna-patnala', 'vladimirpetrov', 'sureshanaparti', 'weizhouapache'] |
|
@blueorangutan test centos7 xcpng81 |
|
@nvazquez a Trillian-Jenkins test job (centos7 mgmt + xcpng81) has been kicked to run smoke tests |
|
Trillian Build Failed (tid-1708) |
|
@blueorangutan test centos7 xcpng82 |
|
@rhtyd unsupported parameters provided. Supported mgmt server os are: |
|
@blueorangutan test centos7 xcpng82 |
|
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + xcpng82) has been kicked to run smoke tests |
|
@blueorangutan test centos7 xcpng82 |
|
@davidjumani a Trillian-Jenkins test job (centos7 mgmt + xcpng82) has been kicked to run smoke tests |
|
@nvazquez @rhtyd @davidjumani jfyi, this PR is very much in draft. I've not even built/tested it locally 😀 |
|
Trillian Build Failed (tid-1717) |
|
Cool okay @shwstppr |
|
Trillian Build Failed (tid-1719) |
|
Was testing the integration @shwstppr 😄 |
|
Looking at the code changes I understand that createVmFromTemplate makes use of the setVmBootDetails to assign bootType. |
|
@tsinik-dw Will have to check migration but at the moment I think that may not be needed as Another concern for me right now is to check and store host capability for UEFI support at the time of adding host. @blueorangutan package |
|
@shwstppr a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
With current changes by setting boot type and mode from UI/API, I was able to get VM running with desired boot options, |
|
@nvazquez @rhtyd @tsinik-dw this is ready for review. Tested, upgrade host and VM restart, VM migration, etc. |
|
@blueorangutan test centos7 xcpng82 |
|
@shwstppr a Trillian-Jenkins test job (centos7 mgmt + xcpng82) has been kicked to run smoke tests |
|
Trillian test result (tid-1762)
|
DaanHoogland
left a comment
There was a problem hiding this comment.
small concern, LG otherwise
| if (StringUtils.isEmpty(hostProductVersion)) { | ||
| return false; | ||
| } | ||
| return hostProductVersion.compareTo(MIN_UEFI_SUPPORTED_VERSION) >= 0; |
There was a problem hiding this comment.
is this comparitor able to decide 10.3 > 8.2? I think this needs more robustness.
There was a problem hiding this comment.
@DaanHoogland latest commit should fix this
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
|
@blueorangutan package |
|
@shwstppr a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian. SL-JID 1032 |
|
@shwstppr I saw your testing setup and adjusted the workflow accordingly for my PoC. Keeping in mind that in production I cannot turn off the VMs while upgrading ACS and XenServer I followed the next steps:
After migrating the VMs from XenServer 7.0 host to XCP-NG 8.2 host I saw that the Bios firmware setting of the VMs changed from bios to (default) bios To be honest I couldn't understand exactly how this worked. Could it be the change of the default (bios) setting triggered by ACS during reboot? Overall, the test was successful but I'll do some more tests this weekend to further investigate the details of the above. Lastly, I have a question. During VM creation I can set the bootType and bootMode (through Advanced settings), but once the VM is started there doesn't appear to be a way to change these settings again. Is it possible to change these settings again after the VM is created? |
|
@tsinik-dw regarding reboot working normally, it worked because everytime VM is started or rebooted from ACS VM specs are set by StartCommand. And this PR adds change for that to use default boot mode as BIOS there. For changing boot type and mode after staring VM, you can set values in UI. Go to VM details. There is a settings tab there. Note: above pattern is not added/changed by this PR |
|
@blueorangutan test centos7 xcpng82 |
|
@nvazquez a Trillian-Jenkins test job (centos7 mgmt + xcpng82) has been kicked to run smoke tests |
|
Trillian test result (tid-1816)
|
|
@shwstppr is this ready for merging? |
|
@rhtyd PR is ready from my end but @tsinik-dw mentioned he wanted to do some more tests over the weekend. |
|
Copy @shwstppr. |
|
@rhtyd @shwstppr
No further issues to report here :-) ...Excellent work! |
|
Merging this based on manual tests by author and @tsinik-dw and smoketests. |
|
when you shutdown the vm and then try to boot, it won't boot |
Description
Allows selecting boot type and boot mode for Xenserver/XCP-ng in UI.
XCP-ng 8.2 allows UEFI boot type for guest VMs.
Changes allow setting and updating the host's UEFI capability in DB while adding or re-connection. It allows honoring VM details while orchestrating VM start on XCP-ng hypervisor
Addresses #5204
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
Also, tested Windows Server 2019 deployment with UEFI boot type: