In maas 1.2 through 1.8 the virsh power type requires only the Address and Power ID.
MAAS 1.8 Screenshot
![MAAS 1.8 virsh power settings](https://i.stack.imgur.com/xjcAk.png)
MAAS 1.2-1.4 Screenshot
![MAAS 1.2-1.4 virsh power settings](https://i.stack.imgur.com/Zk0qN.png)
The libvirt-bin
package needs to be installed to get the virsh
command
$ sudo apt-get -y install libvirt-bin
the Power ID
is the name of the virtual machine shown by sudo virsh list --all
The address is a normal libvirt connect string:
qemu+ssh://ubuntu@10.0.0.2/system
or
qemu:///system
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 ubuntu@10.0.0.2
As the maas user, test virsh commands against libvirt at 10.0.0.2:
$ sudo -u maas virsh -c qemu+ssh://ubuntu@10.0.0.2/system list --all
I've resolved that upgraded MaaS with its own last release and following this procedure.
- On Region Controller run:
$: cat /var/lib/maas/secret
copy the key
- On Cluster Controller run:
$: sudo dpkg-reconfigure maas-cluster-controller
and adding the key copied from Region Controller, then after few second we'll see the new Cluster Controller on MaaS UI.
s
![enter image description here](https://i.stack.imgur.com/3kz8k.png)
![enter image description here](https://i.stack.imgur.com/CfnwP.png)
then on UI
![enter image description here](https://i.stack.imgur.com/TA8mt.png)
Best Answer
First, for MAAS to be able to manage VMware Workstation VMs, they must exist under the
Shared VMs
folder in VMware Workstation.Next, rather than adding nodes manually and then trying to set the power type, I would recommend using the
Add Hardware > Chassis
feature to add the nodes. This is a much more user friendly experience, as it will automatically discover all the nodes in a particular hypervisor, and configure them properly for use with MAAS, including the power type information.Be very careful if you are using this with a production VMware system, since performing this operation will change the configuration of your virtual machines. If you are using a VMware setup which contains a mix of VMs which will be MAAS managed and VMs which will not be, I strongly recommend renaming the MAAS-managed VMs within the hypervisor so that their names start with something identifiable, such as "maas". Then you can use the
Prefix filter
option and specify (for example) "maas" to manage only those nodes.When you enter your username and password, keep in mind that for VMware workstation, I've found that the username and password are the same as what you use for your OS login. (There are ways to add another user and give it access to your VMs if you aren't comfortable with giving MAAS that information.)