2

I'm using a stock Proxmox with salt-cloud to automatically provision lxc containers. Salt's provisioning fails while attempting to create any container with this cryptic error message:

Can't call method "map_method_by_name" on an undefined value at
    /usr/share/perl5/PVE/RESTHandler.pm
Dylan
  • 31
  • 4

1 Answers1

1

This issue can be resolved by adding the appropriate permissions to the user accessing the API:

Via the command-line:

pveum aclmod / -user salt@pve -role PVEVMAdmin
pveum aclmod / -user salt@pve -role PVEDatastoreAdmin

Remember to swap salt@pve for your own user.


Via the web interface:

  1. Make sure you're using the Server View and select Datacenter.

  1. Click on the Permissions tab:

  1. Click Add and from the drop-down, select User Permission

  1. In the dialog, under 'Path', enter /.
  2. In the 'User' drop-down, select the user salt-cloud is logging in as.
  3. Under 'Role', select 'PVEVMAdmin'.

  1. Repeat steps 3-6 for the 'PVEDatastoreAdmin' permission also.
Dylan
  • 31
  • 4
  • IMO, this answer isn't very useful. What permissions? Where do you set them? –  Aug 28 '16 at 09:15
  • Edited the answer to include some details. I tried to include images of the interface but I lack the reputation. – Dylan Aug 28 '16 at 09:40