ossobv / proxmove

Migrate virtual machines between different Proxmox VE clusters with minimal downtime

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: "parent: property is not defined"; when source has disk snapshots

devopstales opened this issue · comments

I try to migrate from pve5 to pve6 and get his error:

  # https://proxmox51.mydomain.intra:8006/api2/json
  api.nodes("proxmox109/qemu").create(vmid=151, **{'parent': 'upgrade', 'smbios1': 'uuid=ac34f6fb-03fa-4e6a-8ac3-b541350b2d40', 'cores': 1, 'net0': 'virtio=C2:17:6A:16:EB:75,bridge=vmbr0', 'description': 'Felelőse: Devops', 'memory': 10240, 'agent': '1', 'name': 'prometheus--CREATING', 'sockets': 2, 'ostype': 'l26', 'numa': 0, 'bootdisk': 'scsi0', 'scsihw': 'virtio-scsi-pci', 'onboot': 1})

Traceback (most recent call last):
  File "/usr/local/bin/proxmove", line 423, in create_vm
    vmid=vmid, **mutable_config)
  File "/usr/local/lib/python3.5/dist-packages/proxmoxer/core.py", line 96, in create
    return self.post(*args, **data)
  File "/usr/local/lib/python3.5/dist-packages/proxmoxer/core.py", line 87, in post
    return self(args)._request("POST", data=data)
  File "/usr/local/lib/python3.5/dist-packages/proxmoxer/core.py", line 79, in _request
    resp.content))
proxmoxer.core.ResourceException: 400 Bad Request: b'{"errors":{"parent":"property is not defined in schema and the schema does not allow additional properties"},"data":null}'
Traceback (most recent call last):

Hi!

I don't know where that 'parent' property comes from. (Or actually, it comes from the API GET from the VM on the PVE5 apparently.) I suspect it might be the Proxmox Snapshot Parent (did you make snapshots called 'upgrade'?)

In any case, apparently it's not allowed to write that when creating a new VM. Only properties listed in POST /nodes/{node}/qemu on https://pve.proxmox.com/pve-docs/api-viewer/index.html are.

Looks like the quickfix is to add an extra exception for 'parent', like this one:
https://github.com/ossobv/proxmove/blob/master/proxmove#L382-L386

(Note to self: pve version can be seen at https://PVE/api2/json/version )

After I removed the snapshot works correctly.

Off topic: that "Felelőse" (Hungarian?) of yours reminded me of "Kamelåså" (from a hilarious parody), assuming the pronounced stress is on the second to last syllable. But the stress is probably on the 2nd?

After I removed the snapshot works correctly.

Well. I'm not using snapshots; so we can close this one.