Closed timcole closed 1 year ago
add a console.log(newid)
for me it do not contains a number.
... newid=105 oups it looks ok.
I will check that later.
did it work with the previous version?
Just downgraded again and it's broke in 0.2.0 as well ðŸ˜
in one of my scripts I use this code:
console.log(`Using template ${template.vmid} (${template.name})`);
console.log(`build VM: ${id} on ${server.hostname}`);
const newid = 1000 + id;
await server.destroyVM(newid)
// const newid = 1000 + id;
console.log(`creating VM: ${newid}`);
await api.nodes
.$(server.node)
.qemu.$(template.vmid)
.clone.$post({ newid, name: `vm-${serverName}-${id}` });
and it used to work.
It may work only with Proxmox 6, Can not with Proxmox 7. I publish a 0.3.2, which may fix this issue, but I can not test it right now.
Maybe Proxmox 6 supported sending query params? We are using Proxmox 7 so can't check but I think that's likely.
Can't test the new update in our same codebase because we swapped out for an own in-house solution yesterday (too many bugs and licensing issues for our liking with this lib) but created a sample script just to test the update for you and seems to be fixed now.
Thanks for the resolution and best of luck on the project!
Mutation requests $post, $put send query strings for data instead of using the body.