I keep getting pvesh error complaining json malformat
/usr/share/perl5/PVE/CLI/pvesh.pm @ line 125
my command send to PVE API is
/usr/share/perl5/PVE/CLI/pvesh.pm @ line 125
Code:
sub proxy_handler {
my ($node, $remip, $path, $cmd, $param) = @_;
my $args = [];
foreach my $key (keys %$param) {
next if $key eq 'quiet' || $key eq 'output-format'; # just to be sure
push @$args, "--$key", $param->{$key};
}
my $remcmd = ['ssh', '-o', 'BatchMode=yes', "root\@$remip",
'pvesh', '--noproxy', $cmd, $path,
'--output-format', 'json'];
if (scalar(@$args)) {
my $cmdargs = [String::ShellQuote::shell_quote(@$args)];
push @$remcmd, @$cmdargs;
}
my $json = '';
PVE::Tools::run_command($remcmd, errmsg => "proxy handler failed",
outfunc => sub { $json .= shift });
return decode_json($json);
}
my command send to PVE API is
Code:
pvesh set /nodes/pve1/qemu/810/config --scsi0 "rbd:vm-810-disk-1,cache=writeback,discard=on,iops_rd=8000,iops_wr=8000,mbps_rd=400,mbps_wr=400,size=60G" --scsi1 "rbd:vm-810-disk-2,cache=writeback,discard=on,iops_rd=8000,iops_wr=8000,mbps_rd=400,mbps_wr=400,size=200G --hostpci0 "04:00,pcie=1,x-vga=1" --net0 "virtio=7A:83:E0:CB:92:58,bridge=vmbr0"