MaaS Virsh Power Type - Power error

I have configured MaaS machine with power type “Virsh (virtual systems)” like this:

Power type: Virsh (virtual systems)
Address: qemu+ssh://ubuntu@192.168.8.11/system
Password (optional): none
Virsh VM ID: e0974a91-0120-486c-8a04-d20bfbb987fa

I’m able with user ubuntu and root to execute command from the maas host (rackd+regiond) and I get response with UUID of the VM:

virsh -c qemu+ssh://ubuntu@192.168.8.11/system domuuid vmname
e0974a91-0120-486c-8a04-d20bfbb987fa

Or I can get list of VMs without any issue (ssh key login). But there is still “Power error” in MaaS. I already installed missing package “libvirt-clients” to MaaS and I rebooted it. Other power type for example IPMI is working for me. I could not see anything relevant in the logs. What I can do more to find out the issue? MaaS 3.3.5 on Ubuntu 22.04.4, all updates installed + snap refreshed.

Thanks

Hi @borsik ,

this is a known issue caused by an unforeseen update of one of MAAS dependencies. We have a fix and we are currently working towards publishing new stable releases as soon as possible.

Meanwhile, you can refresh your snap to a hotfix branch:

sudo snap refresh --channel=3.3/stable/hotfix-bug-2053033 maas
1 Like

I am using MAAS 3.5.3-16341-g.7adb035d6-0ubuntu1~22.04.1 (installed w/apt) on an up-to-date Ubuntu 22.04 LTS, and seemingly running into the problem reported here.

I am successfully able to get my libvirt VM to PXE boot with MAAS, but when setting up Power Type to virsh prior to Commissioning, I run into the problem described here.

My connection URL is

qemu+ssh://root@10.61.60.2/system

which is what I use with my local virt-manager (desktop Linux) to connect to 10.61.60.2 (remote server/KVM host).

and the Virsh VM is the UUID I pulled from the VM element <uuid>......</uuid>

MAAS logging ends up in the journalctl facility on my host, and in paging through the results for the following two invocations, I see no errors:

The following is what I have pulled out of journalctl on 10.61.60.2:

Feb 24 15:39:56 kumo-x-maas-1 regiond[117504]: maasserver.websockets.handlers.machine: [critical] Failed to update power state of machine.
Feb 24 15:39:56 kumo-x-maas-1 regiond[117504]:         Traceback (most recent call last):
Feb 24 15:39:56 kumo-x-maas-1 regiond[117504]:           File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1750, in gotResult
Feb 24 15:39:56 kumo-x-maas-1 regiond[117504]:             current_context.run(_inlineCallbacks, r, gen, status)
Feb 24 15:39:56 kumo-x-maas-1 regiond[117504]:           File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1740, in _inlineCallbacks
Feb 24 15:39:56 kumo-x-maas-1 regiond[117504]:             status.deferred.errback()
Feb 24 15:39:56 kumo-x-maas-1 regiond[117504]:           File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 700, in errback
Feb 24 15:39:56 kumo-x-maas-1 regiond[117504]:             self._startRunCallbacks(fail)
Feb 24 15:39:56 kumo-x-maas-1 regiond[117504]:           File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 763, in _startRunCallbacks
Feb 24 15:39:56 kumo-x-maas-1 regiond[117504]:             self._runCallbacks()
Feb 24 15:39:56 kumo-x-maas-1 regiond[117504]:         --- <exception caught here> ---
Feb 24 15:39:56 kumo-x-maas-1 regiond[117504]:           File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 857, in _runCallbacks
Feb 24 15:39:56 kumo-x-maas-1 regiond[117504]:             current.result = callback(  # type: ignore[misc]
Feb 24 15:39:56 kumo-x-maas-1 regiond[117504]:           File "/usr/lib/python3/dist-packages/maasserver/websockets/handlers/machine.py", line 1256, in eb_unknown
Feb 24 15:39:56 kumo-x-maas-1 regiond[117504]:             failure.trap(UnknownPowerType, NotImplementedError)
Feb 24 15:39:56 kumo-x-maas-1 regiond[117504]:           File "/usr/lib/python3/dist-packages/twisted/python/failure.py", line 451, in trap
Feb 24 15:39:56 kumo-x-maas-1 regiond[117504]:             self.raiseException()
Feb 24 15:39:56 kumo-x-maas-1 regiond[117504]:           File "/usr/lib/python3/dist-packages/twisted/python/failure.py", line 475, in raiseException
Feb 24 15:39:56 kumo-x-maas-1 regiond[117504]:             raise self.value.with_traceback(self.tb)
Feb 24 15:39:56 kumo-x-maas-1 regiond[117504]:           File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1656, in _inlineCallbacks
Feb 24 15:39:56 kumo-x-maas-1 regiond[117504]:             result = current_context.run(
Feb 24 15:39:56 kumo-x-maas-1 regiond[117504]:           File "/usr/lib/python3/dist-packages/twisted/python/failure.py", line 489, in throwExceptionIntoGenerator
Feb 24 15:39:56 kumo-x-maas-1 regiond[117504]:             return g.throw(self.type, self.value, self.tb)
Feb 24 15:39:56 kumo-x-maas-1 regiond[117504]:           File "/usr/lib/python3/dist-packages/maasserver/models/node.py", line 6161, in exec_power_workflow
Feb 24 15:39:56 kumo-x-maas-1 regiond[117504]:             raise PowerActionFail(cause)
Feb 24 15:39:56 kumo-x-maas-1 regiond[117504]:         provisioningserver.rpc.exceptions.PowerActionFail: ExitError: exit status 1
Feb 24 15:39:56 kumo-x-maas-1 regiond[117504]: