lyt_yudi
2018-08-03 07:58:39 UTC
Hi,
Sorry by this :(
# cat test.txt |wc
9000 9000 129699
# pvesh create nodes/localhost/qemu/131/agent/file-write --content "$(cat test.txt)" --file /root/test.txt
400 Parameter verification failed.
content: value may only be 61440 characters long
pvesh create <api_path> --content <string> --file <string> [OPTIONS] [FORMAT_OPTIONS]
Can increase it?
442 __PACKAGE__->register_method({
443 name => 'file-write',
444 path => 'file-write',
445 method => 'POST',
446 protected => 1,
447 proxyto => 'node',
448 description => "Writes the given file via guest agent.",
449 permissions => { check => [ 'perm', '/vms/{vmid}', [ 'VM.Monitor' ]]},
450 parameters => {
451 additionalProperties => 0,
452 properties => {
453 node => get_standard_option('pve-node'),
454 vmid => get_standard_option('pve-vmid', {
455 completion => \&PVE::QemuServer::complete_vmid_running }),
456 file => {
457 type => 'string',
458 description => 'The path to the file.'
459 },
460 content => {
461 type => 'string',
462 maxLength => 60*1024, # 60k, smaller than our 64k POST limit
463 description => "The content to write into the file."
464 }
465 },
466 },
Sorry by this :(
# cat test.txt |wc
9000 9000 129699
# pvesh create nodes/localhost/qemu/131/agent/file-write --content "$(cat test.txt)" --file /root/test.txt
400 Parameter verification failed.
content: value may only be 61440 characters long
pvesh create <api_path> --content <string> --file <string> [OPTIONS] [FORMAT_OPTIONS]
Can increase it?
442 __PACKAGE__->register_method({
443 name => 'file-write',
444 path => 'file-write',
445 method => 'POST',
446 protected => 1,
447 proxyto => 'node',
448 description => "Writes the given file via guest agent.",
449 permissions => { check => [ 'perm', '/vms/{vmid}', [ 'VM.Monitor' ]]},
450 parameters => {
451 additionalProperties => 0,
452 properties => {
453 node => get_standard_option('pve-node'),
454 vmid => get_standard_option('pve-vmid', {
455 completion => \&PVE::QemuServer::complete_vmid_running }),
456 file => {
457 type => 'string',
458 description => 'The path to the file.'
459 },
460 content => {
461 type => 'string',
462 maxLength => 60*1024, # 60k, smaller than our 64k POST limit
463 description => "The content to write into the file."
464 }
465 },
466 },