[PR #510] fix: guest qemu create wont load config correctly #515

Open
opened 2026-02-28 00:42:29 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Telmate/proxmox-api-go/pull/510
Author: @NemoDacremont
Created: 10/31/2025
Status: 🔄 Open

Base: masterHead: fix/506


📝 Commits (2)

  • 702122c fix: guest qemu create wont load config correctly
  • be3d94a clean: remove vmr assignation to pass staticcheck

📊 Changes

1 file changed (+23 additions, -21 deletions)

View changed files

📝 cli/command/create/guest/create-guest.go (+23 -21)

📄 Description

I don't really know what was going on in this file, and feel like things are done weirdly, however the command will work at least with this config.

I feel like the code was commented out and a workaround was added to make it work, however there were several reasons why it could not work, first because the node was not set and second because the vmid was not set.

I think this patch is not better than a workaround, I set the node but it was already set before for the vmref. However I think it may be better to let it like that for now.

Test

Tested by running :

NEW_CLI=true proxmox-api-go -i create guest qemu --file ./qemu.json 123 pve
# QemuGuest (123) has been created

Tested with this config :

{
    "name": "test-qemu01",
    "bios": "seabios",
    "tablet": true,
    "memory": {
        "capacity": 2048
    },
    "ostype": "l26",
    "sockets": 1,
    "cpu": {
        "type": "host",
        "cores": 1
    },
    "numa": false,
    "kvm": true,
    "hotplug": "network,disk,usb",
    "boot": "order=ide2;net0",
    "scsihw": "virtio-scsi-pci",
    "network": {
        "0": {
            "bridge": "vmbr0",
            "firewall": true,
            "id": 0,
            "macaddr": "B6:8F:9D:7C:8F:BC",
            "model": "virtio"
        }
    }
}

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Telmate/proxmox-api-go/pull/510 **Author:** [@NemoDacremont](https://github.com/NemoDacremont) **Created:** 10/31/2025 **Status:** 🔄 Open **Base:** `master` ← **Head:** `fix/506` --- ### 📝 Commits (2) - [`702122c`](https://github.com/Telmate/proxmox-api-go/commit/702122c92dd1ce51c6f9e6962079de043acd1d89) fix: guest qemu create wont load config correctly - [`be3d94a`](https://github.com/Telmate/proxmox-api-go/commit/be3d94affa822650df143bdfb14b6ca63eaa987c) clean: remove vmr assignation to pass staticcheck ### 📊 Changes **1 file changed** (+23 additions, -21 deletions) <details> <summary>View changed files</summary> 📝 `cli/command/create/guest/create-guest.go` (+23 -21) </details> ### 📄 Description I don't really know what was going on in this file, and feel like things are done weirdly, however the command will work at least with this config. I feel like the code was commented out and a workaround was added to make it work, however there were several reasons why it could not work, first because the node was not set and second because the vmid was not set. I think this patch is not better than a workaround, I set the node but it was already set before for the vmref. However I think it may be better to let it like that for now. ### Test Tested by running : ```sh NEW_CLI=true proxmox-api-go -i create guest qemu --file ./qemu.json 123 pve # QemuGuest (123) has been created ``` Tested with this config : ```json { "name": "test-qemu01", "bios": "seabios", "tablet": true, "memory": { "capacity": 2048 }, "ostype": "l26", "sockets": 1, "cpu": { "type": "host", "cores": 1 }, "numa": false, "kvm": true, "hotplug": "network,disk,usb", "boot": "order=ide2;net0", "scsihw": "virtio-scsi-pci", "network": { "0": { "bridge": "vmbr0", "firewall": true, "id": 0, "macaddr": "B6:8F:9D:7C:8F:BC", "model": "virtio" } } } ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/proxmox-api-go#515
No description provided.