qm start ID returns "malformed JSON string"

Jack_9846

Member
Nov 23, 2017
22
1
8
39
Minor emergency here, a Windows server 2016 VM was reset while it wasn't responding (which was because the nfs share one of its drives was on was disconnected), now when attempting to start it from the shell returns:

malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "(end of string)") at /usr/share/perl5/PVE/Tools.pm line 949, <GEN25> chunk 1.

I really don't know where to go from here, any help would be great.
 
Last edited:
Also this is linux kernel 4.13.8-3, and the output of qm showcmd ID --pretty is:

/usr/bin/kvm \
-id 200 \
-name NAME \
-chardev 'socket,id=qmp,path=/var/run/qemu-server/200.qmp,server,nowait' \
-mon 'chardev=qmp,mode=control' \
-pidfile /var/run/qemu-server/200.pid \
-daemonize \
-smbios 'type=1,uuid=f45c8d4a-1b83-4395-84eb-be17b312f1e7' \
-smp '4,sockets=1,cores=4,maxcpus=4' \
-nodefaults \
-boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
-vga std \
-vnc unix:/var/run/qemu-server/200.vnc,x509,password \
-no-hpet \
-cpu 'kvm64,+lahf_lm,+sep,+kvm_pv_unhalt,+kvm_pv_eoi,hv_spinlocks=0x1fff,hv_vapic,hv_time,hv_reset,hv_vpindex,hv_runtime,hv_relaxed,enforce' \
-m 16000 \
-device 'pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f' \
-device 'pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e' \
-device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' \
-readconfig /usr/share/qemu-server/pve-usb.cfg \
-device 'usb-tablet,id=tablet,bus=uhci.0,port=1' \
-device 'usb-host,vendorid=0x059f,productid=0x1024,id=usb0' \
-chardev 'socket,path=/var/run/qemu-server/200.qga,server,nowait,id=qga0' \
-device 'virtio-serial,id=qga0,bus=pci.0,addr=0x8' \
-device 'virtserialport,chardev=qga0,name=org.qemu.guest_agent.0' \
-iscsi 'initiator-name=iqn.1993-08.org.debian:01:f754cb6ece4b' \
-drive 'file=/data1/images/200/vm-200-disk-1.qcow2,if=none,id=drive-virtio0,format=qcow2,cache=none,aio=native,detect-zeroes=on' \
-device 'virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pci.0,addr=0xa,bootindex=100' \
-netdev 'type=tap,id=net0,ifname=tap200i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown,vhost=on' \
-device 'virtio-net-pci,mac=7A:B4:77:91:E1:B1,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300' \
-rtc 'driftfix=slew,base=localtime' \
-global 'kvm-pit.lost_tick_policy=discard'


My JSON knowledge is not high enough to find out what's gone wrong here though.
 
Hi Jack_9846,

Can you please send the output of

Code:
pveversion -v

and when do you get this error or where do you see this error.
 
Last edited:
Thank you wolfgang! That makes my life easier (to be clear, you are talking about my issue too, not just @adminimt's, correct?). If you still want to look at it the version output is:

proxmox-ve: 5.2-2 (running kernel: 4.13.8-3-pve)
pve-manager: 5.2-2 (running version: 5.2-2/b1d1c7f4)
pve-kernel-4.15: 5.2-2
pve-kernel-4.15.17-2-pve: 4.15.17-10
pve-kernel-4.13.8-3-pve: 4.13.8-30
pve-kernel-4.13.4-1-pve: 4.13.4-26
corosync: 2.4.2-pve5
criu: 2.11.1-1~bpo90
glusterfs-client: 3.8.8-1
ksm-control-daemon: 1.2-2
libjs-extjs: 6.0.1-2
libpve-access-control: 5.0-8
libpve-apiclient-perl: 2.0-4
libpve-common-perl: 5.0-32
libpve-guest-common-perl: 2.0-16
libpve-http-server-perl: 2.0-9
libpve-storage-perl: 5.0-23
libqb0: 1.0.1-1
lvm2: 2.02.168-pve6
lxc-pve: 3.0.0-3
lxcfs: 3.0.0-1
novnc-pve: 1.0.0-1
proxmox-widget-toolkit: 1.0-18
pve-cluster: 5.0-27
pve-container: 2.0-23
pve-docs: 5.2-4
pve-firewall: 3.0-11
pve-firmware: 2.0-4
pve-ha-manager: 2.0-5
pve-i18n: 1.0-6
pve-libspice-server1: 0.12.8-3
pve-qemu-kvm: 2.11.1-5
pve-xtermjs: 1.0-5
qemu-server: 5.0-28
smartmontools: 6.5+svn4324-1
spiceterm: 3.0-5
vncterm: 1.5-3
zfsutils-linux: 0.7.9-pve1~bpo9
 
Yes, this is the same one.

This error always occurs if you start a VM.
But it is harmless and does nothing.
 
What happens if you start it manually?
Code:
qm showcmd <VMID>  | . /dev/stdin
 
It returns:

kvm: -netdev type=tap,id=net0,ifname=tap200i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown,vhost=on: could not configure /dev/net/tun (tap200i0): Device or resource busy


So the JSON problem was an unrelated red herring?
 
So the JSON problem was an unrelated red herring?
Normally you should be able to start the VM.
The JSON comes from the qemu output and not from the config.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!