Conversation
Signed-off-by: ShubhaOracle <[email protected]>
dupondje
left a comment
There was a problem hiding this comment.
I am also missing tests.
Cause nothing is added to tests now...
| .when(FeatureSupported.isBiosTypeSupported(eCluster.getCompatibilityVersion()) | ||
| && eCluster.getBiosType() != null | ||
| && eCluster.getBiosType() != BiosType.I440FX_SEA_BIOS | ||
| && eCluster.getBiosType() != BiosType.AMPERE |
There was a problem hiding this comment.
We should validate BiosType together with Architecture.
So that you don't select BiosType.AMPERE on X86 for example.
Next to that, name the BiosType VIRT/VIRT_AAVMF ?
This patch is not ampere-only...
| public ValidationResult nonDefaultBiosType() { | ||
| Cluster eCluster = newCluster != null ? newCluster : cluster; | ||
| ArchitectureType architecture = getArchitecture(); | ||
| return ValidationResult.failWith(EngineMessage.NON_DEFAULT_BIOS_TYPE_FOR_X86_ONLY) |
There was a problem hiding this comment.
Error message should also change then.
| public static ValidationResult isBiosTypeSupported(VmBase vmBase, Cluster cluster, OsRepository osRepository) { | ||
| if (FeatureSupported.isBiosTypeSupported(cluster.getCompatibilityVersion()) | ||
| && vmBase.getBiosType() != BiosType.I440FX_SEA_BIOS | ||
| && vmBase.getBiosType() != BiosType.AMPERE |
| } | ||
|
|
||
| // For aarch64, always use host cpu flags | ||
| if (getCluster().getArchitecture().getFamily() == ArchitectureType.aarch64) { |
There was a problem hiding this comment.
I would not do it this way.
When adding the CPU in the ServerCPUList in packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql, I would for example there put no CPU flags.
If you then create a VM with a CPU without CPU flags, it should use auto-passtrough/host cpu flags.
This has the advantage that in the future we can just add new ARM CPU's without messing in the code again.
| } else if (sc.getFlags().contains(CpuVendor.IBMS390.getFlag())) { | ||
| s390CpuByNameDictionary.put(sc.getCpuName(), sc); | ||
| s390CpuByVdsNameDictionary.put(sc.getVdsVerbData(), sc); | ||
| } else if (sc.getFlags().contains(CpuVendor.ARM.getFlag())) { |
There was a problem hiding this comment.
I would name it AARCH64 instead of ARM
|
|
||
| protected void buildModel(VmBase vmBase, | ||
| BuilderExecutor.BuilderExecutionFinished<VmBase, UnitVmModel> callback) { | ||
| BuilderExecutor.BuilderExecutionFinished<VmBase, UnitVmModel> callback) { |
| os.ubuntu_16_04_aarch64.id.value = 3006 | ||
| os.ubuntu_16_04_aarch64.name.value = Ubuntu Xenial Xerus LTS+ | ||
| os.ubuntu_16_04_aarch64.derivedFrom.value = other_linux_aarch64 | ||
|
|
There was a problem hiding this comment.
We should add some more/recent OS'es
| select fn_db_update_config_value('ClusterEmulatedMachines','pc-q35-rhel8.1.0,pc-q35-4.1,pc-i440fx-rhel7.6.0,pc-i440fx-2.12,pseries-rhel8.1.0,s390-ccw-virtio-2.12','4.4'); | ||
| select fn_db_update_config_value('ClusterEmulatedMachines','pc-q35-rhel8.3.0,pc-q35-4.1,pc-i440fx-rhel7.6.0,pc-i440fx-2.12,pseries-rhel8.3.0,s390-ccw-virtio-2.12','4.5'); | ||
| -- aarch64 emulated machine types | ||
| select fn_db_update_config_value('ClusterEmulatedMachines','pc-q35-rhel8.6.0,pc-q35-4.1,pc-i440fx-rhel7.6.0,pc-i440fx-2.12,pseries-rhel8.4.0,s390-ccw-virtio-2.12,virt,virt-6.0,virt-6.1,virt-6.2','4.7'); |
There was a problem hiding this comment.
What virt types does qemu-aarch64 had on RHEL9 and RHEL10?
| select fn_db_update_config_value('IsMigrationSupported','{"undefined": "true", "x86": "true", "ppc" : "true", "s390x" : "true"}','4.2'); | ||
| select fn_db_update_config_value('IsMemorySnapshotSupported','{"undefined": "true", "x86": "true", "ppc" : "true", "s390x" : "true"}','4.2'); | ||
| select fn_db_update_config_value('IsSuspendSupported','{"undefined": "true", "x86": "true", "ppc" : "true", "s390x" : "true"}','4.2'); | ||
| select fn_db_update_config_value('IsMigrationSupported','{"undefined": "true", "x86": "true", "ppc" : "true", "s390x" : "true", "aarch64" : "true"}','4.7'); +select fn_db_update_config_value('IsMemorySnapshotSupported','{"undefined": "true", "x86": "true", "ppc" : "true", "s390x" : "true", "aarch64" : "true"}','4.7'); |
| select fn_db_update_config_value('IsMemorySnapshotSupported','{"undefined": "true", "x86": "true", "ppc" : "true", "s390x" : "true"}','4.2'); | ||
| select fn_db_update_config_value('IsSuspendSupported','{"undefined": "true", "x86": "true", "ppc" : "true", "s390x" : "true"}','4.2'); | ||
| select fn_db_update_config_value('IsMigrationSupported','{"undefined": "true", "x86": "true", "ppc" : "true", "s390x" : "true", "aarch64" : "true"}','4.7'); +select fn_db_update_config_value('IsMemorySnapshotSupported','{"undefined": "true", "x86": "true", "ppc" : "true", "s390x" : "true", "aarch64" : "true"}','4.7'); | ||
| select fn_db_update_config_value('IsSuspendSupported','{"undefined": "true", "x86": "true", "ppc" : "true", "s390x" : "true", "aarch64" : "true"}','4.7'); |
There was a problem hiding this comment.
Do we only want to support 4.7 ? (Now already 4.8).
Signed-off-by: ShubhaOracle [email protected]
Fixes issue # (delete if not relevant)
Changes introduced with this PR
Are you the owner of the code you are sending in, or do you have permission of the owner?
[y/n]Yes