Skip to content

HypervisorGuruBase.java did not consider aarch64 #11529

@longxiaotian799

Description

@longxiaotian799

problem

start from line 315 in HypervisorGuruBase.java

if (vmProfile.getTemplate().getBits() == 32) {
    to.setArch("i686");
} else if("s390x".equals(System.getProperty("os.arch"))) {
    to.setArch("s390x");
} else {
    to.setArch("x86_64");
}

If host machine is arm, it goes to to.setArch("x86_64"). "to" refers to "VirtualMachineTo", and it will be passed to "LibvirtComputingResource" and then to "LibvirtVMDef" later, thus affecting the generation of <os><type arch=...>. Since this part is hard-coded here, the method "LibvirtVMDef.setGuestArch("aarch64")" has no chance to be called at all.

versions

main branch

The steps to reproduce the bug

...

What to do about it?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions