mirror of
https://github.com/proxmoxer/proxmoxer.git
synced 2026-04-25 07:06:00 +03:00
[GH-ISSUE #60] need help for vm clone #31
Labels
No labels
backend:https
backend:local
backend:openssh
backend:ssh_paramiko
pull-request
status:ansible-issue
status:help-wanted
status:info-needed
status:proxmox-issue
status:review-needed
type:bug 🐞
type:dependency ⛓️
type:docs 📝
type:enhancement ⏫
type:maintenance 🛠️
type:meta
type:question ❓
type:request ✋
type:testing 🧪
version:1.x
version:latest
version:py2
version:py3
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/proxmoxer#31
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @badsmoke on GitHub (Jun 3, 2021).
Original GitHub issue: https://github.com/proxmoxer/proxmoxer/issues/60
hello people,
I am currently trying to clone vms using python.
I always have a standard template from which new vms are cloned.
my code looks like this
proxmoxer.core.ResourceException: 400 Bad Request: Parameter verification failed. - b'{"errors":{"vmid":"type check (\'integer\') failed - got \'source_id\'"},"data":null}'with a variable in the path unfortunately does not work, but vmid as parameter does not work either
proxmoxer.core.ResourceException: 501 Not Implemented: Method 'POST /nodes/kronos/qemu/clone' not implemented - b'{"data":null}'proxmox docu
https://pve.proxmox.com/pve-docs/api-viewer/index.html#/nodes/{node}/qemu/{vmid}/clone
thanks for the help
@jhollowe commented on GitHub (Jun 6, 2021):
try
node.qemu(source_id).clone.post(...). This follows a similar syntax as thenode = proxmox.nodes(node_name)line, putting the given argument in as the next segment of the path for the API call.You could also do
node(f"qemu/{source_id}/clone").post(...)if you wanted to use the string path functionality.@badsmoke commented on GitHub (Jun 9, 2021):
thank you, works great