[PVE-User] pvesh set config description multiline - any hint ?

Fabian Grünbichler f.gruenbichler at proxmox.com
Tue Dec 20 14:09:00 CET 2016


On Tue, Dec 20, 2016 at 01:32:39PM +0100, Thomas Lamprecht wrote:
> On 12/20/2016 01:21 PM, IMMO WETZEL wrote:
> > How can I set multiline config descriptions ?
> > 
> > root at node01:~# pvesh set /nodes/node04/qemu/315/config -description "line1\nline2"
> > 
> > è Description shows a n not a line break
> > 
> > è update VM 315: -description line1nline2
> > 
> > è 200 OK
> > 
> > 
> > root at node01:~# pvesh set /nodes/node04/qemu/315/config -description "line1 \n line2"
> > 
> > è 400 too many arguments
> > 
> > root at node01:~# pvesh set /nodes/node04/qemu/315/config -description "line1 \\n line2"
> > 
> > è Description shows a \n not a line break
> > 
> > è update VM 315: -description line1\nline2
> > 
> > è 200 OK
> > 
> > Some with single quotes
> 
> The description parameter is url-encoded, see
> https://en.wikipedia.org/wiki/Percent-encoding
> 
> pvesh set /nodes/node04/qemu/315/config -description 'line1%0D%0Aline2'
> 
> produces your desired effect :)

pvesh set /nodes/NODE/qemu/VMID/config -description 'line1
line2
line3'

works as well (YMMV depending on your shell ;) )




More information about the pve-user mailing list