Running KVM on same node as MAAS (snap/2.9)

Hello,

Just recently started deploying a new MAAS and this time using the snap. However, i would like to use the MAAS node itself to run some VMs and in the past that was fine.

I just had to add the maas user ssh-key to be able to authenticate to virsh without password.

When installing MAAS as a snap the maas user is not created and therefore i cannot find a way to create and/or add the ssh-key for passwordless login.

How would i go about it when using the snap?

Thanks,
Emil!

@emil-jacero, what version of MAAS (2.9)?

did you glance at this, and does it help at all?

Hi,

I am running 2.9 atm.
I have added the ssh key of the host ubuntu user, because i use that account to access deployed machines.

To clarify. When installing MAAS from APT the installation creates a user named maas. I usually create an ssh-key and add that public key to the libvirt user’s authorized_keys. This would allow MAAS to start and stop KVM VMs by itself.

However with the snap instead I cannot find a way to get the same result.

For example, following this guide does not work because the maas user does not exist when you install with Snap

@emil-jacero, thanks for this tip. looks like i need to go thru these tutorials and take a look. meanwhile, when you said, " I have added the ssh key of the host ubuntu user, because i use that account to access deployed machines…" – were you indicating that you have a workaround?

Hi,

No i did not solve it like that :slight_smile:
But i have a solution now.

I first created a user “maas”, then added that user to the group libvirt.
I then followed this guide. Take a look at the steps at the bottom.

Thank you :slight_smile:

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.