Single Node - proxmoxer.core.ResourceException: 401 Unauthorized: permission denied - invalid PVE ticket - b

millap

Member
Nov 13, 2019
4
0
21
50
Hi All,

I wonder if anyone can offer any advice on error - proxmoxer.core.ResourceException: 401 Unauthorized: permission denied - invalid PVE ticket - b

I'm getting this when trying to run an ansible playbook which is cloning a VM. The playbook looks like follows -

Code:
- name: Create VM on Proxmox
  hosts: localhost
  gather_facts: no
  vars_files:
   - /etc/ansible/modules/vars.yml
  vars_prompt:
   - name: vm_name
     prompt: Enter the name of the VM (i.e lab1, lab2, etc)
     private: no
  tasks:
    - set_fact:
        proxmox_host: "{{ proxmox_host }}"
        proxmox_user: "{{ proxmox_user }}"
        proxmox_pwd: "{{ proxmox_pwd }}"
        proxmox_node: "{{ proxmox_node }}"
    - community.general.proxmox_kvm:
        api_host: "{{ proxmox_host }}"
        api_user: "{{ proxmox_user }}"
        api_password: "{{ proxmox_pwd }}"
        node        : "{{ proxmox_node }}"
        clone       : template00 
        name        : "{{ vm_name }}" 
        storage     : local-storage
        format      : raw
        full        : true
        timeout     : 500

Have tried rebooting the PVE node, and ensured that time is in-sync, etc but to no avail.

Version: pve-manager/8.0.4

The annoying thing is I see in the PVE logs that the script is able to login successfully -

Code:
16:17:04 pve00 pvedaemon[1463]: <root@pam> successful auth for user 'root@pam'

It just crashes out at the task.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!