Closed megabert closed 2 years ago
I think there are two exceptions and you're only showing us the first one. Am I correct?
That first Traceback
is not a problem, as that is caught on L1985:
https://github.com/ossobv/proxmove/blob/be56486531d971b08d1e48f1458fa54bf65a53f5/proxmove#L1981-L1991
Ah, indeed, your edits add this one:
Traceback (most recent call last):
File "/root/proxmove/./proxmove", line 2299, in <module>
main()
File "/root/proxmove/./proxmove", line 2295, in main
vmmover.run(options.dry_run)
File "/root/proxmove/./proxmove", line 1935, in run
self.move_vm(vm, translator, dry_run)
File "/root/proxmove/./proxmove", line 1975, in move_vm
dst_vm = self._start_moving_vm(src_vm, translator)
File "/root/proxmove/./proxmove", line 1989, in _start_moving_vm
dst_vm = self.dst_pve.create_vm(
File "/root/proxmove/./proxmove", line 477, in create_vm
vmhash = getattr(api_node, 'qemu').create(**mutable_config)
File "/usr/local/lib/python3.9/dist-packages/proxmoxer/core.py", line 135, in create
return self.post(*args, **data)
File "/usr/local/lib/python3.9/dist-packages/proxmoxer/core.py", line 126, in post
return self(args)._request("POST", data=data)
File "/usr/local/lib/python3.9/dist-packages/proxmoxer/core.py", line 105, in _request
raise ResourceException(
proxmoxer.core.ResourceException: 400 Bad Request: Parameter verification failed.
Apparently it dislikes one of these:
api.nodes("px03/qemu").create(**{
'smbios1': 'uuid=9bdc528d-3a9a-424c-8cb7-5944832d741e',
'tags': 'prod', 'ostype': 'l26', 'boot': 'cd', 'sockets': 1, 'numa': 0,
'name': 'kvm09-xxx--CREATING', 'bootdisk': 'scsi0',
'net0': 'virtio=12:05:48:BF:7E:91,bridge=vmbr1,firewall=1',
'onboot': 1, 'meta': 'creation-qemu=6.1.0,ctime=1643742755',
'cores': 1, 'memory': 2048, 'agent': '1', 'vmid': 128
})
What you can do is add a breakpoint before L477:
try:
import pdb; pdb.set_trace() # <-- add this line
vmhash = getattr(api_node, 'qemu').create(**mutable_config)
except ResourceException:
log.exception(
Then you can try running the code above manually, whilst leaving out one or more arguments.
E.g.
(pdb) mydict = {'smbios1': 'uuid=9bdc528d-3a9a-424c-8cb7-5944832d741e', 'tags': 'prod', 'ostype': 'l26', 'boot': 'cd', 'sockets': 1, 'numa': 0, 'name': 'kvm09-xxx--CREATING', 'bootdisk': 'scsi0', 'net0': 'virtio=12:05:48:BF:7E:91,bridge=vmbr1,firewall=1', 'onboot': 1, 'meta': 'creation-qemu=6.1.0,ctime=1643742755', 'cores': 1, 'memory': 2048, 'agent': '1', 'vmid': 128}
(pdb) tmpdict = mydict.copy()
(pdb) del tmpdict['tags']
(pdb) api.nodes("px03/qemu").create(**tmpdict)
If that works, then the new proxmox doesn't handle the tags
parameter.
Also, you'll likely want one of these fixes, so you get useful info from the proxmox 400 error:
https://github.com/ossobv/proxmove#debugging https://github.com/proxmoxer/proxmoxer/commit/6c980a9f9c364f4f317924f0425f87ba16fbeb6f https://github.com/swayf/proxmoxer/pull/83/files https://github.com/swayf/proxmoxer/pull/55/commits/065ec5963189da3a7cf5e7c93f154033a1ba9fff
Thanks for the support. The patch for the issues you hinted for additional debug info is already applied to my proxmoxer Version.
I created a new test-VM.
The issue is caused by the "meta" key:
(Pdb) mydict = {'ostype': 'l26', 'smbios1': 'uuid=5142e2cd-6f73-4ddc-abce-eb75805c3cbb', 'boot': 'cd', 'net0': 'virtio=CA:50:BA:45:1E:88,bridge=vmbr0,firewall=1', 'name': 'testvm--CREATING', 'numa': 0, 'scsihw': 'virtio-scsi-pci', 'sockets': 1, 'cores': 1, 'meta': 'creation-qemu=6.1.0,ctime=1643811510', 'memory': 2048, 'vmid': 128}
(Pdb) tmpdict = mydict.copy()
(Pdb) self.api.nodes("px03/qemu").create(**tmpdict)
*** proxmoxer.core.ResourceException: 400 Bad Request: Parameter verification failed.
(Pdb) del tmpdict['meta']
(Pdb) self.api.nodes("px03/qemu").create(**tmpdict)
'UPID:px03:000B75E2:097D2D73:61FA9776:qmcreate:128:adminrobot@pve:'
A "meta" - Key is not listed in Proxmox PVE API Viewer:
https://pve.proxmox.com/pve-docs/api-viewer/index.html#/nodes/{node}/qemu
This may serve as a first workaround:
+++ proxmove 2022-02-02 15:53:26.243581105 +0100
@@ -466,6 +466,7 @@
# Guess new VMID, set id and name.
vmid = self.get_free_vmid()
mutable_config['vmid'] = vmid
+ del mutable_config['meta']
mutable_config['name'] = name_with_suffix
assert 'hostname' not in mutable_config, mutable_config # lxc??
Nice going. This commit should fix it for you.
Hi,
I'm having issues when migrating:
This is my .proxmoverc on both nodes:
I'd logged into both clusters with the adminrobot account with the given password and verified that I have full "Administrator" - Role privileges. The proxmove from pxc01 to px04 is working(sometimes, sometimes not with the same error shown here), but the way back never works due to the given error message.
All Proxmox Nodes are up2date with the no-subscription repo: