PPC64 deployment?

Hi,

with some help from here I got virsh running with maas. I downloaded ppc64 images for tests, qemu-ppc64 is installed on virsh-host, all done.

But I’m failing the moment that I can’t setup ppc64 architecutre for VM deployment :frowning:

I tried to detect some kind of description how to enable architectures in maas configuration - didn’t.

I just added a ppc64 machine via virsh to the qemu-host, now maas fails with “Failed talking to pod: ‘ppc64’” when doing a rescan.

Checked the API description and client description, everywhere is explained how to add a virtual host - but not how to enable architectures on a virtual host or in general. :frowning:

Can somebody point me to the correct documentation so I can set up a vm-host service ppc64 architecture (or others)

Thanks

Hi @elektritter,

Could you please describe the steps that you followed in order to add the virsh host? Did you add the server to MAAS and then deploy it with the option “Register as MAAS KVM host”? Did you use a virsh connection endpoint and password of a machine non-managed by MAAS? I expect that you did the latter.

In case you tried to register the virsh host by its connection endpoint, then the following may have happened. The VM host is created as a MAAS entity as a first step. Then MAAS rack is trying to establish a connection and discover virsh capabilities/resources. This is a potential stage for receiving the error.

As a first step I would like you to confirm that your rack controller is able to perform SSH to the virsh host: https://maas.io/docs/managing-vm-hosts#heading--set-up-ssh. Afterwards, can you please run the refresh command and confirm that it is working as expected? In my case, with a dummy connection, I am receiving the following error. In your case, if everything is working as expected you should receive a JSON with VM Host details:

$ maas <profile> vm-host refresh <vm_host_id>
Failed talking to pod: Failed to login to virsh console.

Let’s start with this confirmation steps before moving on to VM creation.

The login is not a problem. I created a machine running qemu incl. qemu-ppc64, creating a vm for PPC64 directly on virsh is not a problem.

Maas can deploy a amd64 machine to this environment, no problem, too.

The only thing: I can’t deploy a ppc64 machine via maas because it is only offering amd64 as target architecture :frowning:

Eg…, the connection works well. ppc64 qemu binaries are installed. But no ppc64 deployment from within maas possible.

If this is the case, I would like you to confirm that you have downloaded a ppc64el arch flavor of the image of your choice and that this image has been synced to your rack controller(s).

You can do it like this:

Get ID of the boot-source you are using

maas admin boot-sources read 

Success.
Machine-readable output follows:
[
    {
        "created": "2023-12-25T21:10:41.331",
        "updated": "2023-12-25T21:14:10.721",
        "url": "http://images.maas.io/ephemeral-v3/stable/",
        "keyring_filename": "/snap/maas/current/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg",
        "id": 1,
        "keyring_data": "",
        "resource_uri": "/MAAS/api/2.0/boot-sources/1/"
    }
]

Get selections from that boot-source

maas admin boot-source-selections read 1

Success.
Machine-readable output follows:
[
    {
        "os": "ubuntu",
        "release": "focal",
        "arches": [
            "amd64"
        ],
        "subarches": [
            "*"
        ],
        "labels": [
            "*"
        ],
        "id": 1,
        "boot_source_id": 1,
        "resource_uri": "/MAAS/api/2.0/boot-sources/1/selections/1/"
    }
]

Update the selection to include ppc64el

maas admin boot-source-selection update 1 1 arches=amd64 arches=ppc64el

Success.
Machine-readable output follows:
{
    "os": "ubuntu",
    "release": "focal",
    "arches": [
        "amd64",
        "ppc64el"
    ],
    "subarches": [
        "*"
    ],
    "labels": [
        "*"
    ],
    "id": 1,
    "boot_source_id": 1,
    "resource_uri": "/MAAS/api/2.0/boot-sources/1/selections/1/"
}

Import to rack controllers

maas admin boot-resources import

Success.
Machine-readable output follows:
Import of boot resources started

Wait until is-importing return false

watch maas admin boot-resources is-importing

Success.
Machine-readable output follows:
false

After the above steps, if you have ready machines with architecture ppc64el you could deploy them with Ubuntu Focal.

Ok, got it - in fact I readded the target machine and now it don’t send error messages when ppc64 vms exists.

So maas can handle it.

But last question: While playing around I can’t get a netboot running. I setup a ppc64el machine manually via virsh, (machine type pseries), it tries to retrieve netboot image from maas and ends up with

TFTP Received pxelinux.0 (74 KBytes)
E3403: Bad executable
E3406: Client application returned an error.

in VM.

Eg, looks like maas don’t send a correct boot image. Is there another configuration I’m missing?

And: many thanks for all your help!

Hi @elektritter,

Can you please compose the VM from maas instead of manual and first a) confirm that commissioning succeeds and puts the machine in Ready state 2) the deployment succeeds and sends the correct bootloader.

I would expect that your machine would receive the bootppc64.bin instead of pxelinux.0.

You can use the defaults for compose:

# Commission
$ vm_host_id=$(maas <profile> vm-hosts read | jq -r '.[].id')
$ maas <profile> vm-host compose $vm_host_id

Success.
Machine-readable output follows:
{
    "system_id": "gyaqed",
    "resource_uri": "/MAAS/api/2.0/machines/gyaqed/"
}

# After ~2-3 minutes
$ maas admin machine read gyaqed | jq -r '.status_name'
Ready

# Deploy
$ maas admin machine deploy gyaqed distro_series=ubuntu/focal

# After ~4-5 minutes
$ maas admin machine read gyaqed | jq -r '.status_name'
Deployed

— stupid text deleted —

Ok, I have played a bit.

The main problem is here: I can’t set the architecture to ppc64le. Currently it looks like that maas only uses the architecture where virtualization (eg, command kvm) is possible - but cannot select architecture(s) for EMULATION (eg., command qemu-system-ppc64le).

And we need the last. So unless I oversee something we can’t use MAAS for this but in this case it is ok and we have to setup ppc64el machines manually.

E.

Hi @elektritter,

So it seems that your host’s architecture is something different than ppc64le. I assume it is amd64. In that case, you are right. MAAS will run https://github.com/maas/maas/blob/master/src/provisioningserver/drivers/pod/virsh.py#L1092-L1109 to determine the path of the emulator. Since the --arch is not specified, this command will search for the arch of the host’s CPU. If MAAS was to set it, given that the emulator is installed (manually) you could get the desired path.

Here is the output from my amd64 laptop on which I have installed both emulators (amd64 and ppc):

$ virsh domcapabilities --virttype qemu | grep path
  <path>/usr/bin/qemu-system-x86_64</path>
...

$ virsh domcapabilities --arch ppc64 --virttype qemu | grep path
  <path>/usr/bin/qemu-system-ppc64</path>
...

This is something not supported by MAAS but, if you are interested, I
would suggest to open a feature request where you can develop the idea
further and share it with the community.

The next link contains information about the request process:
https://maas.io/docs/requesting-features-and-enhancements