The VM config file is locked by a previous task on that VM, like a backup, a config change or, most probably, a shutdown command. The lock prevents race conditions that may affect both configuration and status. Make sure no task is really running regarding that VM. Sometimes the VM may stay locked when a task is aborted (seen with backups). In such cases you can use qm unlock VMID
.