VM Startup Error "Error start failed QEMU exited with code1"

Not at the same time but sequentially after each other.
At least per VM. There might be multiple API requests at the same time, but only when configuring multiple VMs, the lock situation shouldn't be an issue then I guess.

This is the list of API requests that were sent before eventually trying to start the VM:

  1. Create VM:
    • Endpoint: POST /nodes/{node}/qemu/{templateId}/clone
    • Parameters: newid, full, name
  2. Set VM Configuration:
    • Endpoint: POST /nodes/{node}/qemu/{vmId}/config
    • Parameters: Dynamic based on VM configuration (e.g., cores, memory, net0, scsi0)
  3. Set Key for Cloud Init:
    • Endpoint: PUT /nodes/{node}/qemu/{vmId}/config
    • Parameters: ciuser, sshkeys
  4. Configure Networking:
    • Endpoint: POST /nodes/{node}/qemu/{vmId}/config
    • Parameters: ipconfig0, nameserver
  5. Configure IP Set:
    • Create IP Set Endpoint: POST /nodes/{node}/qemu/{vmId}/firewall/ipset/
    • Create IP Set Parameters: name, node, vmid
    • Attach IP Set Endpoint: POST /nodes/{node}/qemu/{vmId}/firewall/ipset/ipfilter-net0
    • Attach IP Set Parameters: name, node, vmid, cidr
  6. Apply Firewall Defaults:
    • Create Rule Endpoint: POST /nodes/{node}/qemu/{vmId}/firewall/rules/
    • Create Rule Parameters: action, type, sport, proto, dport, source, dest, pos, enable, node, vmid
Maybe the firewall settings were not yet fully applied at the time you started the VM? If I'm not mistaken, that doesn't lock the VM configuration file directly (firewall rules are in a separate file). Still, it's strange that you don't get any clear error message from QEMU.
 
Maybe the firewall settings were not yet fully applied at the time you started the VM? If I'm not mistaken, that doesn't lock the VM configuration file directly (firewall rules are in a separate file). Still, it's strange that you don't get any clear error message from QEMU.
Applying the firewall rules is actually the last step before starting the VM.
So that might be it. But yea, still strange. Especially as there is absolutely no useful output in the syslog

In any case, I added more validation before each API call to make sure no lock is held + no more tasks are running
 

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!