proxmoxer.core.ResourceException: 500 Internal Server Error: unable to find configuration file for VM 100 on node 'pve'

rajeshrprox

New Member
Jan 12, 2024
2
0
1
I am new to proxmox and to the Proxmoxer Python API. I got some examples of using the Proxmoxer api from its use in the Ansbile playbook.

In my python program, I am able to run all the 'get' API calls using the Proxmoxer Python library, like
print(proxmox.access.users.get()). that works, so the login creds all work.

However, when I call the API to do a full clone, I get a cryptic error:

proxmoxer.core.ResourceException: 500 Internal Server Error: unable to find configuration file for VM 100 on node 'pve'

Here is the snippet of my code:
proxmox = ProxmoxAPI(target, user=user, password=password, verify_ssl=False)
vmname="foobar"
pve_node = "pve"
clone_id = "9001" # vmid of my Ubuntu2204 Linux Template
proxmox_node = proxmox.nodes(pve_node)

# arg list
post_data = {
"vmid": proxmox.cluster.nextid.get(),
"node": pve_node,
"name": vmname,
"newid": clone_id
}
taskid = proxmox_node.qemu(post_data['vmid']).clone.post(**post_data) # i tried calling .create(**post_data) too, same error message

I get the above error.

I logged into PVE and created a dummy file "touch /etc/pve/qemu-server/100.conf" to see if a config file should be created ahead of creating a VM. However, i got an error that "configuration file for VM 101" was missing. So thats not the issue.

I am not able to find any logs on Proxmox /var/log or journalctl -f , about any other debug info when I run my script.

Any tips?
 
never mind, i used Postman to verify that i was passing 100 (new VM id) and 9001 (vm template id) interchanged. once i passed them in the right order, it worked!