Closed richardlawley closed 5 years ago
@richardlawley You can see engine/schema/src/main/resources/META-INF/db/schema-41000to41100.sql
as a reference on how to add support for a xenserver version. Is it fair to assume that every 7.1.x will support the same sets of xenserver guests? If yes, we can modify the business logic to take any existing mapping for any 7.1.x XenServer version to be used for any new 7.1.y version.
I'm fine with how to fix it on a one-off, but other people might be less comfortable.
Regarding future versions, I think it's possible that they could potentially introduce new templates, so there should still be the capability to add specific overrides, but modifying it to try 7.1.2, 7.1.1, 7.1.0 etc should take care of most situations with the ability to add new rows if needed.
@richardlawley I think we can deal with a large refactoring after 4.13, likely in 4.14, till then I've added the support here: https://github.com/apache/cloudstack/pull/3467/files Please review.
ISSUE TYPE
COMPONENT NAME
CLOUDSTACK VERSION
CONFIGURATION
N/A
OS / ENVIRONMENT
XenServer 7.1.2 (7.1 CU2) Hosts
SUMMARY
There are no entries in guest_os_hypervisor for XenServer 7.1.2 (7.1 CU2 - the current LTS XenServer) which means guests are booted using the "Other Install Media" template. Amongst other things, this means that PV guests boot as HV, but also likely means guests won't get XenServer optimisations for their OS type.
Perhaps a better way rather than just inserting specific rows for this version would be to add logic to ignore the revision number in a version matching pattern x.y.z if there are no rows found, e.g. look for row with version = 7.1.2, fallback to row with version = 7.1.0 (would still work if XenServer is updated without CloudStack being updated).
Related: #3086
STEPS TO REPRODUCE
Install Fresh CloudStack instance with new XenServer 7.1.2 hosts. Wait for CS to try to deploy system VMs.
EXPECTED RESULTS
System VMs should boot using the Debian Wheezy 7.0 (64-bit) XenServer template
ACTUAL RESULTS
System VMs should boot using the Other Install Media XenServer template (which fails to boot in a virtual environment using XenServer running on VMs, only capable of running PV).