In maas 1.2 through 1.4 the virsh power type requires only the Address and Power ID.
libvirt-bin package needs to be installed to get the
$ sudo apt-get -y install libvirt-bin
Power ID is the name of the virtual machine shown by
sudo virsh list --all
The address is a normal libvirt connect string:
If you want to use ssh you'll need to generate a ssh key pair for the maas user. By default there is no home directory created for the maas user.
$ sudo mkdir -p ~maas
$ sudo chown maas:maas ~maas
Add a login shell for the maas user (we'll only need this for the
ssh-copy-id command later; if you're putting ssh keys in place manually or using a different mechanism, this step isn't strictly needed):
$ sudo chsh -s /bin/bash maas
Generate a SSH keypair as the maas user (hit enter three times to accept the default path and empty password):
$ sudo -u maas ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/maas/.ssh/id_rsa):
Created directory '/home/maas/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/maas/.ssh/id_rsa.
Your public key has been saved in /home/maas/.ssh/id_rsa.pub.
Then add the public key to
~ubuntu/.ssh/authorized_keys on the vm server so virsh can use ssh without a password:
$ sudo -u maas -i ssh-copy-id firstname.lastname@example.org
As the maas user, test virsh commands against libvirt at 10.0.0.2:
$ sudo -u maas virsh -c qemu+ssh://email@example.com/system list --all