output-format error with pvesh create

immo

Renowned Member
Nov 20, 2014
96
1
73
root@prox01:~# pveversion
pve-manager/5.2-8/fdf39912 (running kernel: 4.13.13-5-pve)

but I get a
Unknow option: output-format
error

all the time I try to clone a VM

pvesh create /nodes/prox05/qemu/800/clone -newID 603 -full 1 -name TestPC1 -storage Storage -format qcow2 -target prox07

Whats wrong here...

even the simples
root@prox01:~# pvesh create /nodes/prox05/qemu/800/clone --newid 603 --output-format json
Unknown option: output-format
400 unable to parse option
proxy handler failed: create nodes/prox05/qemu/800/clone --newid <integer> [OPTIONS]
root@prox01:~#

failed
 
please post the output of `pveversion -v`
 
My apologies for resurrecting this post but it seems this is not resolved still and I'm experiencing the same issue.

Command:
root@pve-60-0:~# pvesh create /nodes/pve-60-1/vzdump -vmid 100100 -storage Tank4tb-V2

Expected behavior:
Creates backup of vm with id 100100 to storage Tank4tb-V2

Actual behavior:
Returns an error:
Code:
Unknown option: output-format
400 unable to parse option
proxy handler failed: pvesh create <api_path> [OPTIONS]

Additional info:
Code:
root@pve-60-0:~# pveversion -v
proxmox-ve: 6.1-2 (running kernel: 5.3.13-1-pve)
pve-manager: 6.1-5 (running version: 6.1-5/9bf06119)
pve-kernel-5.3: 6.1-1
pve-kernel-helper: 6.1-1
pve-kernel-5.3.13-1-pve: 5.3.13-1
pve-kernel-5.3.10-1-pve: 5.3.10-1
ceph-fuse: 12.2.11+dfsg1-2.1+b1
corosync: 3.0.2-pve4
criu: 3.11-3
glusterfs-client: 5.5-3
ifupdown: 0.8.35+pve1
ksm-control-daemon: 1.3-1
libjs-extjs: 6.0.1-10
libknet1: 1.13-pve1
libpve-access-control: 6.0-5
libpve-apiclient-perl: 3.0-2
libpve-common-perl: 6.0-10
libpve-guest-common-perl: 3.0-3
libpve-http-server-perl: 3.0-3
libpve-storage-perl: 6.1-3
libqb0: 1.0.5-1
libspice-server1: 0.14.2-4~pve6+1
lvm2: 2.03.02-pve3
lxc-pve: 3.2.1-1
lxcfs: 3.0.3-pve60
novnc-pve: 1.1.0-1
proxmox-mini-journalreader: 1.1-1
proxmox-widget-toolkit: 2.1-2
pve-cluster: 6.1-3
pve-container: 3.0-16
pve-docs: 6.1-3
pve-edk2-firmware: 2.20191127-1
pve-firewall: 4.0-9
pve-firmware: 3.0-4
pve-ha-manager: 3.0-8
pve-i18n: 2.0-3
pve-qemu-kvm: 4.1.1-2
pve-xtermjs: 3.13.2-1
qemu-server: 6.1-4
smartmontools: 7.1-pve2
spiceterm: 3.1-1
vncterm: 1.6-1
zfsutils-linux: 0.8.2-pve2
 
Hi,
I can reproduce this when running the command from a different node than the one in the API path or when explicitly adding --output-format json to the command. I'll take a look at it, seems the option description might get mixed up somewhere.
 
Thank you for the prompt response @Fabian_E .
I'm not very good with Perl but I tried tinkering around and commented out line 114 of /usr/share/perl5/PVE/CLI/pvesh.pm and when I try to run the same command I can see that it actually runs the backup. It doesn't seemed to complete the backup though or it just looked stucked after.
 
I've sent a patch yesterday, which has been applied already and should be included in the next version of pve-manager, i.e. 6.1-8. I can't tell you exactly when it will be available, but if it's urgent you can apply the patch yourself in the meantime. Another workaround should be issuing the backup command from the same node the VM is located on.
 
Thanks for the patch @Fabian_E. That was fast!
Looks like I'll have to apply the patch myself.
Issuing the backup command from the same node works also but I prefer using the API than hop on each node and issue the command.
I'll let you know how it goes once I applied the patch.